/* =========================================================
   EAANT — Editorial cultural site
   Palette: deep Estonian-flag navy + warm NT terracotta orange
   Type: Fraunces (display serif, opinionated) + Manrope (body)
   ========================================================= */

:root {
  --ink:        #141821;
  --navy:       #142a4c;
  --navy-deep:  #0d1d36;
  --navy-soft:  #2a4470;
  --ember:      #c25a3c;
  --ember-soft: #d98b6f;
  --cream:      #faf6ee;
  --cream-2:    #f2ebde;
  --sand:       #e9dfcb;
  --line:       #d8cdb6;
  --gold:       #b08a4a;
  --white:      #ffffff;

  --serif: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r: clamp(14px, 1.05vw, 18px);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--r);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(at 12% 8%, rgba(194,90,60,.05) 0, transparent 38%),
    radial-gradient(at 88% 92%, rgba(20,42,76,.05) 0, transparent 42%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 200;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--navy); color: var(--cream); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
  color: var(--navy);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
h1 { font-size: clamp(3rem, 9vw, 7.5rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.08; }
h3 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.2; font-weight: 500; }
h4 { font-size: 1.05rem; font-weight: 600; font-family: var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ember); }

p { margin: 0 0 1em; }
p.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.5;
  font-weight: 300;
  font-style: italic;
  color: var(--navy-soft);
  max-width: 38ch;
}

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--ember);
}

.et {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--ember);
}

.wrap { width: min(1240px, 92vw); margin-inline: auto; }
section { padding: clamp(4rem, 9vw, 8rem) 0; position: relative; }

.divider {
  display: flex; align-items: center; gap: 1.25rem;
  color: var(--line);
  margin: 0 auto;
  width: min(1240px, 92vw);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.divider svg { width: 18px; height: 18px; opacity: .6; }

/* ====================== NAV ====================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,246,238,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250,246,238,.94);
}
.nav-inner {
  width: min(1240px, 92vw);
  margin-inline: auto;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: flex; align-items: center; gap: .85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 30px; height: 44px;
  flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark img { width: 100%; height: auto; object-fit: contain; }
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
  margin-top: 2px;
}

.nav-links {
  display: flex; gap: 2.25rem;
  font-size: .92rem; font-weight: 500; color: var(--navy);
}
.nav-links a {
  position: relative; padding: .35rem 0;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--ember);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--ember); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.15rem;
  background: var(--navy); color: var(--cream);
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  border-radius: 999px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.nav-cta:hover { background: var(--ember); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px;
  cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--cream);
    padding: 2rem 5vw 2.25rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 32px -24px rgba(20,42,76,.15);
  }
}

/* ====================== HERO ====================== */
.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero h1 .accent { font-style: italic; color: var(--ember); font-weight: 400; }
.hero h1 .stack { display: block; }

.hero .et-hello {
  display: block;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-family: var(--sans);
  color: var(--navy-soft);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero .et-hello span {
  color: var(--ember);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-right: .65rem;
  font-size: 1.15em;
}

.hero-side {
  display: flex; flex-direction: column;
  gap: 2rem; padding-bottom: .35rem;
}
.hero-side p { max-width: 36ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }

.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .95rem 1.6rem;
  font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  border-radius: 999px;
  transition: all .25s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--ember); transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(194,90,60,.5); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.flag-band {
  display: inline-flex;
  height: 4px; width: 60px;
  border-radius: 2px; overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px -2px rgba(0,0,0,.15);
}
.flag-band span { flex: 1; }
.flag-band .b1 { background: #0072CE; }
.flag-band .b2 { background: #111; }
.flag-band .b3 { background: #fff; }

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 700px) { .hero-meta { grid-template-columns: 1fr; gap: 1.5rem; } }
.hero-meta .item h4 { margin-bottom: .5rem; }
.hero-meta .item p { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.4; color: var(--navy); }

.hero-orn {
  position: absolute;
  right: -5vw; top: 4vw;
  width: 36vw; max-width: 480px;
  opacity: .06;
  pointer-events: none;
  transform: rotate(-6deg);
}
.hero-orn img { width: 100%; height: auto; }

/* ====================== ABOUT ====================== */
.about { background: var(--cream-2); position: relative; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid h2 { margin-top: 1rem; }
.about-grid .lede { margin-top: 2rem; max-width: 42ch; }

.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
  margin-top: 1rem;
}
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; gap: 2rem; } }

.pillar {
  position: relative;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.pillar .num {
  font-family: var(--serif); font-style: italic;
  font-size: .95rem; color: var(--ember);
  margin-bottom: .75rem; display: block;
}
.pillar h3 {
  font-size: 1.25rem; margin-bottom: .75rem;
  font-family: var(--serif); font-weight: 500;
}
.pillar p { font-size: .95rem; color: var(--navy-soft); margin: 0; }

/* ====================== MEMBERSHIP ====================== */
.membership-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 800px) { .membership-head { grid-template-columns: 1fr; gap: 1.5rem; } }
.membership-head p { max-width: 48ch; color: var(--navy-soft); }

.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 1000px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .tiers { grid-template-columns: 1fr; } }

.tier {
  background: var(--cream);
  padding: 2.25rem 1.75rem 2rem;
  display: flex; flex-direction: column;
  gap: 1rem;
  transition: background .3s var(--ease);
  position: relative;
}
.tier:hover { background: var(--white); }

.tier .tier-label {
  font-family: var(--sans);
  font-size: .7rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember);
}
.tier h3 {
  font-family: var(--serif);
  font-size: 1.6rem; font-weight: 400; line-height: 1.1;
  color: var(--navy);
}
.tier p {
  font-size: .92rem; color: var(--navy-soft);
  margin: 0; flex: 1;
}
.tier .tier-vote {
  font-size: .78rem; color: var(--navy);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: .5rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.tier .tier-vote .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ember);
}
.tier .tier-vote.no .dot { background: transparent; border: 1px solid var(--line); }
.tier .tier-vote.no { color: var(--navy-soft); }

.join-note {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--navy);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem; align-items: center;
  border-radius: 4px;
}
@media (max-width: 700px) { .join-note { grid-template-columns: 1fr; } }
.join-note h3 { color: var(--cream); font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-bottom: .35rem; }
.join-note p { margin: 0; color: rgba(250,246,238,.8); font-size: .95rem; max-width: 52ch; }
.join-note .btn-primary { background: var(--ember); }
.join-note .btn-primary:hover { background: var(--ember-soft); }

/* ====================== COMMUNITY ====================== */
.community {
  background: var(--navy);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.community h2, .community h3 { color: var(--cream); }
.community .eyebrow { color: var(--ember-soft); }
.community .eyebrow::before { background: var(--ember-soft); }

.community-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
@media (max-width: 800px) { .community-head { grid-template-columns: 1fr; } }
.community-head p {
  color: rgba(250,246,238,.78);
  max-width: 50ch; font-size: 1.05rem;
}

.events {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .events { grid-template-columns: 1fr; } }

.event {
  padding: 2rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  transition: all .3s var(--ease);
  display: flex; flex-direction: column;
  gap: 1rem;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.event:hover {
  background: rgba(255,255,255,.07);
  border-color: var(--ember);
  transform: translateY(-3px);
}
.event .event-image {
  margin: -2rem -2rem 0;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.event .date {
  font-family: var(--serif);
  font-style: italic;
  font-size: .9rem;
  color: var(--ember-soft);
}
.event h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.4rem; line-height: 1.2;
}
.event p {
  color: rgba(250,246,238,.7);
  font-size: .92rem; margin: 0; flex: 1;
}
.event .meta {
  font-size: .8rem;
  color: rgba(250,246,238,.55);
  display: flex; gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.community-orn {
  position: absolute;
  right: -6vw; bottom: -10vw;
  width: 38vw; max-width: 500px;
  opacity: .07;
  pointer-events: none;
  transform: rotate(6deg);
  filter: brightness(0) invert(1);
}
.community-orn img { width: 100%; height: auto; }

/* ====================== CONTACT ====================== */
.contact { background: var(--cream-2); position: relative; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-info .lede { margin-top: 1rem; }

.info-list { display: grid; gap: 1.25rem; margin-top: 1rem; }
.info-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.info-row dt {
  font-family: var(--sans);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember);
  align-self: center;
}
.info-row dd { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 1.05rem; }
.info-row a:hover { color: var(--ember); }

.contact-form {
  background: var(--cream);
  padding: 2.5rem;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.contact-form h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.5rem; color: var(--navy);
  margin-bottom: .5rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-soft);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: .65rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-bottom-color: var(--ember);
}
.field textarea { resize: vertical; min-height: 110px; }
.contact-form button { align-self: flex-start; margin-top: .5rem; }

/* ====================== FOOTER ====================== */
footer {
  background: var(--navy-deep);
  color: var(--cream);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand .footer-logo { display: block; max-width: 280px; }
.footer-brand .footer-logo img { width: 100%; height: auto; }
.footer-brand p {
  margin-top: 1.5rem;
  color: rgba(250,246,238,.65);
  font-size: .9rem;
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember-soft);
  margin-bottom: 1.25rem;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .65rem;
  font-size: .92rem;
  color: rgba(250,246,238,.78);
}
.footer-col a:hover { color: var(--ember-soft); }

.footer-bottom {
  display: flex; justify-content: space-between; gap: 2rem;
  padding-top: 2rem;
  font-size: .82rem;
  color: rgba(250,246,238,.5);
  flex-wrap: wrap;
}
.footer-bottom .flag-band { margin-bottom: 0; }

/* ====================== REVEAL ====================== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

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