/* ============================================================
   THE SOUTHERN GUILD — shared styles
   Palette: ink #0F1516 · slate #7F8C94 · mist #C9C2C2 · taupe #5E524B
   ============================================================ */

:root {
  --ink: #0F1516;
  --ink-2: #1C2628;
  --ink-3: #263031;
  --slate: #7F8C94;
  --slate-d: #646D73;
  --mist: #C9C2C2;
  --mist-l: #E9E7E7;
  --paper: #F4F3F3;
  --taupe: #5E524B;
  --taupe-l: #8A7B71;
  --white: #FFFFFF;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--taupe); color: var(--white); }

/* ---------- page enter ---------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page-enter { animation: pageIn 0.9s var(--ease) both; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(15, 21, 22, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(201, 194, 194, 0.12);
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.nav-logo {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
  letter-spacing: 0.04em; color: var(--white); text-decoration: none;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.nav-logo .mark {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--taupe); transform: translateY(-1px);
}
.nav-logo em { font-style: normal; color: var(--mist); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); list-style: none; }
.nav-links a {
  color: var(--mist); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.02em; position: relative; padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--mist); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { transform: scaleX(1); background: var(--taupe); }
.nav-cta {
  background: var(--paper); color: var(--ink) !important; padding: 0.6rem 1.25rem !important;
  border-radius: 100px; font-weight: 600 !important;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { transform: translateY(-2px); background: var(--white); }

/* hamburger */
.nav-burger { display: none; background: none; border: 0; cursor: pointer; z-index: 110; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--paper); margin: 5px 0; transition: 0.35s var(--ease); }

@media (max-width: 820px) {
  .nav-burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: rgba(15,21,22,0.97);
    backdrop-filter: blur(18px); flex-direction: column; justify-content: center;
    gap: 2rem; transform: translateY(-100%); transition: transform 0.5s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.4rem; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }
.display { font-size: clamp(2.6rem, 6.5vw, 5rem); }
.h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.eyebrow {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--slate);
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--taupe-l); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--mist); max-width: 38em; }
.muted { color: var(--slate); }

/* ---------- layout ---------- */
.section { padding: clamp(4.5rem, 10vw, 8.5rem) clamp(1.25rem, 6vw, 5rem); position: relative; }
.section.tight { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.wrap { max-width: 1180px; margin: 0 auto; }
.light { background: var(--paper); color: var(--ink); }
.light .lede { color: var(--slate-d); }
.light .eyebrow { color: var(--taupe); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
@media (max-width: 1024px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: 1fr 1fr; } }

/* ---------- buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  padding: 0.95rem 1.9rem; border-radius: 100px; text-decoration: none;
  cursor: pointer; border: 0; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn .arr { transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0,0,0,0.4); background: var(--white); }
.btn-ghost { background: transparent; color: var(--paper); border: 1px solid rgba(201,194,194,0.35); }
.btn-ghost:hover { border-color: var(--mist); transform: translateY(-3px); }
.light .btn-primary { background: var(--ink); color: var(--paper); }
.light .btn-primary:hover { background: var(--ink-2); box-shadow: 0 16px 36px rgba(15,21,22,0.22); }
.light .btn-ghost { color: var(--ink); border-color: rgba(15,21,22,0.3); }
.light .btn-ghost:hover { border-color: var(--ink); }
.btn-taupe { background: var(--taupe); color: var(--white); }
.btn-taupe:hover { background: var(--taupe-l); transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0,0,0,0.35); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- drifting orbs (hero backdrops) ---------- */
.orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.orb.a { width: 480px; height: 480px; background: var(--taupe); top: -160px; right: -120px; animation: drift1 22s ease-in-out infinite alternate; }
.orb.b { width: 380px; height: 380px; background: var(--ink-3); bottom: -140px; left: -100px; animation: drift2 26s ease-in-out infinite alternate; opacity: 0.85; }
.orb.c { width: 260px; height: 260px; background: var(--slate-d); top: 38%; left: 56%; animation: drift3 30s ease-in-out infinite alternate; opacity: 0.22; }
@keyframes drift1 { to { transform: translate(-70px, 60px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(60px, -50px) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-50px, -70px) scale(0.9); } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid rgba(201,194,194,0.12); border-bottom: 1px solid rgba(201,194,194,0.12); padding: 1.1rem 0; background: var(--ink-2); }
.marquee-track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--serif); font-size: 1.05rem; color: var(--slate); white-space: nowrap; display: flex; align-items: center; gap: 3.5rem; }
.marquee-track span::after { content: "◆"; font-size: 0.5rem; color: var(--taupe-l); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- cards ---------- */
.card {
  background: var(--ink-2); border: 1px solid rgba(201,194,194,0.1);
  border-radius: 18px; padding: clamp(1.5rem, 2.5vw, 2.25rem);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(201,194,194,0.28); box-shadow: 0 24px 48px rgba(0,0,0,0.35); }
.light .card { background: var(--white); border-color: rgba(15,21,22,0.08); }
.light .card:hover { box-shadow: 0 24px 48px rgba(15,21,22,0.12); border-color: rgba(15,21,22,0.18); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(94,82,75,0.25); color: var(--mist); margin-bottom: 1.25rem; font-size: 1.2rem;
}
.light .card .icon { background: rgba(94,82,75,0.12); color: var(--taupe); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--slate); font-size: 0.97rem; }
.light .card p { color: var(--slate-d); }

/* ---------- stats ---------- */
.stat-num { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4rem); color: var(--white); line-height: 1; }
.light .stat-num { color: var(--ink); }
.stat-label { color: var(--slate); font-size: 0.92rem; margin-top: 0.5rem; max-width: 22em; }

/* ---------- footer ---------- */
.footer { background: var(--ink-2); border-top: 1px solid rgba(201,194,194,0.1); padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 6vw, 5rem) 2rem; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate); margin-bottom: 1rem; font-weight: 600; }
.footer a { color: var(--mist); text-decoration: none; transition: color 0.3s; display: block; padding: 0.22rem 0; font-size: 0.95rem; }
.footer a:hover { color: var(--white); }
.footer-brand { font-family: var(--serif); font-size: 1.5rem; color: var(--white); margin-bottom: 0.75rem; }
.footer-tag { color: var(--slate); max-width: 26em; font-size: 0.95rem; }
.footer-bottom { max-width: 1180px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(201,194,194,0.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--slate-d); font-size: 0.85rem; }

/* ---------- big CTA band ---------- */
.cta-band { position: relative; overflow: hidden; text-align: center; }
.cta-band .h2 { max-width: 18em; margin: 0 auto 1.25rem; }
.cta-band .lede { margin: 0 auto 2.25rem; }
.cta-band .btn-row { justify-content: center; }

/* ---------- phone mockup ---------- */
.phone {
  width: min(320px, 82vw); margin: 0 auto; background: var(--ink-2);
  border: 1px solid rgba(201,194,194,0.18); border-radius: 38px; padding: 1rem;
  box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}
.phone-screen { background: var(--ink); border-radius: 26px; padding: 1.25rem 0.9rem 1.5rem; min-height: 430px; display: flex; flex-direction: column; gap: 0.7rem; }
.phone-top { text-align: center; color: var(--slate); font-size: 0.75rem; letter-spacing: 0.08em; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(201,194,194,0.1); margin-bottom: 0.4rem; }
.bubble {
  max-width: 86%; padding: 0.7rem 0.95rem; border-radius: 18px; font-size: 0.86rem; line-height: 1.45;
  opacity: 0; transform: translateY(12px) scale(0.97);
}
.bubble.show { animation: bubbleIn 0.55s var(--ease) forwards; }
@keyframes bubbleIn { to { opacity: 1; transform: none; } }
.bubble.in-msg { background: var(--ink-3); color: var(--mist); border-bottom-left-radius: 6px; align-self: flex-start; }
.bubble.out-msg { background: var(--taupe); color: var(--white); border-bottom-right-radius: 6px; align-self: flex-end; }
.bubble .tag { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; margin-bottom: 0.25rem; }

/* ---------- scorecard ---------- */
.scorecard { background: var(--ink-2); border: 1px solid rgba(201,194,194,0.15); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.scorecard .sc-title { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--slate); text-align: center; margin-bottom: 1.5rem; }
.sc-row { display: grid; grid-template-columns: 130px 1fr 52px; align-items: center; gap: 0.9rem; margin-bottom: 1rem; font-size: 0.92rem; color: var(--mist); }
.sc-bar { height: 9px; background: var(--ink-3); border-radius: 100px; overflow: hidden; }
.sc-fill { height: 100%; border-radius: 100px; background: var(--slate); width: 0; transition: width 1.4s var(--ease); }
.sc-fill.good { background: #4F8A6E; }
.sc-fill.warn { background: var(--taupe-l); }
.sc-fill.bad { background: #B05252; }
.sc-total { display: flex; justify-content: space-between; border-top: 1px solid rgba(201,194,194,0.15); margin-top: 1.4rem; padding-top: 1.1rem; font-weight: 600; color: var(--white); letter-spacing: 0.06em; }

/* ---------- feature deep-dive blocks ---------- */
.feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5.5rem); align-items: center; padding: clamp(2.5rem, 5vw, 4rem) 0; }
.feature-block + .feature-block { border-top: 1px solid rgba(201,194,194,0.1); }
.light .feature-block + .feature-block { border-top-color: rgba(15,21,22,0.08); }
.feature-block.flip > .fb-visual { order: -1; }
@media (max-width: 900px) { .feature-block { grid-template-columns: 1fr; } .feature-block.flip > .fb-visual { order: 0; } }
.fb-num { font-family: var(--serif); font-size: 0.95rem; color: var(--taupe-l); letter-spacing: 0.15em; margin-bottom: 0.75rem; }
.fb-detail { margin-top: 1.25rem; display: grid; gap: 0.8rem; }
.fb-detail li { list-style: none; color: var(--slate); font-size: 0.96rem; display: flex; gap: 0.65rem; align-items: baseline; }
.light .fb-detail li { color: var(--slate-d); }
.fb-detail li::before { content: "—"; color: var(--taupe-l); flex-shrink: 0; }

/* ---------- wallet pass mockup ---------- */
.wallet-card {
  width: min(340px, 88vw); margin: 0 auto; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(201,194,194,0.2); box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  position: relative; transform: rotate(-2deg); transition: transform 0.5s var(--ease);
}
.wallet-card:hover { transform: rotate(0deg) translateY(-6px); }
.wallet-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(244,243,243,0.08) 48%, transparent 62%);
  animation: shimmer 4.5s ease-in-out infinite;
}
@keyframes shimmer { 0%, 65% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }
.wallet-top { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.3rem; border-bottom: 1px solid rgba(201,194,194,0.12); }
.wallet-top .wt-name { font-family: var(--serif); color: var(--white); font-size: 1.02rem; }
.wallet-top .wt-pts { color: var(--mist); font-size: 0.85rem; }
.wallet-body { padding: 1.3rem; }
.wallet-body .wb-label { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate); }
.wallet-body .wb-balance { font-family: var(--serif); font-size: 2.4rem; color: var(--white); line-height: 1.15; }
.wallet-progress { height: 7px; border-radius: 100px; background: rgba(201,194,194,0.14); margin-top: 1rem; overflow: hidden; }
.wallet-progress div { height: 100%; width: 72%; border-radius: 100px; background: linear-gradient(90deg, var(--taupe), var(--taupe-l)); }
.wallet-foot { display: flex; justify-content: space-between; padding: 0.9rem 1.3rem; background: rgba(15,21,22,0.45); font-size: 0.78rem; color: var(--slate); }

/* ---------- mini calendar ---------- */
.mini-cal { width: min(360px, 88vw); margin: 0 auto; background: var(--ink-2); border: 1px solid rgba(201,194,194,0.15); border-radius: 18px; padding: 1.4rem; box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
.mini-cal .mc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.mini-cal .mc-month { font-family: var(--serif); color: var(--white); }
.mini-cal .mc-sub { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mc-grid span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.74rem; color: var(--slate); border-radius: 8px; }
.mc-grid span.evt { background: rgba(94,82,75,0.4); color: var(--mist); position: relative; }
.mc-grid span.evt.hot { background: var(--taupe); color: var(--white); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(94,82,75,0.5);} 50% { box-shadow: 0 0 0 9px rgba(94,82,75,0);} }
.mc-legend { margin-top: 1rem; display: grid; gap: 0.4rem; font-size: 0.78rem; color: var(--slate); }
.mc-legend b { color: var(--mist); font-weight: 600; }

/* ---------- dashboard mock ---------- */
.dash { width: min(420px, 90vw); margin: 0 auto; background: var(--ink-2); border: 1px solid rgba(201,194,194,0.15); border-radius: 18px; padding: 1.4rem; box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
.dash .d-head { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); margin-bottom: 1rem; display: flex; justify-content: space-between; }
.dash .d-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.1rem; }
.dash .d-tile { background: var(--ink); border-radius: 12px; padding: 0.8rem; }
.dash .d-tile b { font-family: var(--serif); font-size: 1.3rem; color: var(--white); display: block; font-weight: 500; }
.dash .d-tile span { font-size: 0.68rem; color: var(--slate); }
.dash svg { width: 100%; height: 84px; display: block; }
.dash .spark { fill: none; stroke: var(--taupe-l); stroke-width: 2.5; stroke-dasharray: 600; stroke-dashoffset: 600; }
.dash.in .spark { animation: dash 2.2s var(--ease) forwards 0.3s; }
.dash .spark-fill { fill: url(#sparkgrad); opacity: 0; transition: opacity 1.2s ease 1.4s; }
.dash.in .spark-fill { opacity: 1; }
@keyframes dash { to { stroke-dashoffset: 0; } }

/* ---------- chains vs you panel ---------- */
.vs-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 820px) { .vs-wrap { grid-template-columns: 1fr; } }
.vs-col { border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.5rem); }
.vs-col.them { background: var(--ink-2); border: 1px solid rgba(201,194,194,0.1); }
.vs-col.you { background: var(--paper); color: var(--ink); border: 1px solid rgba(201,194,194,0.25); }
.vs-col h3 { margin-bottom: 1.25rem; }
.vs-col ul { list-style: none; display: grid; gap: 0.9rem; font-size: 0.97rem; }
.vs-col.them li { color: var(--slate); display: flex; gap: 0.6rem; }
.vs-col.them li::before { content: "✓"; color: var(--slate-d); }
.vs-col.you li { color: var(--ink-3); display: flex; gap: 0.6rem; }
.vs-col.you li::before { content: "✓"; color: var(--taupe); font-weight: 700; }

/* ---------- misc ---------- */
.tick { color: var(--taupe-l); margin-right: 0.6rem; }
.kbd-note { font-size: 0.85rem; color: var(--slate-d); }
img { max-width: 100%; display: block; }
