/* MindPhil website. Plain CSS, no build step.
   Colors come from the app: brand orange #FF9500, dark screen #1C1C1E, light grouped background #F2F2F7
   (shield screen), text #1a1a1a (light) and #ECEDEE (dark). Secondary text is darker than the app's #888 so it
   stays readable on a white page. Links use a darker orange than the brand one, which is too light for text. */

:root {
  --accent: #ff9500;
  --accent-ink: #1a1a1a; /* text on top of the accent color */
  --bg: #ffffff;
  --bg-soft: #f2f2f7;
  --text: #1a1a1a;
  --text-soft: #5f5f66;
  --line: #e4e4e8;
  --link: #b05a00;
  --link-hover: #7d4000;
  --radius: 14px;
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --bg-soft: #26262a;
    --text: #ecedee;
    --text-soft: #a4a9ae;
    --line: #3a3a3f;
    --link: #ffad33;
    --link-hover: #ffc470;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 10;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header ------------------------------------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9px;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Main -------------------------------------------------------------------------------------------------- */

main {
  flex: 1;
  padding-bottom: 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  margin: 2.5rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0.6rem 0;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.3rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 38rem;
}

.updated {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero {
  padding-bottom: 0.5rem;
}

.hero .lead {
  margin-top: 0;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  color: var(--accent-ink);
  filter: brightness(1.05);
}

.button-placeholder {
  background: transparent;
  color: var(--text-soft);
  border: 2px dashed var(--line);
  font-weight: 500;
  cursor: default;
}

.button-placeholder:hover {
  color: var(--text-soft);
  filter: none;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  margin: 0;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.4rem;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.steps strong {
  display: block;
}

.card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card ul:last-child,
.card p:last-child {
  margin-bottom: 0;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details > *:not(summary) {
  margin-top: 0.5rem;
}

/* Footer ------------------------------------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer a {
  color: var(--text-soft);
}

.site-footer a:hover {
  color: var(--text);
}

@media (min-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }
}

/* Consent page and forms ---------------------------------------------------------------------------------- */

[hidden] {
  display: none !important;
}

button.button {
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}

button.button-secondary {
  border: 2px solid var(--line);
}

.button-secondary:hover {
  color: var(--text);
  border-color: var(--text-soft);
}

.button-block {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.actions .button {
  flex: 1 1 10rem;
  margin-top: 0;
  text-align: center;
}

.field {
  margin: 0 0 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming in */
}

.field input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--link-hover);
}

.notice {
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
}

.notice-error {
  border-left-color: #d32f2f;
}

.small {
  font-size: 0.92rem;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.host {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 1.25rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
