/* ============================================================
   EaseHaven — Site styles
   Built on the EaseHaven brand: arch "haven" mark, navy anchor,
   sparing burnt orange, warm-neutral fields.
   Type: Cormorant Garamond (display) + Hanken Grotesk (UI/body)
   ============================================================ */

/* ---- Tokens ------------------------------------------------ */
:root {
  --eh-navy:        #1B2A4A;
  --eh-navy-deep:   #26396A;
  --eh-navy-ink:    #111A2E;
  --eh-orange:      #C75B27;
  --eh-orange-deep: #A4451B;
  --eh-white:       #FFFFFF;
  --eh-paper:       #FBF8F3;
  --eh-cream:       #F0EAE0;
  --eh-sand:        #E1D8C9;
  --eh-ink:         #1B2A33;
  --eh-muted:       #6E7B82;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 64px);

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 84px;
}

/* ---- Reset ------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--eh-paper);
  color: var(--eh-ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--eh-orange); color: #fff; }

/* ---- Type -------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -0.01em; color: var(--eh-navy); }
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display em, .h2 em, h2 em { font-style: italic; font-weight: 400; color: var(--eh-orange); }
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--eh-navy);
  text-wrap: balance;
}
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1.1;
  color: var(--eh-navy);
}
.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.55;
  color: var(--eh-ink);
  font-weight: 400;
  max-width: 56ch;
  text-wrap: pretty;
}
p { text-wrap: pretty; }
.muted { color: var(--eh-muted); }

/* Eyebrow / kicker */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eh-orange);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--eh-orange);
  display: inline-block;
}
.eyebrow.is-centered::before { display: none; }
.eyebrow.on-dark { color: var(--eh-orange); }

/* ---- Layout ------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 140px); }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.bg-cream { background: var(--eh-cream); }
.bg-navy  { background: var(--eh-navy); color: var(--eh-paper); }
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy .h2, .bg-navy .h3 { color: var(--eh-paper); }
.bg-navy .muted { color: rgba(251,248,243,0.6); }
.bg-white { background: var(--eh-white); }

.stack-sm > * + * { margin-top: 0.6rem; }
.stack    > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 1.8rem; }

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  transition: transform .35s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn .ar { transition: transform .35s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.btn--primary { background: var(--eh-orange); color: #fff; }
.btn--primary:hover { background: var(--eh-orange-deep); transform: translateY(-2px); }
.btn--navy { background: var(--eh-navy); color: var(--eh-paper); }
.btn--navy:hover { background: var(--eh-navy-deep); transform: translateY(-2px); }
.btn--outline { border: 1.5px solid var(--eh-navy); color: var(--eh-navy); }
.btn--outline:hover { background: var(--eh-navy); color: var(--eh-paper); }
.btn--ghost-light { border: 1.5px solid rgba(251,248,243,0.4); color: var(--eh-paper); }
.btn--ghost-light:hover { border-color: var(--eh-paper); background: rgba(251,248,243,0.08); }
.btn--lg { padding: 1.1em 2em; font-size: 1rem; }

/* text link with underline sweep */
.tlink {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.92rem;
  color: var(--eh-navy);
  padding-bottom: 3px;
  background-image: linear-gradient(var(--eh-orange), var(--eh-orange));
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .4s var(--ease), color .3s var(--ease);
}
.tlink:hover { background-size: 100% 1.5px; color: var(--eh-orange); }
.tlink .ar { transition: transform .35s var(--ease); }
.tlink:hover .ar { transform: translateX(3px); }
.bg-navy .tlink { color: var(--eh-paper); }
.bg-navy .tlink:hover { color: var(--eh-orange); }

/* ---- Logo (inline) ----------------------------------------- */
.logo { display: inline-flex; align-items: center; gap: 0.55em; }
.logo svg { height: 34px; width: auto; }
.logo .wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--eh-navy);
  line-height: 1;
}
.logo--light .wordmark { color: var(--eh-paper); }

/* ---- Arch / placeholder media ------------------------------ */
.frame { position: relative; overflow: hidden; background: var(--eh-cream); }
.frame--arch { border-radius: 50vw 50vw var(--r-md) var(--r-md) / 28vw 28vw var(--r-md) var(--r-md); }
.frame--soft { border-radius: var(--r-lg); }

/* striped placeholder + monospace label */
.ph {
  position: relative;
  width: 100%; height: 100%;
  background-color: var(--eh-cream);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent, transparent 11px,
    rgba(27,42,74,0.05) 11px, rgba(27,42,74,0.05) 22px
  );
  display: flex; align-items: center; justify-content: center;
  color: var(--eh-navy);
  min-height: 180px;
}
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--eh-muted);
  background: var(--eh-paper);
  border: 1px solid var(--eh-sand);
  padding: 6px 12px;
  border-radius: 999px;
  text-align: center;
  max-width: 80%;
}
.ph--navy {
  background-color: var(--eh-navy);
  background-image: repeating-linear-gradient(
    -45deg, transparent, transparent 11px,
    rgba(255,255,255,0.05) 11px, rgba(255,255,255,0.05) 22px);
}
.ph--navy::after { background: var(--eh-navy-ink); border-color: var(--eh-navy-deep); color: rgba(251,248,243,0.7); }

/* aspect ratio helpers */
.ar-portrait  { aspect-ratio: 3 / 4; }
.ar-square    { aspect-ratio: 1 / 1; }
.ar-landscape { aspect-ratio: 4 / 3; }
.ar-wide      { aspect-ratio: 16 / 10; }
.ar-tall      { aspect-ratio: 2 / 3; }

/* ---- Header / nav ------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; width: 100%; }
.site-header.is-scrolled {
  background: rgba(251,248,243,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--eh-sand);
  height: 68px;
}
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--eh-navy);
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--eh-orange); transition: width .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--eh-orange); }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav-toggle span { width: 24px; height: 2px; background: var(--eh-navy); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 99;
  background: var(--eh-paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav a { font-family: var(--serif); font-size: clamp(2rem, 9vw, 3rem); color: var(--eh-navy); padding: 0.25em 0; border-bottom: 1px solid var(--eh-sand); }
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav .btn { margin-top: 1.5rem; align-self: flex-start; }

/* ---- Footer ------------------------------------------------ */
.site-footer { background: var(--eh-navy-ink); color: var(--eh-paper); padding-block: clamp(56px, 7vw, 96px) 32px; }
.site-footer a { color: rgba(251,248,243,0.72); transition: color .25s; font-size: 0.95rem; }
.site-footer a:hover { color: var(--eh-orange); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.footer-col h4 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(251,248,243,0.45); margin-bottom: 1.2rem; font-weight: 600; }
.footer-col .stack-sm a { display: block; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; color: rgba(251,248,243,0.5); }

/* ---- Reveal animation -------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
.reveal[data-d="5"] { transition-delay: .40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Generic grids ----------------------------------------- */
.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }

/* divider line */
.rule { height: 1px; background: var(--eh-sand); border: none; }
.bg-navy .rule, .site-footer .rule { background: rgba(255,255,255,0.12); }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav, .nav-right .btn { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
}
