/* Regulate — nervoussystemcompanion.com */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("/assets/fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url("/assets/fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --terracotta: #A9573C;
  --sunset: #E39A6B;
  --peach: #F2C4A0;
  --cream: #F7F1EA;
  --surface: #FBF6F0;
  --table-head: #F3E8DD;
  --line: #EADBCD;
  --line-strong: #D9C4B3;
  --plum: #3F3038;
  --text-2: #5C4B44;
  --max: 1120px;
  --gutter: 40px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--plum);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

img { max-width: 100%; display: block; }

a { color: var(--terracotta); text-underline-offset: 3px; }
a:hover { color: var(--plum); }
a:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--plum);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- 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: 8px 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--plum);
}
.brand:hover { color: var(--plum); }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.brand span { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  font-size: 16px;
}
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  padding: 12px 0;
}
.site-nav a:hover { color: var(--plum); }
.site-nav a[aria-current="page"] {
  color: var(--plum);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--sunset);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  max-width: 100%;
  text-align: center;
}
.button-primary { background: var(--terracotta); color: #fff; }
.button-primary:hover { background: #8E4630; color: #fff; }
.button-secondary { border: 1.5px solid var(--line-strong); color: var(--plum); }
.button-secondary:hover { border-color: var(--terracotta); color: var(--plum); }

/* ---------- Homepage ---------- */
.hero .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
  padding-top: 96px;
  padding-bottom: 112px;
}
.hero-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.pill {
  margin: 0;
  align-self: flex-start;
  font-size: 15px;
  font-weight: 600;
  color: var(--terracotta);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(64px, 9vw, 112px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero .lead {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.3;
  font-weight: 500;
  max-width: 22ch;
}
.hero .support {
  margin: 0;
  font-size: 19px;
  color: var(--text-2);
  max-width: 46ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }

.hero-visual {
  flex: 0 1 380px;
  min-width: 0;
  display: flex;
  justify-content: center;
  position: relative;
  padding: 24px 0;
}
.hero-visual::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  max-width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--peach);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
}

/* Phone frame for the large hero screenshot */
.phone {
  position: relative;
  width: 272px;
  aspect-ratio: 272 / 560;
  border-radius: 44px;
  border: 8px solid var(--plum);
  background: var(--surface);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* Screenshot slots for the steps */
.shot {
  aspect-ratio: 3 / 4.4;
  max-height: 440px;
  border-radius: 32px;
  background: var(--cream);
  border: 1px solid #E3D2C3;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Shown until a real screenshot is added */
.shot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 15px;
  color: var(--text-2);
}

.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section .wrap { padding-top: 112px; padding-bottom: 112px; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin-bottom: 64px; }
.section h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; font-size: 19px; color: var(--text-2); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 40px;
}
.steps li {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.step-label { margin: 0; font-size: 15px; font-weight: 600; color: var(--terracotta); }
.steps h3, .features h3 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; }
.steps p, .features p { margin: 0; color: var(--text-2); }
.step-text { display: flex; flex-direction: column; gap: 8px; }

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 56px;
}
.feature {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 2px solid var(--sunset);
  padding-top: 28px;
}
.feature svg { width: 32px; height: 32px; }

.signin .wrap { padding-bottom: 112px; }
.signin-inner { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.signin h2 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; }
.signin p { margin: 0; color: var(--text-2); }

.beta { background: var(--peach); }
.beta .wrap {
  padding-top: 104px;
  padding-bottom: 104px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.beta h2 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.beta p { margin: 0; font-size: 19px; max-width: 52ch; }
.beta .button { margin-top: 12px; min-height: 56px; font-size: 18px; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand p { margin: 0; font-size: 15px; color: var(--text-2); }
.footer-brand .name { font-size: 18px; font-weight: 700; color: var(--plum); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 16px; }
.footer-nav a { color: var(--plum); padding: 12px 0; overflow-wrap: anywhere; }
.footer-nav a:hover { color: var(--terracotta); }

/* ---------- Legal pages ---------- */
.legal-main { padding-top: 80px; padding-bottom: 112px; }
.legal-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 48px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
  max-width: 760px;
}
.legal-head h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.updated { margin: 0; font-size: 16px; color: var(--text-2); }
.legal-lead {
  margin: 8px 0 0;
  font-size: clamp(21px, 2.2vw, 24px);
  line-height: 1.45;
  font-weight: 500;
}

.legal-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 72px;
  align-items: flex-start;
}
.toc {
  flex: 1 1 220px;
  max-width: 280px;
  font-size: 16px;
  line-height: 1.4;
}
.toc-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { color: var(--plum); text-decoration: none; padding: 7px 0; display: block; }
.toc a:hover { color: var(--terracotta); }

@media (min-width: 900px) {
  .toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
}

.prose {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 68ch;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.prose section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.prose h2 { margin: 0; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.prose p { margin: 0; }
.prose ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.prose strong { font-weight: 600; }
.prose a { overflow-wrap: anywhere; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 28px 32px;
}
.callout {
  background: var(--peach);
  border-radius: 16px;
  padding: 20px 24px;
}
.address { color: var(--text-2); }

/* Note to the site owner — remove each one once it's settled */
.confirm {
  color: var(--text-2);
  border: 1.5px dashed #C9AE98;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
}

.table-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow-x: auto;
}
.legal-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.legal-table th, .legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-table th { font-size: 15px; font-weight: 600; background: var(--table-head); }
.legal-table td:first-child { font-weight: 600; }

/* ---------- 404 ---------- */
.notfound {
  padding-top: 128px;
  padding-bottom: 144px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.sun { width: 120px; height: 60px; border-radius: 120px 120px 0 0; background: var(--peach); }
.notfound h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.notfound p { margin: 0; font-size: 20px; color: var(--text-2); max-width: 44ch; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-nav { gap: 0 20px; }
  .hero .wrap { padding-top: 56px; padding-bottom: 72px; gap: 48px; }
  .hero-visual { flex-basis: 100%; }
  .section .wrap { padding-top: 72px; padding-bottom: 72px; }
  .section-head { margin-bottom: 40px; }
  .shot { width: 100%; max-width: 300px; }
  .signin .wrap { padding-bottom: 72px; }
  .beta .wrap { padding-top: 64px; padding-bottom: 64px; }
  .actions .button { flex: 1 1 100%; }
  .legal-main { padding-top: 48px; padding-bottom: 72px; }
  .legal-head { padding-bottom: 32px; margin-bottom: 32px; }
  .toc { max-width: none; flex-basis: 100%; }
  .prose { gap: 44px; }
  .panel { padding: 22px 20px 24px; }
  .notfound { padding-top: 72px; padding-bottom: 96px; }

  /* Tables become stacked cards so nothing scrolls sideways */
  .legal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .legal-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .legal-table tbody tr:last-child { border-bottom: 0; }
  .legal-table td { display: block; border: 0; padding: 4px 16px; }
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--terracotta);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}
