:root {
  --bg: #FBF5EC;
  --card: #FFFDF8;
  --ink: #262219;
  --muted: #6E6759;
  --line: rgba(38, 34, 25, 0.14);
  --line-soft: rgba(38, 34, 25, 0.08);
  --blue: #2F7EA8;
  --blue-dark: #245D7E;
  --blue-deep: #1C4A65;
  --green: #5E9E74;
  --green-deep: #47795A;
  --green-soft: #E4F0E7;
  --sand: #F1EADC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--green-soft); }

/* Faint brand underlay */
body::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  width: min(74vh, 82vw);
  aspect-ratio: 482 / 606;
  background: url('../assets/logo-mark.png') center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.topnav, .shell, footer { position: relative; z-index: 1; }

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 4.5vw, 3.6rem); margin: 0.9rem 0 1.1rem; letter-spacing: -0.02em; }
h1 em { font-style: italic; font-weight: 400; }
h2 { font-size: 1.55rem; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; margin-bottom: 0.1rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* Nav */
.topnav { border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.logo-img {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover; display: block; flex-shrink: 0;
}
.wordmark { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }

/* Shell */
.shell { flex: 1; display: flex; align-items: center; padding: 2.5rem 0; }
.shell-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }

/* Left column */
.lead-line {
  color: var(--muted);
  font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.subhead { max-width: 30rem; color: var(--muted); font-size: 1.05rem; margin-bottom: 0.5rem; }

/* Comparison */
.compare { max-width: 25rem; margin-top: 1.9rem; }
.compare-row {
  display: flex; align-items: baseline; gap: 1.1rem;
  padding: 0.55rem 0.15rem;
  border-top: 1px solid var(--line);
}
.compare-row:last-child { border-bottom: 1px solid var(--line); }
.compare-who { font-family: 'Fraunces', Georgia, serif; font-size: 1rem; flex: 0 0 6.5rem; }
.compare-what { color: var(--muted); font-size: 0.9rem; }
.compare-us .compare-who { color: var(--green-deep); }
.compare-us .compare-what { color: var(--ink); }
.compare-what em { font-family: 'Fraunces', Georgia, serif; font-size: 0.98rem; }

/* Paw ornament */
.divider {
  display: flex; align-items: center; gap: 1.1rem;
  max-width: 25rem; margin: 1.4rem 0;
  color: var(--green);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.divider .paw { width: 18px; height: 18px; flex-shrink: 0; }

/* Value list */
.value-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0.85rem; max-width: 34rem; }
.value-item { display: flex; align-items: flex-start; gap: 0.8rem; }
.value-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--sand); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 0.1rem;
}
.value-icon svg { width: 17px; height: 17px; }
.value-item p { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }

/* Form card */
.col-form { width: 100%; }
.form-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(38, 34, 25, 0.05);
  padding: 1.9rem 1.6rem;
}
.section-sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.4rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.field { margin-bottom: 0.95rem; }
.field label { display: block; font-weight: 500; font-size: 0.86rem; margin-bottom: 0.3rem; }
.req { color: var(--blue-dark); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 0.6rem 0.8rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 0; }
.field input::placeholder, .field textarea::placeholder { color: #A79F8F; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue-dark); outline-offset: 1px; border-color: var(--blue-dark); }
.hint { color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; }
.field-error, .form-error { color: #A8402F; font-size: 0.82rem; margin-top: 0.3rem; }
.form-error { margin-bottom: 0.8rem; }
.checkbox-field { margin: 0.4rem 0 1.1rem; }
.checkbox-label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.86rem; cursor: pointer; color: var(--muted); }
.checkbox-label input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--blue-dark); flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.95rem;
  padding: 0.8rem 1.8rem; min-height: 44px; border-radius: 10px;
  border: none; cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary { background: var(--blue-dark); color: #FFFDF8; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--blue-deep); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.65; cursor: wait; transform: none; }
.btn-nav { background: var(--blue-dark); color: #FFFDF8; font-size: 0.86rem; padding: 0.55rem 1.15rem; min-height: 0; border-radius: 9px; }
.btn-nav:hover { background: var(--blue-deep); }
.btn-secondary { background: transparent; color: var(--blue-dark); border: 1px solid var(--line); font-size: 0.88rem; padding: 0.5rem 1.05rem; min-height: 0; }
.btn-secondary:hover { background: var(--sand); }
.btn-block { display: block; width: 100%; }
.btn:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

/* Confirmation */
#confirmation { text-align: center; padding: 0.75rem 0; }
#confirmation h2:focus { outline: none; }
.share-prompt { margin: 1.3rem 0 0.8rem; font-weight: 500; font-size: 0.94rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; }
.invite-line { margin-top: 1.5rem; color: var(--muted); font-size: 0.86rem; }
.invite-line a { color: var(--blue-dark); }
#confirm-note { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 1.1rem 0; flex-shrink: 0; }
.footer-inner { text-align: center; }
.footer-brand { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 0.95rem; }
.disclaimer { color: var(--muted); font-size: 0.74rem; max-width: 46rem; margin: 0.35rem auto; }
.footer-links { font-size: 0.8rem; }
.footer-links a { color: var(--blue-dark); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* Two-column shell on desktop */
@media (min-width: 980px) {
  .shell-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4.5rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 2.1rem 2rem; }
}

/* Short-viewport tightening so desktop fits without scrolling */
@media (min-width: 980px) and (max-height: 860px) {
  .topnav-inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .shell { padding: 0.4rem 0; }
  footer { padding: 0.55rem 0; }
  h1 { font-size: clamp(2.1rem, 3.4vw, 2.7rem); margin: 0.55rem 0 0.75rem; }
  h2 { font-size: 1.35rem; }
  .subhead { font-size: 0.95rem; margin-bottom: 0.25rem; }
  .section-sub { margin-bottom: 1rem; }
  .compare { margin-top: 1.1rem; }
  .compare-row { padding: 0.4rem 0.15rem; }
  .divider { margin: 0.85rem 0; }
  .value-grid { gap: 0.5rem; }
  .value-item p { display: none; }
  .value-icon { width: 28px; height: 28px; border-radius: 8px; }
  .value-icon svg { width: 15px; height: 15px; }
  .value-item h3 { margin: 0; line-height: 28px; font-size: 0.95rem; }
  .form-card { padding: 1.4rem 1.6rem; }
  .field { margin-bottom: 0.65rem; }
  .field input[type="text"], .field input[type="email"], .field textarea { min-height: 40px; padding: 0.5rem 0.75rem; font-size: 0.92rem; }
  .field label { font-size: 0.82rem; margin-bottom: 0.25rem; }
  .hint { font-size: 0.72rem; margin-top: 0.2rem; }
  .checkbox-field { margin: 0.25rem 0 0.8rem; }
  .btn-primary.btn-block { padding: 0.7rem 1.8rem; min-height: 42px; }
  footer { padding: 0.7rem 0; }
  .disclaimer { max-width: none; font-size: 0.68rem; margin: 0.2rem auto; }
  .footer-brand { font-size: 0.88rem; }
  .footer-links { font-size: 0.74rem; }
}

/* Mobile sweep: these live at the end of the file so they win the cascade */
@media (max-width: 979px) {
  /* 16px inputs prevent iOS focus zoom */
  .field input[type="text"], .field input[type="email"], .field textarea { font-size: 1rem; }
  /* comfortable tap targets */
  .btn-nav { min-height: 42px; display: inline-flex; align-items: center; }
  .btn-secondary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  .topnav-inner { padding-left: 1rem; padding-right: 1rem; }
  .brand { gap: 0.5rem; }
  .wordmark { font-size: 0.95rem; }
  .logo-img { width: 28px; height: 28px; }
  .btn-nav { white-space: nowrap; font-size: 0.78rem; padding: 0.45rem 0.8rem; }
}

@media (max-width: 340px) {
  .wordmark { font-size: 0.85rem; }
  .btn-nav { font-size: 0.74rem; padding: 0.4rem 0.65rem; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}

/* Mobile: single-screen signup, no scrolling */
@media (max-width: 979px) {
  .topnav-inner { padding-top: 0.55rem; padding-bottom: 0.55rem; }
  .shell { padding: 0.6rem 0; }
  .shell-grid { gap: 0.6rem; }
  .subhead, .compare, .divider, .value-grid, .lead-line, .section-sub { display: none; }
  h1 { font-size: 1.55rem; margin: 0; text-align: center; }
  h1 br { display: none; }
  .form-card { padding: 1rem 1rem; }
  h2 { font-size: 1.2rem; margin-bottom: 0.7rem; }
  .field-row { grid-template-columns: 1fr 1fr; gap: 0 0.7rem; }
  .field { margin-bottom: 0.55rem; }
  .field-question { display: none; }
  .field textarea { height: 52px; }
  .hint { display: none; }
  .checkbox-field { margin: 0.15rem 0 0.65rem; }
  footer { padding: 0.5rem 0; }
  .disclaimer { font-size: 0.62rem; margin: 0.15rem auto; }
  .footer-brand { font-size: 0.82rem; }
  .footer-links { display: none; }
}

/* Progressive disclosure as screens get taller */
@media (max-width: 979px) and (min-height: 800px) {
  .lead-line { display: block; text-align: center; }
  .section-sub { display: block; }
  .field-question { display: block; }
  h1 { font-size: 1.8rem; margin: 0.25rem 0 0; }
}
@media (max-width: 979px) and (min-height: 990px) {
  .compare { display: block; margin: 0.9rem auto 0.2rem; max-width: 25rem; }
  .shell-grid { gap: 1rem; }
}

/* Very short screens (small phones, landscape): essentials only */
@media (max-width: 979px) and (max-height: 600px) {
  .checkbox-field { display: none; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
  .field { margin-bottom: 0.45rem; }
  .form-card { padding: 0.8rem 0.9rem; }
  .disclaimer { font-size: 0.58rem; }
}
