:root {
  --accent: #c06a5b;
  --accent-dark: #a65346;
  --accent-soft: #f3e2dc;
  --fertile: #6f9b8c;
  --fertile-soft: #e2efe9;
  --background: #faf7f2;
  --section: #f3eee5;
  --surface: #fffdf9;
  --ink: #3a332e;
  --body: #5c544b;
  --muted: #7d746a;
  --faint: #a99f93;
  --border: #e8e1d7;
  --dark: #3a332e;
  --radius: 22px;
  --shadow: 0 24px 60px -34px rgba(60, 40, 30, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  font: inherit;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #824036;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(111, 155, 140, 0.65);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.beta-banner {
  padding: 10px 20px;
  background: var(--dark);
  color: #f2ece3;
  font-size: 0.875rem;
  text-align: center;
}

.beta-banner a {
  color: inherit;
}

.site-header {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.brand-mark {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
}

.brand-mark > span {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--background);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
}

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

.site-header nav .nav-cta {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
}

.site-header nav .nav-cta:hover {
  background: var(--accent-dark);
  color: #fff;
}

.hero {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  min-height: 760px;
  margin: 0 auto;
  padding: 46px 0 92px;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(48px, 7vw, 92px);
  align-items: center;
}

.hero-copy {
  max-width: 670px;
}

.pill,
.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: pretty;
}

h1 {
  margin: 20px 0 0;
  font-size: clamp(3.4rem, 6.2vw, 5.25rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

h1 em {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-intro {
  max-width: 49ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.17rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  padding: 13px 26px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  box-shadow: 0 14px 30px -16px var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #d7cec2;
  color: var(--ink);
}

.trust-list {
  display: flex;
  margin: 32px 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 0.85rem;
  list-style: none;
}

.trust-list li {
  position: relative;
  padding-left: 15px;
}

.trust-list li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fertile);
  content: "";
}

.phone-wrap {
  position: relative;
}

.phone-wrap::before {
  position: absolute;
  inset: 12% -18% -5%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 106, 91, 0.15), transparent 67%);
  content: "";
}

.phone {
  width: 390px;
  min-height: 735px;
  padding: 14px 20px 28px;
  overflow: hidden;
  border: 8px solid #26211e;
  border-radius: 48px;
  background: var(--background);
  box-shadow: 0 42px 80px -30px rgba(60, 40, 30, 0.52);
}

.phone-status {
  display: flex;
  padding: 5px 8px 18px;
  justify-content: space-between;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
}

.phone-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-heading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-kicker {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.phone-heading strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.settings-glyph {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  place-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.calendar-legend {
  display: flex;
  margin-top: 24px;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 13px;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.57rem;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.logged {
  background: var(--accent);
}

.dot.predicted {
  border: 1px dashed var(--accent);
}

.dot.fertile {
  background: var(--fertile-soft);
}

.month-preview {
  margin-top: 27px;
}

.month-preview h2 {
  margin: 0 0 18px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.weekdays {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 700;
  text-align: center;
}

.days {
  row-gap: 7px;
}

.days > span {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  margin: auto;
  border-radius: 50%;
  place-items: center;
  font-size: 0.77rem;
  font-weight: 600;
}

.days > span.flow {
  background: var(--accent);
  color: #fff;
}

.days > span.fertile-day {
  background: var(--fertile-soft);
}

.days > span.ovulation {
  border: 2px solid var(--fertile);
  color: #52796d;
}

.days > span.today::after {
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--accent);
  border-radius: 13px;
  content: "";
}

.days span i {
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

.next-card {
  display: flex;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow);
}

.next-card span {
  color: var(--muted);
  font-size: 0.71rem;
}

.next-card strong {
  margin-top: 2px;
  font-size: 1.15rem;
}

.next-card small {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.63rem;
}

.section {
  padding: 94px max(24px, calc((100% - 1180px) / 2));
}

.features {
  background: var(--section);
}

.section-heading {
  max-width: 690px;
}

.section-heading h2,
.privacy h2,
.waitlist h2 {
  margin: 12px 0 0;
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.042em;
}

.section-heading > p:last-child,
.privacy-copy > p,
.waitlist-inner > p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.68;
}

.feature-grid {
  display: grid;
  margin-top: 46px;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  min-height: 295px;
  padding: 30px;
  border: 1px solid rgba(232, 225, 215, 0.7);
  border-radius: var(--radius);
  background: var(--background);
}

.feature-card h3 {
  margin: 25px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.feature-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

.calendar-icon,
.chips,
.palette {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
}

.calendar-icon span {
  width: 27px;
  height: 27px;
  border-radius: 50%;
}

.calendar-icon span:first-child {
  background: var(--accent);
}

.calendar-icon span:nth-child(2) {
  border: 1.5px dashed var(--accent);
}

.calendar-icon span:last-child {
  border: 1.5px solid var(--fertile);
}

.chips {
  flex-wrap: wrap;
}

.chips span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--body);
  font-size: 0.72rem;
}

.chips span:first-child,
.chips span:last-child {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.palette span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
}

.palette span:nth-child(2) {
  background: #d46a92;
}

.palette span:nth-child(3) {
  background: var(--fertile);
}

.palette span:nth-child(4) {
  background: var(--ink);
}

.feature-strip {
  display: flex;
  margin-top: 22px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  justify-content: space-around;
  gap: 20px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--body);
  font-size: 0.86rem;
  font-weight: 650;
  text-align: center;
}

.privacy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: clamp(50px, 7vw, 90px);
  align-items: center;
}

.privacy-copy {
  max-width: 610px;
}

.check-list {
  display: grid;
  margin: 28px 0 0;
  padding: 0;
  gap: 14px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 29px;
}

.check-list li::before {
  position: absolute;
  top: 0.25em;
  left: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--fertile-soft);
  color: #52796d;
  content: "✓";
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
}

.privacy-copy .fine-print {
  margin-top: 27px;
  font-size: 0.83rem;
  line-height: 1.65;
}

.privacy-card {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.privacy-card .card-label {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.privacy-card > div {
  display: flex;
  padding: 18px 0;
  border-bottom: 1px solid #f1ece4;
  justify-content: space-between;
  gap: 20px;
}

.privacy-card > div strong {
  color: var(--fertile);
  font-size: 0.83rem;
  text-align: right;
}

.privacy-card > p:last-child {
  margin: 20px 0 0;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.55;
}

.waitlist {
  padding: 96px 24px;
  background: var(--dark);
  color: var(--background);
}

.waitlist-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.large-mark {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
}

.large-mark span {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--dark);
}

.waitlist .eyebrow {
  color: #df9c8e;
}

.waitlist-inner > p {
  color: #c4bab0;
}

.waitlist-form {
  max-width: 640px;
  margin: 32px auto 0;
}

.input-row {
  display: flex;
  padding: 5px;
  border: 1px solid #6b6157;
  border-radius: 16px;
  background: #2f2925;
  gap: 6px;
}

.input-row input {
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  flex: 1;
  background: transparent;
  color: #fff;
}

.input-row input::placeholder {
  color: #9e9388;
}

.input-row:focus-within {
  border-color: #d9a195;
  box-shadow: 0 0 0 3px rgba(192, 106, 91, 0.22);
}

.input-row button {
  min-height: 52px;
  padding: 0 23px;
  border: 0;
  border-radius: 12px;
  background: var(--background);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.input-row button:hover {
  background: #fff;
}

.input-row button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.consent {
  display: grid;
  margin-top: 16px;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: #c4bab0;
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: left;
}

.consent input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent a {
  color: #f3c5bc;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #f0d7d0;
  font-size: 0.86rem;
  font-weight: 650;
}

.form-status.success {
  color: #bfe3d7;
}

.waitlist-inner .waitlist-note {
  max-width: 62ch;
  margin: 8px auto 0;
  color: #9f958b;
  font-size: 0.75rem;
}

.honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.legal {
  background: var(--section);
}

.legal-heading {
  margin-bottom: 38px;
}

.legal-heading > p:last-child {
  font-size: 0.88rem;
}

.legal-document {
  max-width: 900px;
  margin-top: 24px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 15px 40px -38px rgba(60, 40, 30, 0.5);
}

.legal-document h3 {
  margin: 0 0 24px;
  font-size: 1.85rem;
  letter-spacing: -0.035em;
}

.legal-document h4 {
  margin: 30px 0 8px;
  font-size: 1.04rem;
}

.legal-document p,
.legal-document li {
  color: var(--body);
  font-size: 0.91rem;
  line-height: 1.75;
}

.legal-document ul {
  padding-left: 20px;
}

.legal-notice {
  padding: 15px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--accent-soft);
}

.site-footer {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 44px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark.small {
  width: 32px;
  height: 32px;
}

.brand-mark.small > span {
  width: 25px;
  height: 25px;
}

.footer-brand > div {
  display: flex;
  flex-direction: column;
}

.footer-brand span,
.site-footer > p {
  color: var(--faint);
  font-size: 0.77rem;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer > p {
  margin: 0;
  grid-column: 1 / -1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Server-rendered admin */
.admin-body {
  min-height: 100vh;
  background: var(--section);
}

.admin-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.admin-header {
  display: flex;
  margin-bottom: 26px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.admin-header h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.admin-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.admin-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #eee8df;
  text-align: left;
}

.admin-table th {
  background: #fbf8f3;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.9rem;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-empty {
  padding: 54px 24px;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  padding: 18px;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pagination a,
.pagination span {
  font-size: 0.85rem;
}

.pagination a {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--background);
  color: var(--ink);
  text-decoration: none;
}

.pagination .disabled {
  opacity: 0.45;
}

@media (max-width: 920px) {
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .phone-wrap {
    justify-self: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }

  .privacy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: min(100% - 32px, 1180px);
    padding: 18px 0;
  }

  .site-header nav > a:not(.nav-cta) {
    display: none;
  }

  .site-header nav {
    gap: 0;
  }

  .site-header nav .nav-cta {
    padding: 9px 13px;
    font-size: 0.82rem;
  }

  .brand {
    gap: 9px;
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-mark > span {
    width: 24px;
    height: 24px;
  }

  .hero {
    width: min(100% - 32px, 1180px);
    padding: 36px 0 70px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-intro {
    font-size: 1.04rem;
  }

  .phone {
    width: min(390px, calc(100vw - 34px));
    min-height: 0;
    padding-right: 14px;
    padding-left: 14px;
    border-width: 6px;
    border-radius: 40px;
  }

  .days > span {
    width: min(39px, 9vw);
    height: min(39px, 9vw);
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .feature-strip {
    flex-direction: column;
  }

  .privacy-card {
    padding: 24px;
  }

  .input-row {
    padding: 0;
    border: 0;
    flex-direction: column;
    background: transparent;
  }

  .input-row:focus-within {
    box-shadow: none;
  }

  .input-row input {
    width: 100%;
    border: 1px solid #6b6157;
    border-radius: 12px;
    background: #2f2925;
  }

  .input-row button {
    width: 100%;
  }

  .legal-document {
    border-radius: 18px;
  }

  .site-footer {
    width: min(100% - 32px, 1180px);
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .admin-header {
    align-items: start;
    flex-direction: column;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .beta-banner,
  .site-header,
  .hero,
  .features,
  .privacy,
  .waitlist,
  .site-footer {
    display: none;
  }

  .legal {
    padding: 0;
    background: #fff;
  }

  .legal-document {
    max-width: none;
    border: 0;
    box-shadow: none;
    break-before: page;
  }
}
