/* door2.pt — landing page layout. Tokens from tokens.css, components from door2.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: hidden; }
img, svg { max-width: 100%; }
h1, h2, h3, p, figure, ol { margin: 0; }
em { font-style: italic; color: var(--cobalt); }
.muted { color: var(--ink-muted); }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 720px) { .wrap { padding: 0 var(--space-4); } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface-200); color: var(--ink); padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); }
.skip:focus { left: 8px; }

/* Nav */
.site-nav { position: fixed; top: var(--space-4); left: 0; right: 0; z-index: 50; padding: 0 var(--space-4); }
.site-nav .d2-nav { max-width: 1040px; margin: 0 auto; }
.theme-btn { width: 32px; height: 32px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-btn span { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border: 1.5px solid var(--ink); }
@media (max-width: 720px) {
  .site-nav { top: var(--space-2); padding: 0 var(--space-2); }
  .site-nav .d2-nav { gap: var(--space-2); padding-left: var(--space-4); }
  .nav-login { display: none; }
}

/* Sections */
.section { position: relative; padding: var(--space-9) 0; }
@media (max-width: 720px) { .section { padding: var(--space-9) 0; } }
.section-bg, .hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
/* sections melt into each other: every background fades out at its top and bottom edge */
.section-bg { inset: -120px 0; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.hero-bg { bottom: -160px; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 75%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 75%, transparent 100%); }
.section-bg.d2-ink, .hero-bg.d2-ink { background: transparent; }
main { position: relative; overflow: hidden; }
.section-title { margin: var(--space-5) 0 var(--space-6); max-width: 16ch; }
.d2-kicker { max-width: 560px; }

.bg-letters { position: absolute; top: 8%; line-height: .82; }
.bg-letters--right { right: -0.08em; text-align: right; }
.bg-letters--low { top: auto; bottom: 4%; }
.bg-letters.d2-erode { color: var(--cobalt-wash); }
@media (max-width: 720px) { .bg-letters { font-size: 140px; } }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 var(--space-8); }
.hero-bg { background: var(--surface-100); }
.hero-letters { position: absolute; right: -0.06em; top: 12vh; text-align: right; color: var(--cobalt-wash); font-size: clamp(160px, 30vw, 380px); }
.hero-inner { width: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-7); align-items: center; }
.hero-door { width: 100%; max-width: 440px; justify-self: end; }
.hero-brand { font-family: var(--font-brand); font-weight: 600; font-variation-settings: "opsz" 72, "SOFT" 50; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.025em; color: var(--ink); margin-bottom: var(--space-5); line-height: 1; white-space: nowrap; }
.hero-brand .hb-2, .hero-brand .hb-to { display: inline-block; overflow: hidden; vertical-align: bottom; font-style: italic; font-weight: 500; transition: max-width .6s cubic-bezier(.3,.1,.2,1), opacity .4s ease, transform .6s cubic-bezier(.3,.1,.2,1); }
.hero-brand .hb-2 { color: var(--cobalt); max-width: .8em; }
.hero-brand .hb-to { color: var(--coral-ink); max-width: 0; opacity: 0; transform: translateY(.4em); }
.hero-brand.is-to .hb-2 { max-width: 0; opacity: 0; transform: translateY(-.4em); }
.hero-brand.is-to .hb-to { max-width: 2.2em; opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero-door { order: -1; max-width: 220px; justify-self: start; }
}
.hero-title { margin: 0 0 var(--space-5); font-size: clamp(52px, 8vw, 112px); }
.lead { max-width: 36ch; color: var(--ink-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-7); }
@media (max-width: 520px) { .cta-row .d2-btn { width: 100%; } }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; max-width: 520px; } }
.d2-service .d2-kicker { max-width: none; }

/* Split layouts */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-8); align-items: center; }
.split--rev { grid-template-columns: 1fr 1.05fr; }
@media (max-width: 900px) { .split, .split--rev { grid-template-columns: 1fr; gap: var(--space-7); } .split--rev .split-art { order: 2; } }
.split-text .section-title { max-width: 14ch; }

/* Classes: level tabs + dot door */
.levels { display: inline-flex; gap: 2px; padding: 4px; margin: var(--space-6) 0 var(--space-4); border-radius: var(--radius-pill); background: var(--surface-300); }
.levels button { height: 36px; min-width: 52px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-muted); font: 500 12px/1 var(--font-mono); letter-spacing: .08em; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.levels button.is-active { background: var(--cobalt); color: var(--on-cobalt); }
.level-copy { min-height: 3.4em; max-width: 42ch; }
.dots-figure { max-width: 480px; justify-self: center; width: 100%; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-9); padding-top: var(--space-6); border-top: 1px solid var(--hairline); }
.format { display: flex; flex-direction: column; gap: var(--space-2); }
@media (max-width: 900px) { .formats { grid-template-columns: 1fr; gap: var(--space-5); } }

/* How it works */
.letter-figure { max-width: 440px; width: 100%; justify-self: center; padding: 0; border-radius: 2px; overflow: hidden; background: #f3eee2; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 50px rgba(14,31,102,.12); }
.steps { list-style: none; padding: 0; display: grid; gap: var(--space-5); position: relative; }
.steps::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 1px; background: var(--hairline); }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: var(--space-4); position: relative; }
.step-n { width: 28px; height: 28px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-100); border: 1px solid var(--line-strong); color: var(--cobalt); font-size: 10px; }
.steps h3 { margin-bottom: var(--space-1); }

/* Community */
.crowd-figure { position: relative; margin: var(--space-7) 0 var(--space-7); }
.crowd-caption { position: absolute; top: 0; right: 0; z-index: 2; font-family: var(--font-sans); font-weight: 600; font-size: clamp(22px, 3vw, 36px); letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.crowd-caption em { font-style: normal; color: var(--coral-ink); }
.community-text { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-7); }
@media (max-width: 900px) { .community-text { grid-template-columns: 1fr; gap: var(--space-4); } .crowd-caption { position: static; margin-bottom: var(--space-4); } }

/* Statement */
.statement { padding-top: var(--space-8); }
.fan-figure { max-width: 460px; width: 100%; justify-self: center; }
.quote { max-width: 18ch; margin-bottom: var(--space-4); font-size: clamp(30px, 4vw, 48px); }

/* Contact */
.contact-bg { position: absolute; inset: 0; z-index: 0; opacity: .9; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 45%, transparent 85%), linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 0, #000 45%, transparent 85%), linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%); mask-composite: intersect; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
@media (max-width: 900px) { .contact-inner { grid-template-columns: 1fr; gap: var(--space-6); } .contact-bg { -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); } }
.contact-text { padding: var(--space-6); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-100) 78%, transparent); }
@media (max-width: 720px) { .contact-text { padding: 0; background: none; } }
.contact-form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field .label { color: var(--ink-muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-200); color: var(--ink); font: var(--text-body); }
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-status { min-height: 1.5em; }
.form-status.is-error { color: var(--neon-ink); }

/* Footer */
.site-footer { position: relative; padding: var(--space-9) 0 var(--space-6); background: var(--surface-200); border-top: 1px solid var(--hairline); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: var(--space-8); align-items: end; }
.footer-brand { display: grid; gap: var(--space-4); justify-items: start; max-width: 36ch; }

.footer-legal { display: flex; justify-content: space-between; margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--hairline); }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }


/* Hero: ink blooms on paper behind the glass door (as on the back-office login) */
.hero-bloom { background: transparent; }
.hero-bloom .gx-bloom { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-door { position: relative; }
/* by night the ink turns to light: the same blooms, inverted and hue-kept, glowing on the dark ground */
[data-theme="dark"] .hero-bloom .gx-bloom { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; opacity: .8; }
@media (max-width: 900px) {
  /* on phones the door sits above the text: keep the ink behind the door and clear of the copy */
  .hero-bloom .gx-bloom { -webkit-mask-image: linear-gradient(180deg, #000 0, #000 28%, transparent 46%); mask-image: linear-gradient(180deg, #000 0, #000 28%, transparent 46%); }
}

/* Top bar: the symbol only */
.nav-mark { display: inline-flex; align-items: center; padding: 2px 0; }
.nav-mark .d2-mark { width: 30px; height: 30px; }

/* "olá" beside the services heading, in halftone dots */
.services .wrap { position: relative; }
.ola { position: absolute; right: var(--space-6); top: -12px; pointer-events: none; }
.ola canvas { display: block; }
@media (max-width: 900px) { .ola { position: static; margin: 0 0 var(--space-4); } }

/* Section titles: Schibsted Grotesk bold, words settling from coral to ink on scroll */
.section-title.word-title { font-family: var(--font-sans); font-weight: 800; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.04em; max-width: 15ch; }
.section-title.word-title em { font-style: normal; color: var(--cobalt); }
.word-title .tw { display: inline-block; --k: 1; color: color-mix(in oklab, var(--coral) calc((1 - var(--k)) * 100%), currentColor);
  opacity: calc(.15 + var(--k) * .85); filter: blur(calc((1 - var(--k)) * 8px)); transform: translateY(calc((1 - var(--k)) * .35em)); }

/* Footer: the name as type, no image (five fonts under review, ?font=1..5) */
.footer-name { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.footer-two { color: var(--cobalt); }
.footer-name[data-font="1"] { font-family: var(--font-brand); font-weight: 600; font-variation-settings: "opsz" 144, "SOFT" 50; }
.footer-name[data-font="1"] .footer-two { font-style: italic; font-weight: 500; }
.footer-name[data-font="2"] { font-family: var(--font-display); font-weight: 400; }
.footer-name[data-font="2"] .footer-two { font-style: italic; }
.footer-name[data-font="3"] { font-family: var(--font-sans); font-weight: 800; letter-spacing: -.045em; }
.footer-name[data-font="4"] { font-family: "Unbounded", var(--font-sans); font-weight: 700; letter-spacing: -.03em; font-size: clamp(32px, 4vw, 52px); }
.footer-name[data-font="5"] { font-family: "Bricolage Grotesque", var(--font-sans); font-weight: 800; font-variation-settings: "opsz" 96; letter-spacing: -.04em; }
.footer-name[data-font="5"] .footer-two { color: var(--coral-ink); }
.footer-inner { grid-template-columns: 1fr; }

/* Hero wordmark: Schibsted Grotesk 700, tightly set (matches the back-office wordmark) */
.hero-brand { font-family: var(--font-sans); font-weight: 700; font-variation-settings: normal; letter-spacing: -.045em; }
.hero-brand .hb-2, .hero-brand .hb-to { font-style: italic; font-weight: 700; }
/* the italic 2 leans past its box: let it show while it's displayed (it's clipped only while collapsing) */
.hero-brand:not(.is-to) .hb-2 { overflow: visible; padding-right: .04em; }
