/* Bangarang Apps — one stylesheet for the whole site.
   Rules that matter (learned the hard way on v1):
   - .wrap is margin-based, never padding, so a section's own padding can't zero the gutter.
   - Color lives in "worlds" ([data-world]); sections and the header both read from them.
   - Scroll motion is progressive: everything is readable with no JS or with reduced motion. */

:root {
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --hdr: 68px;

  --ink: #0c0a0a;
  --oxblood: #210d10;
  --bone: #eee9da;
  --red: #ff1f2d;
}

/* anchor jumps land flush at the top so the header takes the target section's world; padding below keeps content clear of it */
main > section[id] { scroll-margin-top: calc(var(--hdr) * -1); }

/* ---------- worlds ---------- */
[data-world] { background: var(--bg); color: var(--fg); }
[data-world="ink"] {
  --bg: #0c0a0a; --fg: #eee9da; --dim: rgba(238, 233, 218, .68); --line: rgba(238, 233, 218, .18);
  --accent: #ff1f2d; --sail-c: #ff1f2d; --btn-bg: #ff1f2d; --btn-fg: #0c0a0a; --btn-hover: #eee9da;
}
[data-world="oxblood"] {
  --bg: #210d10; --fg: #eee9da; --dim: rgba(238, 233, 218, .7); --line: rgba(238, 233, 218, .2);
  --accent: #ff1f2d; --sail-c: #ff1f2d; --btn-bg: #ff1f2d; --btn-fg: #0c0a0a; --btn-hover: #eee9da;
}
[data-world="paper"] {
  --bg: #efeae0; --fg: #211d16; --dim: rgba(33, 29, 22, .7); --line: rgba(33, 29, 22, .2);
  --accent: #0f3fa8; --sail-c: #0f3fa8; --btn-bg: #0f3fa8; --btn-fg: #ffffff; --btn-hover: #0b2f80;
}
[data-world="night"] {
  --bg: #0a0a0b; --fg: #fafafa; --dim: rgba(250, 250, 250, .68); --line: rgba(250, 250, 250, .18);
  --accent: #d97706; --sail-c: #d97706; --btn-bg: #d97706; --btn-fg: #0a0a0b; --btn-hover: #f59e0b;
}
[data-world="red"] {
  --bg: #ff1f2d; --fg: #0c0a0a; --dim: rgba(12, 10, 10, .84); --line: rgba(12, 10, 10, .3);
  --accent: #0c0a0a; --sail-c: #0c0a0a; --btn-bg: #0c0a0a; --btn-fg: #ff1f2d; --btn-hover: #2b1114;
}
[data-world="bone"] {
  --bg: #eee9da; --fg: #17100f; --dim: rgba(23, 16, 15, .74); --line: rgba(23, 16, 15, .2);
  --accent: #c8101e; --sail-c: #e11a28; --btn-bg: #17100f; --btn-fg: #eee9da; --btn-hover: #3a1d20;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--hdr); background: var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--red); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent, #ff1f2d); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 20px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--red); color: var(--ink); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr); border-bottom: 1px solid var(--line); }
.hdr .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mk { display: inline-flex; align-items: center; color: var(--fg); --sail: var(--sail-c, var(--accent)); text-decoration: none; }
.mk { padding-block: 9px; }
.mk svg { display: block; height: 25.5px; width: auto; }
.foot .mk svg { height: 35.8px; }
.nav { display: flex; align-items: center; gap: clamp(4px, 1.5vw, 16px); }
.nav a { font-size: 15px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; color: var(--dim); }
.nav a:hover { color: var(--fg); }
.nav a.cta { color: var(--btn-fg); background: var(--btn-bg); padding-inline: 16px; font-weight: 600; }
.nav a.cta:hover { background: var(--btn-hover); color: var(--btn-fg); }
@media (max-width: 640px) { .nav .opt { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 150vh; height: 150svh; }
.hero-stick {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--hdr) + 24px); padding-bottom: clamp(24px, 4vw, 48px);
  overflow: clip;
}
/* a huge, faint sail behind the hero, bleeding off the right edge. Static: the logo is never animated. */
.hero-sail {
  --sh: min(94svh, 150vw);
  position: absolute; z-index: 0; pointer-events: none;
  height: var(--sh); width: calc(var(--sh) * .8704);
  top: 50%; margin-top: calc(var(--sh) * -.5 + var(--hdr) / 2);
  right: calc(var(--sh) * .8704 * -.30);
  fill: var(--accent); opacity: .11;
}
.hero-stick > .wrap { position: relative; z-index: 1; }
.hero-top { transform: translateY(calc(var(--hp, 0) * -64px)); margin-bottom: auto; padding-top: clamp(8px, 2vw, 28px); }
.hero-top .mono { color: var(--dim); }
.hero-word { margin: 0; padding-bottom: clamp(16px, 2.4vw, 32px); color: var(--fg); --sail: var(--sail-c, var(--accent)); }
.hero-word svg { display: block; width: 100%; height: auto; max-width: none; overflow: visible; }
.hw-m { display: none !important; }
@media (max-width: 640px) { .hw-d { display: none !important; } .hw-m { display: block !important; } }
.hero-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--dim);
  border-top: 1px solid var(--line); padding-top: 20px;
}
.hero-line { margin-top: clamp(20px, 3vw, 40px); font-size: clamp(38px, 5.2vw, 84px); font-weight: 700; line-height: 1.02; letter-spacing: -.025em; color: var(--fg); font-variation-settings: "wdth" 88; }
.hero-line .ln { display: block; white-space: nowrap; }
/* the rotating word: a red highlighter box, like selected text. JS rolls it; without JS it simply reads "life". */
.rw { --rwp: 0em; }
.rw[data-rw="roll"] { display: inline-block; position: relative; clip-path: inset(0); padding-inline: var(--rwp); transition: width .55s cubic-bezier(.2, .8, .2, 1); }
.hero-line .rw { --rwp: .1em; background: var(--accent); color: var(--bg); margin-inline: .02em; }
.rw-s { display: inline-block; visibility: hidden; white-space: nowrap; }
.rw-i { position: absolute; left: var(--rwp); top: 0; white-space: nowrap; }
.rw-i.in { animation: rw-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.rw-i.out { animation: rw-out .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rw-in { from { transform: translateY(105%); opacity: 0; } }
@keyframes rw-out { to { transform: translateY(-105%); opacity: 0; } }
@media (max-width: 480px) { .hero-line { font-size: clamp(30px, 9.4vw, 38px); } }
.rm .rw[data-rw="roll"] { transition: none; }
.cue { color: var(--dim); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.cue:hover { color: var(--fg); }
.rm .hero, html:not(.js) .hero { height: auto; min-height: 100svh; }
.rm .hero-stick, html:not(.js) .hero-stick { position: relative; }

/* ---------- manifesto ---------- */
.mf { position: relative; height: 340vh; height: 340svh; }
.mf-stick { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--hdr); }
.mf-text {
  font-size: clamp(30px, 5.2vw, 86px); font-weight: 700; line-height: 1.07; letter-spacing: -.022em;
  font-variation-settings: "wdth" 88; text-wrap: balance;
}
.mf-text em { font-style: normal; color: var(--accent); }
.js .mf-text .w { opacity: .45; }          /* floor keeps >=3.9:1 so the copy is readable at any scroll position */
.mf-text em .w { opacity: 1 !important; }   /* the accent word never dims: red cannot reach 3:1 when faded */
.rm .mf, html:not(.js) .mf { height: auto; padding-block: 120px; }
.rm .mf-stick, html:not(.js) .mf-stick { position: relative; height: auto; padding-top: 0; }
.rm .mf-text .w { opacity: 1 !important; }

/* ---------- strip ---------- */
.strip { overflow: clip; padding-block: clamp(48px, 7vw, 112px) clamp(24px, 4vw, 56px); display: grid; gap: clamp(6px, 1.2vw, 16px); }
.strip-row {
  display: flex; width: max-content; white-space: nowrap;
  font-weight: 900; text-transform: uppercase; font-size: clamp(56px, 11.5vw, 196px);
  line-height: .96; letter-spacing: -.02em; font-variation-settings: "wdth" 82;
  will-change: transform;
}
.strip-row span { padding-right: .32em; }
.strip-row .o { color: transparent; -webkit-text-stroke: clamp(1px, .18vw, 3px) var(--fg); }

/* ---------- section intro ---------- */
.intro { padding-block: max(calc(var(--hdr) + 20px), clamp(56px, 8vw, 120px)) clamp(24px, 4vw, 48px); }
.xl {
  font-size: clamp(54px, 11vw, 188px); font-weight: 900; text-transform: uppercase;
  line-height: .86; letter-spacing: -.02em; font-variation-settings: "wdth" var(--wd, 82), "wght" 900;
}
.intro .sub { margin-top: 20px; color: var(--dim); font-size: clamp(18px, 1.6vw, 22px); }

/* ---------- product panels ---------- */
.panel { padding-block: clamp(88px, 12vw, 180px); }
.panel-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 104px); align-items: center; }
.panel.flip .panel-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.panel.flip .panel-shot { order: -1; }
@media (max-width: 900px) {
  .panel-grid, .panel.flip .panel-grid { grid-template-columns: minmax(0, 1fr); }
  .panel.flip .panel-shot { order: 0; }
}
.brandrow { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(24px, 3vw, 40px); }
.brandrow svg { color: var(--accent); flex: none; }
.brandrow .name { font-size: 26px; line-height: 1; }
.panel h2 { text-wrap: balance; }
.panel .lede { margin-block: 24px 32px; color: var(--dim); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 36ch; }
.facts { border-top: 1px solid var(--line); margin-bottom: 36px; max-width: 460px; }
.facts li { padding-block: 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding-inline: 24px;
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn:hover { background: var(--btn-hover); }
.btn svg { width: 14px; height: 14px; }
.panel-shot { will-change: transform; }
.panel-shot img { width: 100%; height: auto; }

.si .brandrow { font-size: 26px; gap: .306em; }          /* SimpleInvite's own lockup: card 1.177em tall, .306em gap, seated .04em low */
.si .brandrow .name { font-size: inherit; }
.si .brandrow svg.si-card { color: #111; height: 1.177em; width: auto; aspect-ratio: 153.3 / 178.85; position: relative; top: .04em; flex: none; }
.si .brandrow .name { font-family: "Young Serif", Georgia, serif; }
.si h2 { font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: clamp(40px, 5.6vw, 92px); line-height: 1.0; letter-spacing: -.01em; }
.si .lede, .si .facts li, .si .btn { font-family: "Hanken Grotesk", system-ui, sans-serif; }
.si .facts li { font-family: var(--mono); }
.si .panel-shot { justify-self: center; width: min(100%, 440px); }

.fd .brandrow .name { font-family: "Outfit", system-ui, sans-serif; font-weight: 700; letter-spacing: -.03em; }
.fd .brandrow .name b { color: var(--accent); font-weight: 700; }
.fd h2 { font-family: "Outfit", system-ui, sans-serif; font-weight: 700; font-size: clamp(40px, 5.6vw, 92px); line-height: .98; letter-spacing: -.035em; }
.fd .lede, .fd .btn { font-family: "DM Sans", system-ui, sans-serif; }
.fd .panel-shot img { border-radius: 16px; }

/* ---------- how we work ---------- */
.crew { padding-block: clamp(88px, 12vw, 180px); }
.crew .xl { margin-bottom: clamp(48px, 7vw, 104px); }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(16px, 4vw, 72px); padding-block: clamp(28px, 4vw, 56px); border-bottom: 1px solid var(--line); align-items: baseline; }
.row h3 { font-size: clamp(30px, 4.6vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.025em; font-variation-settings: "wdth" 88; }
.row p { color: var(--dim); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; max-width: 40ch; }
@media (max-width: 760px) { .row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- hello ---------- */
.hello { padding-block: clamp(96px, 13vw, 200px) clamp(72px, 9vw, 140px); }
.hello .xl { font-size: 15vw; }
.hello .sub { margin-block: clamp(20px, 3vw, 36px) clamp(40px, 6vw, 88px); font-size: clamp(19px, 2vw, 28px); font-weight: 500; max-width: 30ch; line-height: 1.3; }
.mails { border-top: 1px solid var(--line); }
.mail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) auto; gap: 16px 32px; align-items: baseline;
  padding-block: clamp(20px, 2.6vw, 34px); padding-inline: 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.mail:hover { background: var(--fg); color: var(--bg); padding-inline: 16px; }
.mail .mono { color: inherit; opacity: .92; }
.mail .addr { font-size: clamp(20px, 3.4vw, 54px); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; font-variation-settings: "wdth" 92; }
.mail svg { width: clamp(16px, 2vw, 28px); height: auto; }
@media (max-width: 700px) {
  .mail { grid-template-columns: minmax(0, 1fr) auto; }
  .mail .mono { grid-column: 1 / -1; }
}

/* ---------- footer ---------- */
.foot { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 56px; }
.foot-links { display: flex; gap: 4px 12px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--dim); display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; font-size: 15px; }
.foot-links a:hover { color: var(--fg); }
.foot .small { color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 12px; }

/* ---------- documents (privacy / terms) ---------- */
.doc { padding-top: calc(var(--hdr) + clamp(48px, 8vw, 112px)); padding-bottom: clamp(72px, 10vw, 140px); }
.doc h1 { font-size: clamp(56px, 11vw, 168px); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: -.02em; font-variation-settings: "wdth" 80; }
.doc .eff { margin-block: 24px 56px; color: var(--dim); }
.doc .body { max-width: 66ch; }
.doc .body p, .doc .body li { color: var(--dim); font-size: 18px; line-height: 1.65; }
.doc .body p + p { margin-top: 16px; }
.doc .body h2 { margin-block: 48px 14px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--fg); }
.doc .body ul { list-style: disc; padding-left: 22px; margin-top: 12px; }
.doc .body a { color: var(--fg); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc .body a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--hdr); }
.lost .xl { font-size: 24vw; }
.lost p { margin-block: 20px 32px; font-size: 22px; color: var(--dim); }

/* ---------- scroll reveal ---------- */
.js:not(.rm) .rv { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--d, 0) * 90ms); }
.js:not(.rm) .rv.in { opacity: 1; transform: none; }

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