/* ============================================================
   hǣlan — haelan.app
   Design tokens and system, lifted from the v4 design reference.
   ============================================================ */

:root {
  --bone: #F6F2EB;
  --white: #FFFFFF;
  --forest: #384032;
  --sage: #7A8A6E;
  --moss: #9BB3A4;
  --stone: #E7DECC;
  --warm-sand: #D9C3C7;
  --charcoal: #1A1A1A;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-card: 0 1px 2px rgba(56,64,50,0.05), 0 8px 24px rgba(56,64,50,0.06);
  --shadow-panel: 0 1px 2px rgba(56,64,50,0.05), 0 12px 40px rgba(56,64,50,0.07);

  --pad-x: clamp(24px, 6vw, 80px);
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--charcoal);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--forest);
  text-decoration-color: var(--moss);
  text-underline-offset: 3px;
}
a:hover { color: var(--charcoal); text-decoration-color: var(--forest); }

:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

img { max-width: 100%; }

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

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: var(--bone);
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  font-size: 14px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: var(--bone);
}

/* ---------- Motion ---------- */

@keyframes haelan-breath {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.9; }
  50% { transform: translateY(-6px) scaleX(1.06); opacity: 1; }
}

.macron-breath {
  animation: haelan-breath 7s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}

/* Scroll reveal — .reveal-ready is added by JS only when motion is allowed */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.subpage-header {
  padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0;
}

.site-header .wordmark img {
  height: 32px;
  width: auto;
  display: block;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  flex-wrap: wrap;
}

.primary-nav a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--forest);
  text-decoration: none;
}
.primary-nav a:hover { color: var(--charcoal); text-decoration: underline; }

.nav-pill {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--bone) !important;
  background: var(--forest);
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 12px;
  transition: background 300ms ease;
}
.nav-pill:hover { background: var(--charcoal); color: var(--bone) !important; text-decoration: none !important; }

/* Mobile menu */

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--forest);
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bone);
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  text-align: center;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--charcoal);
  text-decoration: none;
}
.mobile-menu a.nav-pill {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 30px;
}
.mobile-menu .menu-close {
  position: absolute;
  top: calc(24px + env(safe-area-inset-top, 0px));
  right: 24px;
  background: none;
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--forest);
  cursor: pointer;
}

body.menu-open { overflow: hidden; }

@media (max-width: 719px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Type system ---------- */

.eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}

.eyebrow-sm {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.display {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--forest);
}

/* ---------- Buttons ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--forest);
  color: var(--bone);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 38px;
  border-radius: 12px;
  height: 56px;
  border: none;
  cursor: pointer;
  transition: background 300ms ease;
}
.btn-primary:hover { background: var(--charcoal); color: var(--bone); }

.btn-quiet {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--forest);
  cursor: pointer;
  min-height: 38px;
  transition: border-color 300ms ease;
}
.btn-quiet:hover { border-color: var(--forest); }

/* ---------- Hero (v4 — photographic) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: min(92vh, 980px);
  min-height: min(92svh, 980px);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  z-index: -2;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, #F6F2EB 0%, rgba(246,242,235,0.94) 32%, rgba(246,242,235,0.55) 52%, rgba(246,242,235,0) 74%);
}

.hero-header {
  padding: clamp(20px, 3vw, 36px) clamp(24px, 5vw, 72px);
}

.hero-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(24px, 4vw, 56px) 0;
}

.hero-content {
  padding: 0 clamp(24px, 5vw, 72px);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--forest);
  color: var(--bone);
  padding: 0 24px;
  border-radius: 12px;
  height: 56px;
}
.store-badge.is-outline {
  background: rgba(246,242,235,0.6);
  color: var(--forest);
  border: 1px solid var(--forest);
}
.store-badge svg { display: block; flex-shrink: 0; }
.store-badge .badge-lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}
.store-badge .badge-eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.store-badge .badge-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--forest);
}
.hero-lock svg { flex-shrink: 0; }

/* ---------- Trust strip ---------- */

.trust-strip {
  background: var(--forest);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 5vw, 72px);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.trust-item + .trust-item {
  border-left: 1px solid rgba(246,242,235,0.18);
  padding-left: 24px;
}
.trust-item svg { flex-shrink: 0; }
.trust-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bone);
}

@media (max-width: 719px) {
  .trust-item + .trust-item { border-left: none; padding-left: 0; }
}

/* ---------- App-icon chip ---------- */

.app-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: 16px;
}
.app-chip img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: block;
  box-shadow: 0 1px 3px rgba(56,64,50,0.15);
}

/* ---------- Final CTA band ---------- */

.cta-band {
  background: var(--forest);
  padding: clamp(36px, 5vw, 56px) var(--pad-x);
}

.cta-band-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
}

.cta-band h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.3;
  margin: 0;
  color: var(--bone);
}

.cta-band-actions {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  flex-wrap: wrap;
}

.btn-light {
  display: inline-flex;
  align-items: center;
  background: var(--bone);
  color: var(--forest);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 30px;
  border-radius: 12px;
  height: 52px;
  white-space: nowrap;
  transition: background 300ms ease;
}
.btn-light:hover { background: var(--white); color: var(--charcoal); }

.cta-band-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--moss);
  text-underline-offset: 5px;
}
.cta-band-link:hover { color: var(--white); text-decoration-color: var(--bone); }

/* ---------- Layout primitives ---------- */

.section {
  padding: clamp(80px, 11vw, 150px) var(--pad-x);
}

.section-white { background: var(--white); }
.section-forest { background: var(--forest); }

.container-narrow { max-width: 720px; margin: 0 auto; }
.container-prose { max-width: 820px; margin: 0 auto; }
.container-mid { max-width: 860px; margin: 0 auto; }
.container-wide { max-width: 1160px; margin: 0 auto; }

.hairline {
  height: 1px;
  background: var(--stone);
  border: none;
  margin: 0 auto;
}

.macron-bar {
  display: inline-block;
  width: 34px;
  height: 2px;
  border-radius: 2px;
  vertical-align: 0.35em;
  margin-right: 16px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.inset {
  background: var(--bone);
  border-radius: 12px;
}

/* ---------- Vignettes ---------- */

.vignette {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vignette-card {
  background: var(--white);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.vignette figcaption {
  font-size: 14px;
  line-height: 1.6;
  color: var(--forest);
  padding: 0 8px;
}

.quilt-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.patch {
  aspect-ratio: 1;
  border-radius: 6px;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 250ms ease;
}
.patch:hover, .patch:focus-visible { transform: scale(1.08); }

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

.site-footer {
  padding: clamp(64px, 8vw, 100px) var(--pad-x);
  border-top: 1px solid var(--stone);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 3vw, 28px);
}

.site-footer nav a {
  font-size: 13px;
  color: var(--forest);
  text-decoration: none;
}
.site-footer nav a:hover { text-decoration: underline; color: var(--charcoal); }

.footer-legal {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--sage);
  max-width: 52ch;
}

/* ---------- Subpage editorial system ---------- */

.page-hero {
  padding: clamp(72px, 9vw, 130px) var(--pad-x) clamp(56px, 7vw, 90px);
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 76px);
  line-height: 1.08;
  margin: 0;
  color: var(--charcoal);
}

.page-hero .lede {
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.7;
  color: var(--forest);
  max-width: 52ch;
  margin: 26px auto 0;
}

.prose {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.75;
  color: var(--charcoal);
  max-width: 68ch;
}

.editorial-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
}

.editorial-row h2, .editorial-row h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  margin: 0;
  color: var(--charcoal);
}

.editorial-row p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--forest);
  margin: 0;
}

/* ---------- Access form ---------- */

.access-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-panel);
  padding: clamp(32px, 5vw, 56px);
}

.access-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-form label {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
}

.access-form .hint {
  font-size: 13px;
  color: var(--sage);
  margin: 0;
}

.access-form input[type="text"],
.access-form input[type="email"],
.access-form select,
.access-form textarea {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--charcoal);
  background: var(--bone);
  border: 1px solid var(--stone);
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
}

.access-form input:focus-visible,
.access-form select:focus-visible,
.access-form textarea:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
}

.access-form textarea { resize: vertical; min-height: 96px; }

.access-form .consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--forest);
}

.access-form .consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--forest);
  flex: none;
}

.form-error {
  margin: 0;
  font-size: 14px;
  color: #7A3B3B;
}

.form-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--sage);
}

/* ---------- Small screens ---------- */

@media (max-width: 719px) {
  .day-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .day-row .eyebrow-sm { text-align: left !important; }
}
