/* =====================================================================
   HF Frederiksholm — site chrome (header, nav, hero, footer) + sections
   ===================================================================== */

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s ease, background .25s ease;
}
/* hairline accent across the very top */
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--amber-500), var(--green-400) 45%, var(--green-600));
  z-index: 1;
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--cream) 95%, transparent);
  box-shadow: var(--sh-md);
}

/* top utility bar (desktop only) */
.topbar { background: var(--mint-100); border-bottom: 1px solid var(--line-soft); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 38px; }
.topbar__tag { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green-600); }
.topbar__links { display: flex; align-items: center; gap: var(--sp-5); }
.topbar__links a { font-size: .82rem; font-weight: 500; color: var(--ink-500); text-decoration: none; transition: color .15s ease; }
.topbar__links a:hover { color: var(--green-600); }

.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; transition: transform .15s ease; }
.brand:hover { transform: translateY(-1px); }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--forest-900); letter-spacing: -.01em; }
.brand__tag { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--green-500); margin-top: .25rem; }

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  position: relative; font-weight: 500; font-size: .98rem; color: var(--ink-700); text-decoration: none;
  padding: .5rem .7rem; border-radius: var(--r-sm); transition: color .15s ease;
}
/* animated indicator under nav links (CTA excluded) */
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .18rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--green-500), var(--amber-500));
  transform: scaleX(0); transform-origin: center; transition: transform .22s ease;
}
.nav a:not(.nav__cta):hover { color: var(--forest-900); }
.nav a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav a.is-active { color: var(--forest-900); font-weight: 600; }
.nav a.is-active::after { transform: scaleX(1); }
.nav__cta { margin-left: .5rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--forest-900); position: relative; transition: .2s; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .topbar { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--sp-4);
    box-shadow: var(--sh-lg); transform: translateY(-120%); transition: transform .25s ease; max-height: calc(100vh - 76px); overflow:auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: .8rem 1rem; }
  .nav a:not(.nav__cta)::after { left: 1rem; right: auto; width: 22px; }
  .nav__cta { margin-left: 0; margin-top: .4rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(11,38,33,.86) 0%, rgba(11,38,33,.62) 42%, rgba(11,38,33,.18) 100%);
}
.hero__inner { position: relative; padding-block: clamp(4rem, 12vw, 8.5rem); color: #eef4ef; max-width: 640px; }
.hero h1 { color: #fff; }
.hero .lead { color: #d7e4db; margin-top: var(--sp-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: var(--sp-5); }
.hero__stats { display: flex; gap: var(--sp-6); margin-top: var(--sp-7); flex-wrap: wrap; }
.hero__stat b { font-family: var(--font-display); font-size: 1.9rem; color: #fff; display: block; }
.hero__stat span { font-size: .85rem; color: #bcd0c4; letter-spacing: .04em; }

/* leaf divider */
.leaf-rule { display: flex; align-items: center; gap: .8rem; color: var(--green-400); }
.leaf-rule::before, .leaf-rule::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- Section header ---------- */
.section__head { max-width: 640px; margin-bottom: var(--sp-6); }
.section__head.center { margin-inline: auto; text-align: center; }
.section__head h2 { margin-top: .6rem; }
.section__head p { margin-top: var(--sp-3); color: var(--ink-500); font-size: 1.1rem; }

/* ---------- Feature media split ---------- */
.split { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } .split--rev .split__media { order: 2; } }
.split__media img { border-radius: var(--r-lg); box-shadow: var(--sh-md); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; overflow: hidden; color: #c7d6cc;
  background:
    radial-gradient(120% 90% at 88% -10%, color-mix(in srgb, var(--green-500) 60%, transparent), transparent 58%),
    linear-gradient(180deg, var(--forest-800) 0%, var(--forest-900) 60%);
}
/* amber→green hairline along the very top, flush with main */
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 3;
  background: linear-gradient(90deg, var(--amber-500), var(--green-400) 50%, var(--green-600));
}
.site-footer a { color: #e7efe9; }

/* pre-footer call-to-action band */
.footer-cta {
  position: relative; z-index: 2;
  background: linear-gradient(115deg, var(--green-600) 0%, var(--green-500) 60%, var(--green-400) 100%);
  border-bottom: 1px solid rgba(0,0,0,.12);
}
.footer-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-5); padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.footer-cta__text { max-width: 560px; }
.footer-cta .eyebrow { color: var(--amber-200); }
.footer-cta .eyebrow::before { background: var(--amber-200); }
.footer-cta h2 { color: #fff; margin: .4rem 0 .55rem; }
.footer-cta__text p { color: #e4f1ea; }
.footer-cta .btn { flex: none; }

/* large decorative wordmark watermark */
.site-footer__wordmark {
  position: absolute; left: 50%; bottom: -.18em; transform: translateX(-50%); z-index: 0;
  font-family: var(--font-display); font-weight: 600; line-height: .8; letter-spacing: -.02em;
  font-size: clamp(4rem, 18vw, 15rem); color: #fff; opacity: .045; white-space: nowrap;
  pointer-events: none; user-select: none;
}

.site-footer__grid { position: relative; z-index: 1; display: grid; gap: var(--sp-6); padding-block: var(--sp-8); }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.site-footer p, .site-footer li { color: #aebfb3; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.site-footer__brand .brand__name { color: #fff; }
.site-footer__brand .brand__tag { color: var(--green-300); }

/* social chips */
.social-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--sp-3); }
.social-chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  font-size: .88rem; font-weight: 500; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.social-chip:hover { background: rgba(255,255,255,.12); border-color: var(--green-300); transform: translateY(-1px); }
.social-chip svg { color: var(--green-300); }

.site-footer__bottom { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.1); padding-block: var(--sp-4); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3); font-size: .85rem; color: #93a89a; }

@media (max-width: 720px) {
  .footer-cta__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__wordmark { font-size: clamp(3rem, 26vw, 7rem); }
}

/* ---------- Member dashboard grid ---------- */
.dash-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.dash-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- Auth screens ---------- */
.auth-card { max-width: 440px; margin: clamp(2rem,8vw,5rem) auto; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--sh-md); }
.auth-card h1 { font-size: 1.8rem; }
.otp-input { letter-spacing: .6em; text-align: center; font-size: 1.6rem; font-weight: 600; font-family: var(--font-display); }

@media print { .site-header, .site-footer, .nav-toggle { display: none; } }
