/* ==========================================================================
   OWN VOYAGE — components
   Header/nav/footer, Button, Badge, Card, Tabs, Highlight, StickyNote,
   Doodle, form controls, Toast, Dialog, and page-level layout grids.
   ========================================================================== */

/* ============================================================ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--navy-800);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 14px;
}
.site-header__logo {
  height: 46px;
  width: auto;
}
.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav__link {
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-800);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav__link:hover {
  color: var(--orange-600);
}
.site-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--orange-500);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}
/* .btn.menu-btn (not .menu-btn alone): same specificity as .btn's own
   `display: inline-flex`, so this must out-rank it on selector weight, not
   source order, or the button leaks through at every width. */
.btn.menu-btn {
  display: none;
  margin-left: auto;
}

/* ---- mobile nav (JS-driven; without JS the nav is always visible) ---- */
@media (max-width: 719px) {
  .js .btn.menu-btn {
    display: inline-flex;
  }
  .js .site-nav {
    display: none;
    flex-basis: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .js .site-nav.is-open {
    display: flex;
  }
  .js .site-nav .btn {
    align-self: flex-start;
  }
}

/* ============================================================ footer */
.site-footer {
  background: var(--navy-800);
  color: var(--white);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding-block: 56px 40px;
}
.site-footer__logo {
  height: 120px;
  width: auto;
}
.site-footer__title {
  font-weight: 700;
  color: var(--yellow-400);
  margin-bottom: 6px;
}
.site-footer__blurb {
  font-size: 15px;
  line-height: 1.7;
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}
.site-footer__links a {
  color: var(--white);
  text-decoration: none;
}
.site-footer__links a:hover {
  color: var(--orange-500);
}

/* ============================================================ button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.1;
  font-size: 16px;
  padding: 12px 24px;
  border: 2px solid var(--navy-800);
  border-radius: var(--radius-pill);
  background: var(--orange-500);
  color: var(--navy-800);
  box-shadow: var(--shadow-sticker);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-bounce),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur);
}
.btn:hover {
  color: var(--navy-800);
}
.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn--lg {
  padding: 16px 32px;
  font-size: 19px;
}
.btn--secondary {
  background: var(--white);
  color: var(--navy-800);
}
.btn--sun {
  background: var(--yellow-400);
  color: var(--navy-800);
}
.btn--dark {
  background: var(--navy-800);
  color: var(--white);
}
.btn--dark:hover {
  color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: transparent;
  box-shadow: none;
}
.btn--full {
  display: flex;
  width: 100%;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: no-preference) {
  .btn:not(.btn--ghost):hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sticker-l);
  }
  .btn:active {
    transform: translate(2px, 3px);
    box-shadow: none;
  }
  .btn--ghost:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
  }
}

/* ============================================================ badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: none;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--yellow-400);
  color: var(--navy-800);
  border: 2px solid var(--navy-800);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
.badge--orange {
  background: var(--orange-500);
  color: var(--navy-800);
}
.badge--teal {
  background: var(--teal-500);
  color: var(--white);
}
.badge--navy {
  background: var(--navy-800);
  color: var(--white);
}
.badge--seafoam {
  background: var(--seafoam-300);
  color: var(--navy-800);
}
.badge--success {
  background: var(--success-bg);
  color: var(--success);
}
.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge--tilt {
  rotate: -3deg;
}

/* ============================================================ tilt utilities (CSS `rotate`, composes with `transform`) */
.tilt-1 { rotate: 1deg; }
.tilt-1p5 { rotate: 1.5deg; }
.tilt-2 { rotate: 2deg; }
.tilt-4 { rotate: 4deg; }
.tilt-5 { rotate: 5deg; }
.tilt--0p5 { rotate: -0.5deg; }
.tilt--1 { rotate: -1deg; }
.tilt--1p5 { rotate: -1.5deg; }
.tilt--2 { rotate: -2deg; }
.tilt--3 { rotate: -3deg; }
.tilt--4 { rotate: -4deg; }
.tilt--6 { rotate: -6deg; }
.tilt--8 { rotate: -8deg; }

/* ============================================================ card */
.card {
  background: var(--white);
  color: var(--navy-800);
  border: 3px solid var(--navy-800);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sticker);
  padding: 24px;
  font-family: var(--font-body);
  transition: transform var(--dur) var(--ease-bounce),
    box-shadow var(--dur);
}
.card--yellow { background: var(--yellow-400); }
.card--orange { background: var(--orange-500); }
.card--teal { background: var(--teal-500); color: var(--white); }
.card--navy { background: var(--navy-800); color: var(--white); }
.card--seafoam { background: var(--seafoam-300); }
.card--mist { background: var(--mist-50); }
.card--flush { padding: 0; }
.card--pad-lg { padding: 28px; }
.card--interactive { cursor: pointer; }
.pain-card__title {
  font-weight: 800;
  font-size: 21px;
  line-height: 1.25;
  color: var(--navy-800);
}
.pain-card__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--deep-teal-600);
  margin-top: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .card--interactive:hover {
    transform: translate(-2px, -3px);
    box-shadow: var(--shadow-sticker-l);
  }
}

/* ============================================================ tabs */
.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: var(--white);
  border: 2px solid var(--navy-800);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sticker-s);
  flex-wrap: wrap;
}
.tabs__tab {
  border: 0;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  color: var(--navy-800);
  transition: background var(--dur);
}
.tabs__tab[aria-selected="true"] {
  background: var(--navy-800);
  color: var(--white);
}

/* ---- no-JS: tab panels always visible; JS hides inactive ones ---- */
.tab-panel[hidden],
[role="tabpanel"][hidden] {
  display: none;
}

/* ---- triad cards ---- */
.triad__word {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 0.9;
}
.triad__sub {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
.triad__body {
  font-size: 15px;
  line-height: 1.55;
}

/* ---- FAQ (native <details>) ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: var(--content-narrow);
}
.faq-item {
  border: 3px solid var(--navy-800);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sticker);
  background: var(--white);
  color: var(--navy-800);
  font-family: var(--font-body);
  transition: transform var(--dur) var(--ease-bounce),
    box-shadow var(--dur);
}
.faq-item__summary {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq-item__summary::-webkit-details-marker {
  display: none;
}
.faq-item__summary::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
  flex: none;
}
.faq-item[open] .faq-item__summary::after {
  content: "\2013";
}
.faq-item__body {
  padding: 0 22px 20px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--deep-teal-600);
}
@media (prefers-reduced-motion: no-preference) {
  .faq-item:hover {
    transform: translate(-2px, -3px);
    box-shadow: var(--shadow-sticker-l);
  }
}

/* ============================================================ highlight */
.hl {
  background-image: linear-gradient(
    transparent 55%,
    var(--yellow-400) 55%,
    var(--yellow-400) 92%,
    transparent 92%
  );
  padding: 0 0.12em;
  margin: 0 -0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl--orange {
  background-image: linear-gradient(
    transparent 55%,
    var(--orange-500) 55%,
    var(--orange-500) 92%,
    transparent 92%
  );
}
.hl--seafoam {
  background-image: linear-gradient(
    transparent 55%,
    var(--seafoam-300) 55%,
    var(--seafoam-300) 92%,
    transparent 92%
  );
}
.hl--teal {
  background-image: linear-gradient(
    transparent 55%,
    var(--teal-100) 55%,
    var(--teal-100) 92%,
    transparent 92%
  );
}

/* ============================================================ sticky note */
.sticky {
  position: relative;
  background: var(--yellow-200);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-body);
  color: var(--navy-800);
  border-radius: 4px;
}
.sticky--white { background: var(--white); }
.sticky--seafoam { background: var(--seafoam-300); }
.sticky--orange { background: var(--orange-50); }
.sticky--teal { background: var(--teal-100); }
.sticky__tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 80px;
  height: 22px;
  margin-left: -40px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(2, 48, 71, 0.08);
  rotate: 3deg;
}

/* ============================================================ doodle */
.doodle {
  display: block;
  width: auto;
  height: auto;
  transition: rotate var(--dur) var(--ease-bounce),
    transform var(--dur) var(--ease-bounce);
}

/* Per-instance placement (size + position + tilt). */
.doodle--bears { position: absolute; right: 10px; bottom: 0; width: 300px; }
.doodle--stars { position: absolute; left: 20px; top: 0; width: 150px; }
.doodle--dog { position: absolute; left: 0; bottom: 20px; width: 170px; }
.doodle--frog { position: absolute; left: 6%; top: 40px; width: 130px; }
.doodle--car { position: absolute; right: 6%; bottom: 40px; width: 140px; }
.doodle--rabbit { position: absolute; right: var(--gutter); top: 40px; width: 200px; }
.doodle--hedgehog { position: absolute; right: var(--gutter); top: 50px; width: 180px; }
.doodle--bird { margin-top: 24px; margin-left: auto; width: 150px; }

@media (prefers-reduced-motion: no-preference) {
  .doodle:hover {
    transform: rotate(4deg);
  }
}

/* Doodles that sit over text on narrow screens are hidden below 640px.
   Hero doodles live in their own stacked cell and are kept. */
@media (max-width: 639px) {
  .doodle--frog,
  .doodle--car,
  .doodle--rabbit,
  .doodle--hedgehog {
    display: none;
  }
}

/* ============================================================ forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
}
.field__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-800);
}
.field__control {
  font-family: inherit;
  font-size: 16px;
  color: var(--navy-800);
  padding: 12px 16px;
  border-radius: var(--radius-m);
  border: 2px solid var(--navy-800);
  background: var(--white);
  transition: box-shadow var(--dur);
}
.field__control:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: var(--shadow-sticker-s);
}
.field__control--error {
  border-color: var(--danger);
}
textarea.field__control {
  min-height: 110px;
  resize: vertical;
}
.field__hint {
  font-size: 13px;
  color: var(--ink-500);
}
.field__error {
  font-size: 13px;
  color: var(--danger);
}
.field--full {
  grid-column: 1 / -1;
}
.field__select-wrap {
  position: relative;
  display: block;
}
select.field__control {
  appearance: none;
  width: 100%;
  padding-right: 44px;
  cursor: pointer;
}
.field__chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--navy-800);
  border-bottom: 3px solid var(--navy-800);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---- radio ---- */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.radio-group--row {
  flex-direction: row;
  flex-wrap: wrap;
}
.radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy-800);
  cursor: pointer;
}
.radio input,
.check input,
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.radio__dot {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--navy-800);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.radio__dot::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange-500);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-bounce);
}
.radio input:checked + .radio__dot::after {
  transform: scale(1);
}
.radio input:focus-visible + .radio__dot,
.check input:focus-visible + .check__box,
.switch input:focus-visible + .switch__track {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---- checkbox ---- */
.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy-800);
  cursor: pointer;
}
.check__box {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  border: 2px solid var(--navy-800);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.check__box::after {
  content: "";
  width: 6px;
  height: 12px;
  border-right: 3px solid var(--navy-800);
  border-bottom: 3px solid var(--navy-800);
  transform: translateY(-2px) rotate(45deg);
  opacity: 0;
}
.check input:checked + .check__box {
  background: var(--orange-500);
  box-shadow: var(--shadow-sticker-s);
  rotate: -4deg;
}
.check input:checked + .check__box::after {
  opacity: 1;
}

/* ---- switch ---- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy-800);
  cursor: pointer;
}
.switch__track {
  width: 52px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  border: 2px solid var(--navy-800);
  background: var(--ink-150);
  position: relative;
  transition: background var(--dur);
}
.switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--navy-800);
  transition: left var(--dur) var(--ease-bounce);
}
.switch input:checked + .switch__track {
  background: var(--teal-500);
}
.switch input:checked + .switch__track .switch__thumb {
  left: 24px;
}

/* ============================================================ toast */
.toast {
  display: flex;
  gap: 14px;
}
/* Author rules win over the UA [hidden]{display:none} default by origin,
   not specificity — without this the toast's own `display: flex` always
   shows it even with the `hidden` attribute set. */
.toast[hidden] {
  display: none;
  align-items: flex-start;
  background: var(--success-bg);
  border: 2px solid var(--navy-800);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-sticker);
  padding: 14px 16px;
  font-family: var(--font-body);
  color: var(--navy-800);
  max-width: 420px;
}
.toast__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--navy-800);
  flex: none;
  margin-top: 3px;
}
.toast__title {
  font-weight: 700;
  font-size: 15px;
}
.toast__body {
  font-size: 14px;
  line-height: 1.45;
  margin-top: 2px;
}
.toast__content {
  flex: 1;
}
.toast--info { background: var(--teal-100); }
.toast--info .toast__dot { background: var(--teal-500); }
.toast--warning { background: var(--yellow-50); }
.toast--warning .toast__dot { background: var(--yellow-400); }
.toast--danger { background: var(--danger-bg); }
.toast--danger .toast__dot { background: var(--danger); }

/* ============================================================ dialog */
.dialog {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 3px solid var(--navy-800);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sticker-l);
  padding: 28px;
  font-family: var(--font-body);
  color: var(--navy-800);
  position: relative;
}
.dialog::backdrop {
  background: rgba(2, 48, 71, 0.55);
}
.dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--navy-800);
  background: var(--white);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  color: var(--navy-800);
}
.dialog__title {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 0.95;
  margin-right: 40px;
  margin-bottom: 12px;
}
.dialog__body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--deep-teal-600);
}
.dialog__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================ layout grids */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}
.hero-media {
  position: relative;
  min-height: 380px;
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.triad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.voyage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: center;
}
.plan-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.register-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 40px;
  align-items: start;
}
.stack-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.split-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.center {
  text-align: center;
}

/* ============================================================ 2-day plan */
.card--pad-sm {
  padding: 20px;
}
.plan__theme {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 0.9;
  margin-top: 14px;
}
.plan__block {
  display: flex;
  gap: 18px;
  align-items: baseline;
}
.plan__num {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--orange-500);
  min-width: 36px;
}
.plan__title {
  font-weight: 700;
  font-size: 19px;
}
.plan__desc {
  font-size: 15px;
  color: var(--deep-teal-600);
  margin-top: 4px;
}

/* ============================================================ register form */
.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-grid--single {
  grid-template-columns: 1fr;
}
.form-step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.form-actions .btn--ghost {
  margin-right: auto;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.register-side__name {
  font-weight: 800;
  font-size: 20px;
  margin: 12px 0 8px;
}
.register-side__meta {
  font-size: 14px;
  line-height: 1.6;
}
.register-side {
  position: relative;
  padding-top: 60px;
}
.plan-note {
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 24px;
}
.radio-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-800);
  margin-bottom: 10px;
}

/* ---- responsive collapses (original lacked these) ---- */
@media (max-width: 719px) {
  .plan-grid,
  .register-grid {
    grid-template-columns: 1fr;
  }
  .hero-media {
    min-height: 280px;
  }
}

/* ============================================================ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
