:root {
  --sky: #4f7fa8;
  --sky-deep: #315a7e;
  --cream: #f4ead7;
  --cream-2: #fff6e7;
  --pink: #d9858c;
  --pink-dark: #a95f69;
  --bun: #aa5e2d;
  --bun-dark: #5c2f1d;
  --ink: #34251f;
  --ink-soft: #5e4a40;
  --line: rgba(74, 45, 31, .4);
  --shadow: 0 18px 42px rgba(44, 29, 22, .18);
  --radius: 26px;
  --shell: min(1220px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #8eb2cf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 999;
  background: var(--cream-2);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  transform: translateY(-160%);
  transition: .2s ease;
}
.skip-link:focus { transform: translateY(0); }
.shell { width: var(--shell); margin-inline: auto; }

/* HEADER */
.site-header {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1320px, calc(100% - 28px));
  min-height: 68px;
  padding: 8px 12px 8px 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  background: rgba(42, 34, 29, .14);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  background: rgba(248, 238, 219, .96);
  border-color: rgba(91, 52, 31, .25);
  box-shadow: 0 10px 30px rgba(44, 29, 22, .15);
}
.brand { width: 210px; min-width: 0; }
.brand img { width: 100%; height: auto; }
.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  font-weight: 850;
  font-size: 13px;
  letter-spacing: .08em;
  color: #fff9ed;
  padding: 10px 12px;
  border-radius: 999px;
  text-shadow: 0 1px 4px rgba(35, 24, 18, .5);
}
.site-header.scrolled .main-nav a { color: var(--ink); text-shadow: none; }
.main-nav a:hover { background: rgba(255,255,255,.14); }
.site-header.scrolled .main-nav a:hover { background: rgba(216,133,140,.13); }
.social-row { display: flex; align-items: center; gap: 6px; }
.social-row a {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  transition: transform .18s ease, background .18s ease;
}
.social-row a:hover { transform: translateY(-2px) rotate(-1deg); background: rgba(255,255,255,.12); }
.social-row img { width: 42px; height: 42px; object-fit: contain; }
.header-socials { margin-left: 3px; }
.menu-toggle { display: none; }

/* HERO */
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background-image: url('../assets/hero-desktop.webp');
  background-size: cover;
  background-position: center center;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18,29,37,.58) 0%, rgba(18,29,37,.25) 36%, rgba(18,29,37,.03) 66%);
}
.hero-content {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 92px;
  padding-bottom: 52px;
}
.hero-copy {
  width: min(460px, 42vw);
  color: var(--cream-2);
  text-shadow: 0 2px 10px rgba(30,22,18,.45);
}
.hero-logo { width: min(455px, 100%); filter: drop-shadow(0 10px 22px rgba(34,23,18,.24)); }
.ticker {
  margin: -3px 0 4px;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 950;
  letter-spacing: .04em;
}
.hero-tagline {
  margin: 8px 0 0;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(28px, 3.1vw, 50px);
  line-height: .98;
  font-weight: 950;
  letter-spacing: -.035em;
  text-transform: lowercase;
}
.micro-line {
  margin: 12px 0 22px;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .18em;
  opacity: .88;
}
.ca-box {
  width: min(500px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 13px;
  background: rgba(247,236,215,.94);
  color: var(--ink);
  border: 2px solid rgba(80,47,29,.65);
  border-radius: 17px;
  box-shadow: 0 10px 24px rgba(34,24,19,.22);
  text-shadow: none;
}
.ca-label {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
  color: var(--pink-dark);
}
.ca-box code, .footer-ca code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.copy-btn {
  border: 0;
  background: var(--ink);
  color: var(--cream-2);
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.copy-btn:hover { transform: translateY(-1px); background: var(--bun-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.btn {
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(76,45,29,.78);
  border-radius: 15px;
  font-weight: 950;
  letter-spacing: .03em;
  text-shadow: none;
  box-shadow: 0 7px 0 rgba(75,43,27,.34);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 9px 0 rgba(75,43,27,.26); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(75,43,27,.3); }
.btn-primary { background: var(--pink); color: #2c211c; }
.btn-secondary { background: var(--cream-2); color: var(--ink); }
.hero-socials { margin-top: 18px; }
.hero-socials a { background: rgba(248,238,219,.88); border: 1px solid rgba(92,47,29,.34); }
.hero-socials img { width: 46px; height: 46px; }
.scroll-cue {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--cream-2);
  font-weight: 950;
  font-size: 22px;
  background: rgba(40,30,24,.28);
  border: 1px solid rgba(255,255,255,.25);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

/* WORLD + SECTIONS */
.meme-world {
  position: relative;
  isolation: isolate;
  background-image: linear-gradient(rgba(233,239,238,.18),rgba(254,240,219,.18)), url('../assets/site-background.webp');
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}
.meme-world::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(242, 235, 218, .18);
  pointer-events: none;
}
.section { padding: clamp(76px, 9vw, 132px) 0; position: relative; }
.section + .section { border-top: 1px solid rgba(85,56,39,.12); }
.section-grid { display: grid; align-items: center; gap: clamp(30px, 5vw, 70px); }
.two-col { grid-template-columns: .86fr 1.14fr; }
.community-grid { grid-template-columns: .78fr 1.22fr; }
.copy-panel {
  background: rgba(250,240,221,.92);
  border: 2px solid rgba(94,57,37,.32);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 50px);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .18em;
}
h2 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(48px, 7vw, 98px);
  line-height: .84;
  letter-spacing: -.055em;
  color: var(--ink);
}
.lore-copy { margin-top: 26px; font-size: clamp(17px, 1.65vw, 22px); line-height: 1.55; }
.lore-copy p { margin: 0 0 10px; }
.big-line { margin: 22px 0 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.2; font-weight: 900; }
.stamp {
  display: inline-block;
  margin: 24px 0 0;
  padding: 9px 13px;
  border: 2px dashed rgba(91,47,29,.55);
  border-radius: 10px;
  color: var(--bun-dark);
  font-weight: 900;
  transform: rotate(-1.2deg);
  background: rgba(255,255,255,.25);
}
.photo-card {
  margin: 0;
  padding: 10px;
  background: rgba(250,240,221,.9);
  border: 2px solid rgba(85,51,32,.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(.6deg);
}
.photo-card img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 11px);
  object-fit: contain;
}
.photo-card figcaption {
  padding: 10px 8px 2px;
  color: var(--ink-soft);
  font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
}
.section-heading { max-width: 800px; margin-bottom: 34px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading p:not(.eyebrow) { margin: 16px 0 0; font-size: clamp(18px, 2vw, 25px); font-weight: 800; line-height: 1.4; }

.flight-frame {
  position: relative;
  margin-top: 20px;
  padding: 10px;
  background: rgba(250,240,221,.91);
  border: 2px solid rgba(85,51,32,.32);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.flight-art { width: 100%; height: auto; border-radius: 18px; }
.flight-caption {
  position: absolute;
  left: clamp(20px, 4vw, 58px);
  bottom: clamp(20px, 4vw, 50px);
  max-width: min(520px, 60%);
  padding: 16px 18px;
  border-radius: 16px;
  color: var(--cream-2);
  background: rgba(49,36,29,.82);
  box-shadow: 0 10px 25px rgba(31,21,16,.25);
}
.flight-caption span, .flight-caption strong { display: block; }
.flight-caption span { font-size: 13px; opacity: .82; text-transform: uppercase; letter-spacing: .1em; }
.flight-caption strong { margin-top: 5px; font-size: clamp(20px, 2.2vw, 30px); }
.flight-wind { position: absolute; right: 2%; top: 5%; width: 19%; opacity: .64; pointer-events: none; }
.section-kicker { margin: 20px 0 0; text-align: right; font-weight: 950; font-size: clamp(22px, 3vw, 40px); }

.chart-stage { position: relative; }
.chart-shell {
  position: relative;
  min-height: clamp(500px, 58vw, 760px);
  overflow: hidden;
  background: rgba(35,47,56,.93);
  border: 9px solid rgba(248,238,219,.92);
  outline: 2px solid rgba(77,46,30,.34);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.chart-shell iframe { width: 100%; height: 100%; min-height: inherit; border: 0; display: block; background: #111; }
.chart-placeholder {
  min-height: inherit;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  padding: 30px;
  color: var(--cream-2);
  background:
    radial-gradient(circle at 18% 22%, rgba(217,133,140,.12), transparent 28%),
    radial-gradient(circle at 78% 70%, rgba(207,143,83,.12), transparent 28%),
    rgba(38,52,62,.98);
}
.chart-tba { font-size: 12px; font-weight: 950; letter-spacing: .22em; color: #e3a3aa; }
.chart-placeholder strong { font: 950 clamp(30px, 5vw, 64px)/.95 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.chart-placeholder small { opacity: .72; }
.chart-mascot {
  position: absolute;
  z-index: 3;
  right: clamp(-18px, -1vw, -4px);
  bottom: -10px;
  width: clamp(130px, 17vw, 250px);
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(43,28,20,.25));
}

.community-copy h2 { font-size: clamp(48px, 6.5vw, 88px); }
.community-links { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 26px; }
.community-links a {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid rgba(85,51,32,.25);
  border-radius: 14px;
  background: rgba(255,255,255,.28);
  font-weight: 900;
  font-size: 12px;
  transition: transform .16s ease, background .16s ease;
}
.community-links a:hover { transform: translateY(-2px) rotate(-.35deg); background: rgba(255,255,255,.48); }
.community-links img { width: 42px; height: 42px; object-fit: contain; flex: 0 0 auto; }
.community-card { transform: rotate(-.55deg); }

.decor { position: absolute; z-index: 0; pointer-events: none; opacity: .38; }
.decor-cloud { width: clamp(180px, 26vw, 430px); top: 13%; right: -7%; animation: drift 15s ease-in-out infinite alternate; }
.decor-bun { width: clamp(90px, 12vw, 180px); top: 45%; left: -2%; animation: floatBun 9s ease-in-out infinite; }
@keyframes drift { to { transform: translateX(-25px) translateY(9px); } }
@keyframes floatBun { 50% { transform: translate(18px,-16px) rotate(7deg); } }

/* FOOTER */
.site-footer { padding-top: 38px; }
.footer-art-wrap { position: relative; min-height: 320px; display: flex; align-items: stretch; overflow: hidden; }
.footer-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.footer-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,28,22,.74) 0%, rgba(40,28,22,.28) 42%, rgba(40,28,22,.08) 68%); }
.footer-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 38px; color: var(--cream-2); }
.footer-logo { width: min(430px, 65vw); filter: drop-shadow(0 8px 15px rgba(36,23,18,.25)); }
.footer-content p { margin: -6px 0 14px; font-size: clamp(24px, 3vw, 38px); line-height: 1; font-weight: 800; }
.footer-ca { display: flex; gap: 9px; align-items: center; max-width: 520px; padding: 9px 12px; border-radius: 12px; background: rgba(248,238,219,.92); color: var(--ink); }
.footer-ca span { color: var(--pink-dark); font-weight: 950; font-size: 12px; }
.footer-socials { margin-top: 12px; }
.footer-socials a { background: rgba(248,238,219,.88); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 18px 28px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.reveal-late { transition-delay: .08s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }


@media (min-width: 721px) and (max-width: 1100px) {
  /* Keep the hero wordmark fully inside the empty sky area and away from the mascot's face. */
  .hero-copy { width: min(390px, 39vw); }
  .hero-logo { width: min(390px, 100%); }
}

@media (max-width: 980px) {
  :root { --shell: min(100% - 30px, 900px); }
  .site-header { gap: 10px; }
  .brand { width: 180px; }
  .header-socials { display: none; }
  .two-col, .community-grid { grid-template-columns: 1fr; }
  .copy-panel { max-width: 760px; }
  .section-about .photo-card { max-width: 760px; margin-inline: auto; }
  .community-copy { order: 1; }
  .community-card { order: 2; }
  .community-links { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .community-links a { justify-content: center; }
  .community-links span { display: none; }
  .footer-art-wrap { min-height: 290px; }
}

@media (max-width: 720px) {
  :root { --shell: calc(100% - 24px); --radius: 22px; }
  .site-header {
    top: 8px;
    width: calc(100% - 16px);
    min-height: 58px;
    border-radius: 18px;
    padding: 6px 8px 6px 10px;
    background: rgba(248,238,219,.92);
    border-color: rgba(91,52,31,.24);
  }
  .brand { width: 160px; }
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, calc(100vw - 28px));
    padding: 8px;
    display: grid;
    gap: 4px;
    background: rgba(248,238,219,.98);
    border: 1.5px solid rgba(91,52,31,.24);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(44,29,22,.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .18s ease;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav a, .site-header.scrolled .main-nav a { color: var(--ink); text-shadow: none; padding: 12px; }
  .menu-toggle {
    margin-left: auto;
    width: 44px; height: 44px;
    border: 0;
    border-radius: 13px;
    background: rgba(96,53,31,.08);
    display: grid;
    place-content: center;
    gap: 4px;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 3px; background: var(--ink); }

  .hero {
    background-image: url('../assets/hero-mobile.webp');
    background-position: center center;
  }
  .hero-shade {
    background: linear-gradient(180deg, rgba(20,31,38,.48) 0%, rgba(20,31,38,.12) 37%, rgba(20,31,38,.03) 60%, rgba(20,31,38,.43) 100%);
  }
  .hero-content {
    align-items: flex-start;
    padding-top: 92px;
    padding-bottom: 34px;
  }
  .hero-copy { width: 100%; }
  .hero-logo { width: min(370px, 87vw); }
  .ticker { font-size: 27px; margin-top: -4px; }
  .hero-tagline { font-size: clamp(28px, 9vw, 42px); max-width: 310px; }
  .micro-line { margin-bottom: 14px; }
  .ca-box { width: 100%; }
  .hero-actions { gap: 8px; }
  .btn { flex: 1 1 155px; min-height: 45px; font-size: 13px; padding-inline: 14px; }
  .hero-socials { margin-top: 13px; }
  .hero-socials a { width: 44px; height: 44px; }
  .hero-socials img { width: 43px; height: 43px; }
  .scroll-cue { display: none; }

  .section { padding: 68px 0; }
  .copy-panel { padding: 24px; }
  h2 { font-size: clamp(46px, 16vw, 72px); }
  .section-heading { margin-bottom: 24px; }
  .photo-card { padding: 7px; border-radius: 20px; transform: none; }
  .photo-card img { border-radius: 14px; }
  .flight-frame { padding: 7px; border-radius: 20px; }
  .flight-art { border-radius: 14px; }
  .flight-caption {
    position: static;
    margin: 7px 0 0;
    max-width: none;
    border-radius: 13px;
    padding: 13px 14px;
  }
  .flight-wind { display: none; }
  .section-kicker { text-align: left; }
  .chart-shell { min-height: 540px; border-width: 6px; border-radius: 21px; }
  .chart-mascot { width: 145px; right: -10px; bottom: -5px; }
  .community-links { grid-template-columns: 1fr 1fr; }
  .community-links span { display: inline; }
  .community-links a { justify-content: flex-start; }
  .decor { opacity: .22; }
  .footer-art-wrap { min-height: 330px; }
  .footer-art { object-position: 67% center; }
  .footer-overlay { background: linear-gradient(90deg, rgba(40,28,22,.78), rgba(40,28,22,.45) 58%, rgba(40,28,22,.1)); }
  .footer-content { padding-block: 30px; }
  .footer-logo { width: min(330px, 82vw); }
  .footer-bottom { flex-direction: column; gap: 5px; padding-bottom: 22px; }
}

@media (max-width: 420px) {
  .brand { width: 145px; }
  .hero-logo { width: 82vw; }
  .ticker { font-size: 24px; }
  .hero-tagline { font-size: 34px; }
  .ca-box { grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; padding-left: 10px; }
  .copy-btn { padding-inline: 10px; }
  .community-links span { font-size: 11px; }
  .community-links img { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Mobile hero keeps identity in the empty sky and controls below the mascot. */
@media (max-width: 720px) {
  .hero-content { position: relative; display: block; padding: 0; min-height: 100svh; }
  .hero-copy { padding-top: 82px; }
  .hero-logo { width: min(300px, 78vw); }
  .ticker { font-size: 23px; margin: -2px 0 2px; }
  .hero-tagline { font-size: clamp(25px, 7.8vw, 34px); line-height: .98; max-width: 275px; margin-top: 4px; }
  .micro-line { display: none; }
  .hero .ca-box {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 104px;
    width: 100%;
  }
  .hero .hero-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 42px;
    margin: 0;
  }
  .hero .hero-socials { display: none; }
}
