/* TestJori — "One base, any flower" concept homepage
   Light, graphite and sunflower gold. Gold is used only for results and the button to start. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(assets/fonts/inter-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(assets/fonts/inter-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url(assets/fonts/inter-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url(assets/fonts/inter-800-latin.woff2) format('woff2'); }

:root {
    --tj-bg: #F6F5F1;
    --tj-ink: #23262B;
    --tj-muted: #5D626A;
    --tj-line: rgba(35, 38, 43, 0.12);
    --tj-gold: #D49B17;
    --tj-gold-deep: #B8840F;
    --tj-glass: rgba(255, 255, 255, 0.74);
    --tj-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
    --tj-radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: light !important; background: #F6F5F1; }
body.tj {
    background: var(--tj-bg);
    color: var(--tj-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
.nowrap { white-space: nowrap; }

/* ---------- 3D scene (canvas) ---------- */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- Boot: an agent starts the site ---------- */
.boot {
    position: fixed; inset: 0; z-index: 50;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
    background: var(--tj-bg);
    transition: opacity 0.7s ease 0.35s;
}
.boot__term { font-family: var(--tj-mono); font-size: 13px; color: var(--tj-muted); min-width: 290px; transition: opacity 0.3s ease; }
.boot__line { opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease; white-space: pre; }
.boot__line.on { opacity: 1; transform: none; }
.boot__line b { color: var(--tj-ink); font-weight: 600; }
.boot__bar {
    width: 290px; height: 4px; border-radius: 4px; background: var(--tj-line); overflow: hidden;
    transition: width 0.55s cubic-bezier(0.6, 0, 0.2, 1), height 0.55s cubic-bezier(0.6, 0, 0.2, 1), border-radius 0.55s ease, background 0.3s ease;
}
.boot__bar i { display: block; height: 100%; width: 0; background: var(--tj-ink); transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1); }
.boot--shrink .boot__term { opacity: 0; }
.boot--shrink .boot__bar { width: 9px; height: 9px; border-radius: 50%; background: var(--tj-ink); }
.boot--done { opacity: 0; pointer-events: none; }

/* ---------- Navigation: "Book a call" stays visible the whole way ---------- */
.tj-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 14px clamp(16px, 4vw, 40px);
    background: rgba(246, 245, 241, 0.62);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--tj-line);
}
.tj-nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; }
.tj-nav__brand img { height: 30px; width: auto; }
.tj-nav__links { display: flex; gap: 28px; margin-left: auto; }
.tj-nav__links a { text-decoration: none; font-size: 0.9375rem; font-weight: 500; color: var(--tj-muted); transition: color 0.2s ease; }
.tj-nav__links a:hover { color: var(--tj-ink); }

.tj-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 22px; border-radius: 999px;
    font: 700 0.9375rem/1 'Inter', sans-serif; text-decoration: none; white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.tj-btn--gold { background: var(--tj-gold); color: #1E1702; box-shadow: 0 6px 18px -8px rgba(212, 155, 23, 0.8); }
.tj-btn--gold:hover { background: var(--tj-gold-deep); transform: translateY(-1px); }
.tj-btn--lg { padding: 15px 30px; font-size: 1rem; margin-top: 8px; }
:focus-visible { outline: 3px solid var(--tj-gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Story sections ---------- */
main { position: relative; z-index: 1; }
.story { min-height: 100vh; display: flex; align-items: center; padding: 110px clamp(16px, 6vw, 96px) 64px; }
.story--boot { min-height: 30vh; }
.story--left { justify-content: flex-start; }
.story--right { justify-content: flex-end; }
.story--center { justify-content: center; }
.story--bottom { align-items: flex-end; }
.story--top { align-items: flex-start; }
.story--end { min-height: 100vh; padding-bottom: 40px; }

/* ---------- Type ---------- */
.eyebrow { font-family: var(--tj-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tj-muted); margin-bottom: 12px; }
h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.8rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; max-width: 12ch; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 14px; }
h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
p { color: var(--tj-muted); }
.lead { font-size: 1.15rem; line-height: 1.65; max-width: 34ch; margin-top: 22px; }

/* Placeholder: dashed graphite, never gold (gold is for results) */
.ph {
    display: inline-block; padding: 0 6px; border: 1px dashed rgba(35, 38, 43, 0.55); border-radius: 5px;
    font-family: var(--tj-mono); font-size: 0.88em; font-weight: 600; color: var(--tj-ink); line-height: 1.45; white-space: nowrap;
}

/* ---------- Glass ---------- */
.glass {
    max-width: 460px; padding: 32px 34px; border-radius: var(--tj-radius);
    background: var(--tj-glass);
    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 24px 60px -28px rgba(35, 38, 43, 0.35);
}
.glass--wide { max-width: 760px; text-align: center; }
.glass p + p { margin-top: 12px; }

.hero { max-width: 640px; }
.hero__fact { margin-top: 26px; font-size: 0.95rem; }

.ticks { list-style: none; margin: 6px 0 16px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--tj-ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--tj-ink); }

/* Method: four lines build a glass window */
.window { position: relative; max-width: 860px; width: 100%; }
.window__glass {
    padding: 40px 42px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    text-align: center;
}
.window__edge { position: absolute; background: var(--tj-ink); z-index: 2; }
.window__edge--t, .window__edge--b { left: 0; right: 0; height: 1.5px; }
.window__edge--l, .window__edge--r { top: 0; bottom: 0; width: 1.5px; }
.window__edge--t { top: 0; transform-origin: left; }
.window__edge--r { right: 0; transform-origin: top; }
.window__edge--b { bottom: 0; transform-origin: right; }
.window__edge--l { left: 0; transform-origin: bottom; }
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 26px; text-align: left; }
.method__n { display: block; font-family: var(--tj-mono); font-size: 0.75rem; color: var(--tj-muted); margin-bottom: 8px; }
.method h3 { margin-bottom: 6px; }
.method p { font-size: 0.9375rem; }
.note { margin-top: 26px; font-size: 0.85rem; }

/* Cases */
.case__label { font-family: var(--tj-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tj-muted); margin-bottom: 10px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--tj-line); background: rgba(255, 255, 255, 0.7); color: var(--tj-ink); letter-spacing: 0.04em; }
.case__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 18px; padding-top: 16px; border-top: 1px solid var(--tj-line); }
.case__facts dt { font-size: 0.75rem; color: var(--tj-muted); }
.case__facts dd { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--tj-ink); }
.case__facts dd .ph { font-size: 0.7em; }
.gold { color: var(--tj-gold-deep) !important; }
.case__link { font-weight: 700; font-size: 0.9375rem; text-decoration: none; color: var(--tj-ink); border-bottom: 1.5px solid var(--tj-ink); padding-bottom: 1px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; text-align: left; }
.team__card { padding: 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--tj-line); }
.team__avatar { display: block; width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed rgba(35, 38, 43, 0.5); margin-bottom: 12px; }
.team__card h3 { margin-bottom: 4px; }
.team__role { font-size: 0.85rem; margin-bottom: 8px; }
.team__card p { font-size: 0.85rem; }

/* End: the dots form the logo above this */
.end { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.end__brand { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; color: var(--tj-ink); }
.end__tag { font-size: 1.05rem; margin-bottom: 8px; }
.end__meta { margin-top: 18px; font-size: 0.8125rem; }
.end__meta a { text-decoration: none; border-bottom: 1px solid var(--tj-line); }

.concept-tag {
    position: fixed; left: 14px; bottom: 12px; z-index: 30;
    font-family: var(--tj-mono); font-size: 11px; color: var(--tj-muted);
    background: rgba(246, 245, 241, 0.8); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--tj-line);
}
.concept-tag .ph { font-size: 10px; padding: 0 4px; }

/* ---------- Reveal (only with JS; without it everything is simply visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .window .window__edge { transform: scale(0); transition: transform 0.45s cubic-bezier(0.6, 0, 0.2, 1); }
.js .window.is-in .window__edge { transform: scale(1); }
.js .window.is-in .window__edge--r { transition-delay: 0.35s; }
.js .window.is-in .window__edge--b { transition-delay: 0.7s; }
.js .window.is-in .window__edge--l { transition-delay: 1.05s; }
.js .window .window__glass { opacity: 0; transition: opacity 0.6s ease 1.3s; }
.js .window.is-in .window__glass { opacity: 1; }
.js .window.reveal { transform: none; opacity: 1; }

/* ---------- Plain-page fallback: no canvas / no 3D ---------- */
.no-scene .scene { display: none; }
.no-scene .story { min-height: auto; padding-top: 96px; padding-bottom: 32px; }
.no-scene .story--boot { display: none; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
    .tj-nav__links { display: none; }
    .story { align-items: flex-end; justify-content: center; padding: 96px 16px 32px; }
    .story--top { align-items: flex-start; }
    .glass, .glass--wide, .hero { max-width: none; width: 100%; }
    .glass { padding: 24px 22px; }
    .window__glass { padding: 28px 22px; }
    .method, .team { grid-template-columns: 1fr; gap: 18px; }
    .concept-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal, .js .window .window__edge, .js .window .window__glass { transition: none; }
}

/* Drive mode (Remotion screen capture): no wall-clock transitions; every frame is painted exactly */
.tj-drive *, .tj-drive *::before, .tj-drive *::after { transition: none !important; animation: none !important; }
html.tj-drive { scroll-behavior: auto !important; }
html.tj-drive { scrollbar-width: none; }
html.tj-drive::-webkit-scrollbar { display: none; }
html.tj-drive, html.tj-drive body { overflow: hidden; height: 100%; }
html.tj-drive main { will-change: transform; }

/* Team: two founders with photos */
.team--2 { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; }
.team__photo { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 25%; margin-bottom: 12px; border: 2px solid #fff; box-shadow: 0 4px 14px -6px rgba(35, 38, 43, 0.35); }
.hero__fact strong { color: var(--tj-ink); font-weight: 700; }
.philosophy { max-width: 60ch; margin-left: auto; margin-right: auto; font-size: 0.95rem; color: var(--tj-ink); font-style: italic; }

/* Method window appears promptly on first scroll */
.js .window.is-in .window__edge--r { transition-delay: 0.12s; }
.js .window.is-in .window__edge--b { transition-delay: 0.24s; }
.js .window.is-in .window__edge--l { transition-delay: 0.36s; }
.js .window .window__edge { transition-duration: 0.3s; }
.js .window .window__glass { transition: opacity 0.4s ease 0.15s; }
@media (max-width: 760px) { .team--2 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Subpages: case pages, contact, privacy (same language as the homepage)
   ========================================================================== */
.tj-sub .story { min-height: 92vh; }
.tj-sub .story--tall { min-height: 110vh; }
.sub-h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; max-width: 16ch; }
.glass--wide .sub-h1 { margin: 0 auto; }
.back { display: inline-block; margin-bottom: 18px; font-size: 0.875rem; font-weight: 600; color: var(--tj-muted); text-decoration: none; }
.back:hover { color: var(--tj-ink); }
.eyebrow .chip { letter-spacing: 0.04em; }
.sub-facts { display: flex; flex-wrap: wrap; gap: 18px 40px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--tj-line); max-width: 560px; }
.sub-facts dt { font-size: 0.75rem; color: var(--tj-muted); }
.sub-facts dd { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--tj-ink); }
.glass--steps { max-width: 520px; }
.sub-steps { list-style: none; display: grid; gap: 16px; margin-top: 8px; }
.sub-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.sub-steps__n { font-family: var(--tj-mono); font-size: 0.75rem; color: var(--tj-muted); padding-top: 3px; }
.sub-steps h3 { margin-bottom: 2px; }
.sub-steps p { font-size: 0.9375rem; }
.glass--wide p { max-width: 64ch; margin-left: auto; margin-right: auto; }
.lead--center { margin-left: auto; margin-right: auto; max-width: 52ch; }

.sub-foot { position: relative; z-index: 1; text-align: center; padding: 60px 16px 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-top: 1px solid var(--tj-line); background: rgba(246, 245, 241, 0.85); }
.sub-foot .end__brand { font-size: 1.8rem; }

/* contact form */
.sub-contact { min-height: auto !important; padding-top: 120px; }
.sub-contact .glass--wide { max-width: 820px; }
.tj-form { display: grid; gap: 16px; margin-top: 30px; text-align: left; }
.tj-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tj-form label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--tj-ink); }
.tj-form input, .tj-form select, .tj-form textarea {
    font: 400 1rem/1.4 'Inter', sans-serif; color: var(--tj-ink); padding: 12px 14px;
    border: 1px solid rgba(35, 38, 43, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.9);
}
.tj-form input:focus, .tj-form select:focus, .tj-form textarea:focus { outline: none; border-color: var(--tj-gold); box-shadow: 0 0 0 3px rgba(212, 155, 23, 0.2); }
.tj-form .tj-form__consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--tj-muted); font-size: 0.8125rem; }
.tj-form__consent input { width: auto; margin-top: 3px; }
.tj-form button { justify-self: start; border: 0; cursor: pointer; }
.form-status { min-height: 1.2em; font-size: 0.9rem; }
.form-status--ok { color: #2E7D32; }
.form-status--err { color: #B3261E; }
.tj-form__direct { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--tj-line); text-align: left; align-items: center; }
.tj-form__mail { font-size: 0.9rem; }

/* privacy */
.sub-legal { min-height: auto !important; padding-top: 120px; align-items: flex-start; }
.glass--legal { max-width: 860px; text-align: left; }
.glass--legal .sub-h1 { margin: 0 0 24px; }
.legal h2 { font-size: 1.25rem; margin: 28px 0 8px; }
.legal p, .legal li, .legal td, .legal th { color: var(--tj-muted); font-size: 0.95rem; max-width: none; margin-left: 0; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.legal th, .legal td { text-align: left; border: 1px solid var(--tj-line); padding: 8px 10px; }
.legal a { color: var(--tj-ink); }

@media (max-width: 760px) {
    .tj-form__row, .tj-form__direct { grid-template-columns: 1fr; }
    .sub-contact, .sub-legal { padding-top: 96px; }
}
.glass--legal p, .glass--legal .eyebrow { margin-left: 0; margin-right: 0; max-width: none; }
.tj-form input:not([type=checkbox]), .tj-form select, .tj-form textarea { width: 100%; min-width: 0; }
.tj-form label { min-width: 0; }

/* Page transition: leaving the homepage through a petal */
main, .concept-tag { transition: opacity 0.35s ease; }
.tj-leaving main, .tj-leaving .concept-tag { opacity: 0; pointer-events: none; }
/* Arriving on a case page: content fades in once the particles have landed */
.tj-arriving main, .tj-arriving .sub-foot { opacity: 0; }
.tj-sub main, .tj-sub .sub-foot { transition: opacity 0.6s ease; }

/* In-place case view (single page) */
.scene--case { opacity: 0; }
.case-view { position: relative; z-index: 1; transition: opacity 0.6s ease; }
.case-view.is-arriving { opacity: 0; pointer-events: none; }
.case-view .story { min-height: 92vh; }
.case-view .story--tall { min-height: 110vh; }
.tj-incase .concept-tag { opacity: 1; }

/* HS page: link to the live classifier */
.app-line { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 0.875rem; }
.app-line span { color: var(--tj-muted); }
.app-line span a { color: var(--tj-ink); }
.app-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tj-btn--ghost { background: transparent; color: var(--tj-ink); border: 1.5px solid rgba(35, 38, 43, 0.35); }
.tj-btn--ghost:hover { border-color: var(--tj-ink); transform: translateY(-1px); }

/* Cookie consent */
.tj-cookie {
    position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translate(-50%, 16px); opacity: 0;
    width: min(680px, calc(100% - 24px)); display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap;
    padding: 16px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(35, 38, 43, 0.12); box-shadow: 0 20px 50px -24px rgba(35, 38, 43, 0.45);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.tj-cookie.is-in { opacity: 1; transform: translate(-50%, 0); }
.tj-cookie p { flex: 1 1 320px; font-size: 0.875rem; margin: 0; }
.tj-cookie a { color: var(--tj-ink); }
.tj-cookie__actions { display: flex; gap: 10px; }
.tj-cookie .tj-btn { padding: 9px 18px; font-size: 0.875rem; cursor: pointer; border: 0; }
.tj-cookie .tj-btn--ghost { border: 1.5px solid rgba(35, 38, 43, 0.35); }
.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; }
