/* 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); }
}

/* 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: "esta semana tenho…" picks + dot door */
.week-q { margin: var(--space-6) 0 var(--space-3); }
.week { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.week button { min-height: 40px; padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 500 15px/1 var(--font-sans); cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.week button:hover { border-color: var(--cobalt); }
.week button.is-active { background: var(--cobalt); border-color: var(--cobalt); color: var(--on-cobalt); }
.week button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.week-copy { min-height: 6.4em; max-width: 44ch; display: grid; gap: var(--space-2); align-content: start; }
.week-say { font: italic 400 clamp(24px, 2.6vw, 30px)/1.15 var(--font-display); color: var(--cobalt); }
.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 */
.letter-figure:empty { aspect-ratio: 420 / 600; } /* room kept until the letter is drawn */
.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)); }
.word-title.is-settled .tw { color: inherit; opacity: 1; filter: none; transform: none; }

/* 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; }

/* Hero logo */
.hero-brand { margin-bottom: var(--space-5); line-height: 0; }
.hero-brand .d2-logo { height: clamp(52px, 5.4vw, 74px); }

/* Footer: the Door2.pt logo */
.footer-name { line-height: 0; }
.footer-name .d2-logo { height: clamp(64px, 7vw, 92px); }

/* Tighter rhythm: half the space between sections, and between the formats row and what follows */
.section { padding: var(--space-7) 0; }
.statement { padding-top: var(--space-6); }
.formats { margin-top: var(--space-7); }
.hero { padding-bottom: var(--space-6); }

/* Slimmer footer: logo and links on one row, copyright tucked underneath */
.site-footer { padding: var(--space-6) 0 var(--space-4); }
.footer-inner { display: block; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); max-width: none; }
.footer-name .d2-logo { height: clamp(44px, 4.6vw, 60px); }
.footer-brand .body-sm { max-width: 32ch; margin: 0; }
.footer-brand .d2-btn--link { margin-left: auto; }
@media (max-width: 720px) { .footer-brand .d2-btn--link { margin-left: 0; } }
.footer-legal { margin-top: var(--space-5); padding-top: var(--space-3); }

/* Login button in the top bar: "Área do aluno" on wide screens, "Entrar" on phones */
.nav-login { gap: 6px; }
.nav-login-i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-login-short { display: none; }
@media (max-width: 720px) {
  .nav-login { padding: 0 var(--space-3); }
  .nav-login-long { display: none; }
  .nav-login-short { display: inline; }
}

/* the fanned profile stays inside its own frame, clear of the quote */
.fan-figure { overflow: hidden; }
@media (max-width: 900px) { .fan-figure { max-width: 320px; margin-bottom: var(--space-4); } }

/* Contact: the form as a short conversation */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chat { align-content: end; min-height: 360px; }
.chat-log { display: flex; flex-direction: column; gap: var(--space-2); max-height: 420px; overflow-y: auto; padding: 2px; }
.chat-b { max-width: 85%; padding: 10px 14px; border-radius: 18px; font: var(--text-body); overflow-wrap: anywhere; }
.chat-b.is-new { animation: chat-in .35s ease both; }
.chat-b--us { align-self: flex-start; background: var(--surface-200); color: var(--ink); border: 1px solid var(--hairline); border-bottom-left-radius: 6px; }
.chat-b--me { align-self: flex-end; background: var(--cobalt); color: var(--on-cobalt); border-bottom-right-radius: 6px; white-space: pre-line; }
.chat-b.is-error { color: var(--neon-ink); }
@keyframes chat-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-b.is-new { animation: none; } }
.chat-picks { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.chat-pick { min-height: 40px; padding: 0 var(--space-4); border: 1px solid var(--cobalt); border-radius: var(--radius-pill); background: transparent; color: var(--cobalt); font: 500 15px/1 var(--font-sans); cursor: pointer; }
.chat-pick:hover { background: var(--cobalt-wash); }
.chat-say { display: flex; gap: var(--space-2); align-items: flex-end; }
.chat-say input, .chat-say textarea { flex: 1; min-width: 0; min-height: 48px; padding: 12px 16px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--surface-200); color: var(--ink); font: var(--text-body); resize: none; }
.chat-say input:focus-visible, .chat-say textarea:focus-visible, .chat-pick:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.chat-send { flex: none; height: 48px; }
.chat-skip, .chat-again { justify-self: end; }
[hidden] { display: none !important; }
@media (max-width: 520px) { .chat-send [data-i18n] { display: none; } .chat-send { width: 48px; padding: 0; justify-content: center; } }
