/* ==========================================================================
   Drafting-table studio theme.
   Sections: tokens · base · chrome · buttons · hero · pages · components ·
             motion · responsive · reduced motion
   ========================================================================== */

:root {
    --bg: #FAF7F0;
    --surface: #ffffff;
    --ink: #0b0b0c;
    --muted: #5c5c61;
    --line: #E4DDCF;
    --accent: #193B8C;
    --accent-ink: #ffffff;
    --accent-2: #0b0b0c;
    --code-bg: #0b0b0c;
    --code-ink: #ecebea;
    --code-ok: #9DB4F0;
    --shadow: 0 1px 0 rgba(11, 11, 12, 0.05), 0 22px 40px -24px rgba(11, 11, 12, 0.4);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --radius: 16px;
    --header-h: 68px;
    --wrap: 1180px;
    color-scheme: light;
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 700;
}
.h3 { font-size: 1.5rem; margin-top: 2.6rem; margin-bottom: 0.9rem; }
.h3:first-child { margin-top: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 200;
    background: var(--ink);
    color: var(--bg);
    padding: 0.6rem 1rem;
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------------------------------------------------------------- Chrome */
/* Dot cursor: replaces the arrow on mouse devices */
.has-dot-cursor, .has-dot-cursor a, .has-dot-cursor button, .has-dot-cursor summary, .has-dot-cursor label { cursor: none; }
.has-dot-cursor input, .has-dot-cursor textarea { cursor: text; }
.has-dot-cursor select { cursor: pointer; }
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 150;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    opacity: 0;
    transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), opacity 0.2s, background 0.2s;
    will-change: transform;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.cursor.is-text { opacity: 0; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.5); }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    transition: transform 0.4s var(--ease), border-radius 0.4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-10deg) scale(1.08); border-radius: 50%; }

.nav ul { display: flex; gap: 0.15rem; }
.nav a {
    position: relative;
    display: block;
    padding: 0.5rem 0.85rem;
    text-decoration: none;
    font-size: 0.96rem;
    color: var(--muted);
    transition: color 0.2s;
}
.nav a::after {
    content: "";
    position: absolute;
    inset-inline: 0.85rem;
    bottom: 0.2rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.4s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); background: var(--surface); }

.menu-btn { display: none; }
.burger { position: relative; width: 18px; height: 12px; }
.burger i { position: absolute; inset-inline: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease), top 0.35s var(--ease); }
.burger i:first-child { top: 1px; }
.burger i:last-child { top: 9px; }
.menu-btn[aria-expanded="true"] .burger i:first-child { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:last-child { top: 5px; transform: rotate(-45deg); }

/* --------------------------------------------------------------- Buttons */
.btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.45rem;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
    will-change: transform;
}
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary::before { background: var(--ink); }
.btn-primary:hover { color: var(--bg); box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--accent) 70%, transparent); }

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); }

.btn-small { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.1rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; color: var(--accent); }
.link-arrow .arrow { transition: transform 0.35s var(--ease); }
a:hover > .link-arrow .arrow, .link-arrow:hover .arrow { transform: translateX(6px); }

/* ------------------------------------------------------------------ Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 7rem); }

.hero-grid, .page-head-grid {
    position: absolute;
    inset: 0;
    --mx: 50%;
    --my: 30%;
    background-image: radial-gradient(circle, var(--ink) 1px, transparent 1.4px);
    background-size: 28px 28px;
    opacity: 0.2;
    -webkit-mask-image: radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.16) 70%, rgba(0, 0, 0, 0.08) 100%);
    mask-image: radial-gradient(circle 280px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.16) 70%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-inner { position: relative; display: grid; gap: 3.2rem; align-items: center; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); max-width: 15ch; }
.lead { color: var(--muted); font-size: 1.18rem; max-width: 58ch; margin-top: 1.3rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.2rem; }
.chips li {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.32rem 0.75rem;
    border: 1px dashed var(--line);
    border-radius: 6px;
    color: var(--muted);
    transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.chips li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Terminal */
.terminal {
    background: var(--code-bg);
    color: var(--code-ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--line);
}
.terminal-bar { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #4a5250; }
.dots i:first-child { background: var(--accent); }
.terminal-title { font-family: var(--font-mono); font-size: 0.78rem; color: #8b948f; }
.terminal-body {
    margin: 0;
    padding: 1.3rem 1.3rem 1.5rem;
    min-height: 16rem;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.95;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.t-ok { color: var(--code-ok); }
.t-arrow { color: var(--accent); }
.caret {
    display: inline-block;
    width: 0.6em;
    height: 1.05em;
    background: var(--code-ink);
    vertical-align: text-bottom;
    margin-inline-start: 2px;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding-block: 0.9rem; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; flex-shrink: 0; }
.marquee li {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    padding-inline: 1.6rem;
    color: var(--muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3.2rem;
    transition: color 0.25s;
}
.marquee li::after { content: "✦"; color: var(--accent); font-size: 0.9rem; }
.marquee li:hover { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----------------------------------------------------------- Page header */
.page-head { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head .wrap { position: relative; }
.page-head h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); max-width: 20ch; }
.page-head--full { padding-block: clamp(5rem, 14vw, 9rem); }
.page-head--full .btn { margin-top: 1.6rem; }

.crumbs { margin-bottom: 1.6rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.4rem; opacity: 0.6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }

/* -------------------------------------------------------------- Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 2.8rem; max-width: 46rem; }
.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
.section-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.section-row .section-head { margin-bottom: 2.8rem; }
.section-row > .btn { margin-bottom: 2.8rem; }

/* spotlight that follows the cursor over a card */
.spot { position: relative; isolation: isolate; }
.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 17%, transparent), transparent 62%);
    transition: opacity 0.35s;
}
.spot:hover::before { opacity: 1; }

.tilt { transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s; transform-style: preserve-3d; will-change: transform; }

/* Home: service cards */
.cards3 { display: grid; gap: 1.2rem; }
.service-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.9rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s;
}
.service-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.service-num { font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; }
.service-card h3 { font-size: 1.55rem; }
.service-card p { color: var(--muted); }
.mini-list { margin-block: 0.4rem 0.8rem; }
.mini-list li { padding-inline-start: 1.1rem; position: relative; font-size: 0.96rem; margin-block: 0.25rem; }
.mini-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.service-card .link-arrow { margin-top: auto; padding-top: 0.6rem; }

/* Services page */
.svc { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc-num { font-family: var(--font-mono); font-size: 1rem; color: var(--accent); display: block; margin-bottom: 0.6rem; }
.svc h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.svc .btn { margin-top: 1.6rem; }
.svc-detail { display: grid; gap: 1rem; align-content: start; }
.svc-block { padding: 1.6rem 1.7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.35s var(--ease); }
.svc-block:hover { border-color: var(--ink); transform: translateX(6px); }
.svc-block h3 { font-size: 0.78rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }

.ticks li { position: relative; padding-inline-start: 1.7rem; margin-block: 0.4rem; }
.ticks li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0.1rem;
    top: 0.55em;
    width: 0.8rem;
    height: 0.45rem;
    border-inline-start: 2px solid var(--accent-2);
    border-bottom: 2px solid var(--accent-2);
    transform: rotate(-45deg);
}
.ticks--lg li { font-size: 1.1rem; }
.plain li { color: var(--muted); margin-block: 0.35rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--line); transition: border-color 0.25s, color 0.25s; }
.plain li:hover { border-color: var(--accent); color: var(--ink); }

/* ------------------------------------------------------------------ Work */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.2rem; }
.filter {
    font: inherit;
    font-size: 0.95rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.filter:hover { border-color: var(--ink); transform: translateY(-2px); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.projects { display: grid; gap: 1.4rem; }
.project-item[hidden] { display: none; }
.project-item.is-pop { animation: pop-in 0.5s var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
}
.project-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }

.project-thumb { position: relative; display: block; padding: 1.1rem; background: color-mix(in srgb, var(--c, var(--accent)) 8%, var(--bg)); border-bottom: 1px solid var(--line); overflow: hidden; }
.project-thumb .mock { transition: transform 0.6s var(--ease); }
.project-card:hover .mock { transform: scale(1.045) translateY(-4px); }
.project-chip {
    position: absolute;
    inset-inline-end: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.45s var(--ease), opacity 0.3s;
}
.project-card:hover .project-chip, .project-card:focus-visible .project-chip { transform: none; opacity: 1; }

.project-meta { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.3rem 1.4rem 1.5rem; flex: 1; }
.tag {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.18rem 0.6rem;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent-2) 14%, transparent);
    color: var(--accent-2);
}
.project-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.25;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
    align-self: flex-start;
    transition: background-size 0.45s var(--ease);
}
.project-card:hover .project-title { background-size: 100% 2px; }
.project-summary { color: var(--muted); font-size: 0.98rem; }
.empty { color: var(--muted); padding-block: 2rem; }

/* CSS browser mockup */
.mock {
    --c: var(--accent);
    display: block;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
}
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 0.45rem 0.6rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.mock-bar i:first-child { background: var(--c); }
.mock-bar em { margin-inline-start: 0.5rem; font-style: normal; font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); padding: 0.05rem 0.5rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.mock-body { flex: 1; display: flex; min-height: 0; padding: 0.7rem; gap: 0.6rem; }
.mock b { display: block; border-radius: 4px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.m-main { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.m-side { width: 22%; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.4rem; border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.m-side b { height: 8px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.m-side b:first-child { background: var(--c); }
.m-hero { height: 38%; background: var(--c) !important; }
.m-line { height: 8px; }
.w70 { width: 70%; } .w50 { width: 50%; }
.m-cols { display: flex; gap: 0.4rem; flex: 1; }
.m-cols b { flex: 1; }
.m-kpis { display: flex; gap: 0.4rem; height: 26%; }
.m-kpis b { flex: 1; background: color-mix(in srgb, var(--c) 22%, transparent); border-top: 3px solid var(--c); }
.m-bars { flex: 1; display: flex; align-items: flex-end; gap: 0.35rem; }
.m-bars b { flex: 1; height: var(--h); background: color-mix(in srgb, var(--c) 55%, transparent); transform-origin: bottom; transition: transform 0.6s var(--ease); }
.project-card:hover .m-bars b:nth-child(odd) { transform: scaleY(1.15); }
.project-card:hover .m-bars b:nth-child(even) { transform: scaleY(0.85); }
.m-table { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.m-table b { height: 9px; }
.m-table b:first-child { background: var(--c); width: 100%; }
.m-table b:nth-child(2n+3) { width: 86%; }
.mock--lg { aspect-ratio: 16 / 8; }
.mock--lg .mock-body { padding: 1.3rem; gap: 1rem; }
.mock--lg .m-line { height: 14px; }
.mock--lg .m-table b { height: 16px; }

/* Project detail */
.detail-hero { padding: clamp(1rem, 3vw, 2.2rem); border-radius: var(--radius); background: color-mix(in srgb, var(--c, var(--accent)) 7%, var(--surface)); border: 1px solid var(--line); margin-bottom: 3rem; }
.detail-grid { display: grid; gap: 2.5rem; }
.detail-side { align-self: start; display: grid; gap: 1.4rem; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts { display: grid; gap: 1.1rem; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.3rem; }
.facts dd { font-weight: 500; }
.stack-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack-list li { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 400; padding: 0.25rem 0.65rem; border: 1px solid var(--line); border-radius: 6px; transition: border-color 0.2s, color 0.2s; }
.stack-list li:hover { border-color: var(--accent); color: var(--accent); }
.shots { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shots img { border-radius: 10px; border: 1px solid var(--line); width: 100%; height: auto; transition: transform 0.4s var(--ease); }
.shots img:hover { transform: scale(1.02); }
.shots-empty { padding: 2.2rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.modal-note { color: var(--muted); font-size: 0.95rem; }

.pager { display: grid; gap: 1rem; margin-top: 4rem; }
.pager-link { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); transition: border-color 0.25s, transform 0.35s var(--ease); }
.pager-link:hover { border-color: var(--ink); transform: translateY(-4px); }
.pager-link--next { text-align: end; }
.pager-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.pager-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }

/* --------------------------------------------------------------- Process */
.steps { display: grid; gap: 1rem; }
.step { padding: 1.5rem 1.4rem 1.6rem; border-top: 2px solid var(--ink); position: relative; transition: transform 0.35s var(--ease); }
.step::before { content: ""; position: absolute; inset-inline: 0; top: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.step:hover { transform: translateY(-6px); }
.step:hover::before { transform: scaleX(1); }
.step-num { font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; }
.step h3 { font-size: 1.35rem; margin-block: 0.4rem 0.5rem; }
.step p { color: var(--muted); font-size: 0.98rem; }

.timeline { --p: 0; position: relative; display: grid; gap: 2rem; padding-inline-start: 3.4rem; }
.timeline::before, .timeline::after { content: ""; position: absolute; inset-inline-start: 1.15rem; top: 0; width: 2px; border-radius: 2px; }
.timeline::before { bottom: 0; background: var(--line); }
.timeline::after { height: calc(var(--p) * 100%); background: var(--accent); }
.tl-item { position: relative; }
.tl-dot {
    position: absolute;
    inset-inline-start: -3.4rem;
    top: 0.2rem;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: background 0.4s, border-color 0.4s, color 0.4s, transform 0.5s var(--ease);
}
.tl-item.is-in .tl-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); }
.tl-card { padding: 1.7rem 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.35s var(--ease); }
.tl-card:hover { border-color: var(--ink); transform: translateX(6px); }
.tl-card h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.tl-card > p { color: var(--muted); margin-bottom: 0.9rem; }

/* ----------------------------------------------------------------- Stack */
.stack-groups { display: grid; gap: 1.2rem; }
.stack-group { padding: 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s; }
.stack-group:hover { border-color: var(--ink); }
.stack-group h2 { font-size: 1.4rem; margin-bottom: 1.1rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem 0.45rem 0.45rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s;
}
.badge:hover { transform: translateY(-4px) rotate(-1.5deg); border-color: var(--c); box-shadow: 0 12px 20px -14px var(--c); }
.badge-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-size: 0.7rem; transition: transform 0.4s var(--ease); }
.badge:hover .badge-mark { transform: rotate(360deg); }

/* --------------------------------------------------------------- Pricing */
.tiers { display: grid; gap: 1.4rem; align-items: stretch; }
.tier { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tier:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.tier.is-featured { border: 2px solid var(--accent); }
.tier-badge { position: absolute; inset-block-start: -0.85rem; inset-inline-start: 1.5rem; background: var(--accent); color: var(--accent-ink); font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.85rem; border-radius: 999px; }
.tier h2 { font-size: 1.5rem; }
.tier-for { color: var(--muted); font-size: 0.95rem; }
.tier-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-block: 0.7rem; color: var(--accent); }
.tier-price .from { font-size: 0.9rem; color: var(--muted); font-weight: 500; margin-inline-end: 0.3rem; }
.tier .ticks { flex: 1; margin-bottom: 1.2rem; }

.faq-wrap { max-width: 52rem; }
.faq { display: grid; gap: 0.7rem; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.25s; }
.faq-item:hover, .faq-item[open] { border-color: var(--ink); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; font-weight: 500; font-size: 1.05rem; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; inset: 50% 0 auto; height: 2px; background: var(--accent); border-radius: 2px; transition: transform 0.35s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--muted); animation: fade-down 0.4s var(--ease); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } }

/* ---------------------------------------------------------- Testimonials */
.quotes { display: grid; gap: 1.2rem; }
.quote { padding: 1.7rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); transition: transform 0.35s var(--ease), border-color 0.25s; }
.quote:hover { transform: translateY(-5px); border-color: var(--ink); }
.example-flag { display: inline-block; margin-bottom: 0.9rem; font-family: var(--font-mono); font-size: 0.7rem; padding: 0.18rem 0.55rem; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-radius: 5px; }
.quote blockquote p { font-size: 1.08rem; }
.quote figcaption { margin-top: 1.1rem; display: flex; flex-direction: column; font-size: 0.92rem; color: var(--muted); }
.quote figcaption strong { color: var(--ink); }

/* --------------------------------------------------------------- Contact */
.contact-grid { display: grid; gap: 2.5rem; }
.direct-title { font-size: 1.3rem; }
.direct { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.direct-val { font-family: var(--font-mono); font-size: 0.85rem; }
/* (the old ".phone" phone-number line was removed: that class name belongs
   to the phone mockup on case-study pages, which inherited its mono font
   and margin. The contact page now uses .contact-card--phone.) */

.form { display: grid; gap: 1rem; padding: clamp(1.3rem, 3vw, 2.2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); align-content: start; box-shadow: var(--shadow); }
.field-row { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 500; font-size: 0.95rem; }
.req { color: var(--accent); }
.hint { margin-top: -0.4rem; font-size: 0.85rem; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%;
    font: inherit;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.25s var(--ease);
}
.field input, .field select { min-height: 3.1rem; }
.field input, .field select, .field textarea { -webkit-appearance: none; appearance: none; }
.field select {
    cursor: pointer;
    padding-inline-end: 2.8rem;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%23565d63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px 9px;
}
.field select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%23193B8C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E"); }
.field select:invalid { color: var(--muted); }
.field select option { color: var(--ink); background: var(--surface); }
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-1px); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #d12b2b; }
.field-error { color: #d12b2b; font-size: 0.85rem; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status.is-ok { color: var(--accent-2); }
.form-status.is-error { color: #d12b2b; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -------------------------------------------------------------- CTA band */
.cta-band { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.cta-inner {
    position: relative;
    overflow: hidden;
    padding: clamp(2.2rem, 6vw, 4.5rem);
    border-radius: calc(var(--radius) * 1.5);
    background: var(--ink);
    color: var(--bg);
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 1.1rem;
}
.cta-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, color-mix(in srgb, var(--bg) 30%, transparent) 1px, transparent 1.4px);
    background-size: 26px 26px;
    opacity: 0.35;
    animation: drift 24s linear infinite;
}
@keyframes drift { to { background-position: 260px 130px; } }
.cta-inner > * { position: relative; }
.cta-inner h2 { font-size: clamp(1.9rem, 5vw, 3.3rem); max-width: 18ch; }
.cta-inner p { max-width: 46ch; opacity: 0.75; }
.cta-inner .btn-primary::before { background: var(--bg); }
.cta-inner .btn-primary:hover { color: var(--ink); }

/* ---------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2rem; background: var(--surface); }
.footer-top { display: grid; gap: 2.2rem; }
.footer-brand p { margin-top: 1rem; color: var(--muted); max-width: 32ch; }
.footer-title { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.9rem; }
.footer-links li { margin-block: 0.35rem; }
.footer-links a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.35s var(--ease), color 0.2s; }
.footer-links a:hover { color: var(--accent); background-size: 100% 1.5px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; justify-content: space-between; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.to-top { text-decoration: none; }
.to-top:hover { color: var(--accent); }

/* ---------------------------------------------------------------- Motion */
.js .will-reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
.js .will-reveal[data-r="left"]:not(.is-in)  { transform: translateX(28px); }
.js .will-reveal[data-r="right"]:not(.is-in) { transform: translateX(-28px); }
.js .will-reveal[data-r="scale"]:not(.is-in) { transform: scale(0.96); }
.js .will-reveal { transition: opacity 0.55s var(--ease) var(--d, 0ms), transform 0.55s var(--ease) var(--d, 0ms); }

/* headline word reveal (only applied to headings below the fold) */
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.split-words .wi { display: inline-block; transition: transform 0.7s var(--ease) calc(var(--wi, 0) * 45ms); }
.js .split-words:not(.is-in) .wi { transform: translateY(112%); }

/* --------------------------------------------------------- Breakpoints */
@media (min-width: 640px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .projects { grid-template-columns: repeat(2, 1fr); }
    .quotes { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .stack-groups { grid-template-columns: repeat(2, 1fr); }
    .pager { grid-template-columns: 1fr 1fr; }
    .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 900px) {
    .hero-inner { grid-template-columns: 1.15fr 1fr; }
    .cards3, .tiers { grid-template-columns: repeat(3, 1fr); }
    .projects { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(5, 1fr); gap: 0.6rem; }
    .quotes { grid-template-columns: repeat(3, 1fr); }
    .svc { grid-template-columns: 1fr 1fr; gap: 4rem; }
    .svc-intro { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
    .detail-grid { grid-template-columns: 1fr 340px; gap: 4rem; }
    .detail-side { position: sticky; top: calc(var(--header-h) + 2rem); }
    .contact-grid { grid-template-columns: 0.8fr 1.2fr; gap: 4.5rem; }
    .timeline { max-width: 52rem; margin-inline: auto; }
}

@media (max-width: 899px) {
    .menu-btn { display: inline-grid; }
    .header-cta { display: none; }
    .nav {
        position: absolute;
        inset-inline: 0;
        top: var(--header-h);
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem 1.25rem 1.2rem;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0s 0.4s;
    }
    .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
    .nav ul { flex-direction: column; }
    .nav a { padding: 0.85rem 0.3rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
    .nav a::after { display: none; }
    .nav a.is-active { color: var(--accent); }
}

@media (max-width: 480px) {
    .hero-cta .btn { width: 100%; }
    .form .btn { justify-self: stretch; }
    .timeline { padding-inline-start: 2.9rem; }
    .tl-dot { inset-inline-start: -2.9rem; width: 2.1rem; height: 2.1rem; }
    .timeline::before, .timeline::after { inset-inline-start: 1rem; }
}

@media (hover: none) {
    .cursor { display: none; }
}

/* ---------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .will-reveal, .js .split-words .wi { opacity: 1 !important; transform: none !important; }
    .cursor { display: none; }
    .marquee-track { transform: none; flex-wrap: wrap; }
}

/* ------------------------------------------------- Custom dropdown */
.dd { position: relative; }
.dd-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.dd-btn {
    width: 100%;
    min-height: 3.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem 0.95rem;
    font: inherit;
    text-align: start;
    color: var(--ink);
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dd-btn:hover { border-color: var(--muted); }
.dd-btn:focus-visible, .dd.is-open .dd-btn { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.dd-btn.is-placeholder .dd-text { color: var(--muted); }
.dd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-chev { flex: none; color: var(--muted); transition: transform 0.35s var(--ease), color 0.2s; }
.dd.is-open .dd-chev { transform: rotate(180deg); color: var(--accent); }
.field.has-error .dd-btn { border-color: #d12b2b; }

.dd-list {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 8px);
    z-index: 30;
    max-height: 17rem;
    overflow: auto;
    padding: 0.4rem;
    background: var(--surface);
    border: 1.5px solid var(--ink);
    border-radius: 14px;
    box-shadow: 0 24px 44px -20px rgba(11, 11, 12, 0.5);
    outline: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top;
    transition: opacity 0.2s, transform 0.3s var(--ease), visibility 0s 0.3s;
}
.dd.is-open .dd-list { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.dd-opt {
    position: relative;
    padding: 0.7rem 2.4rem 0.7rem 0.85rem;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dd-opt.is-empty { color: var(--muted); }
.dd-opt.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dd-opt.is-selected { font-weight: 500; color: var(--accent); }
.dd-opt.is-selected::after {
    content: "";
    position: absolute;
    inset-inline-end: 1rem;
    top: 50%;
    width: 0.8rem;
    height: 0.45rem;
    margin-top: -0.35rem;
    border-inline-start: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}
.has-dot-cursor .dd-opt { cursor: none; }
.has-dot-cursor .dd-btn { cursor: none; }
@media (prefers-reduced-motion: reduce) { .dd-list { transition: none; } }

/* Principles (approach) */
.principles { display: grid; gap: 1.2rem; }
.principle { padding: 1.7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s; }
.principle:hover { border-color: var(--ink); transform: translateY(-5px); box-shadow: var(--shadow); }
.principle h2, .principle h3 { font-size: 1.35rem; margin-block: 0.5rem 0.5rem; }
.principle p { color: var(--muted); }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .principles { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------- Black & red refinements */
.site-footer { background: var(--ink); color: #d6d6d8; border-top: 0; }
.site-footer .logo { color: #fff; }
.site-footer .footer-brand p, .site-footer .footer-bottom { color: #9a9aa0; }
.site-footer .footer-title { color: #9a9aa0; }
.site-footer .footer-bottom { border-top-color: #2a2a2d; }
.site-footer .footer-links a:hover, .site-footer .to-top:hover { color: #9DB4F0; }
.hero h1 em, .page-head h1 em { font-style: normal; color: var(--accent); }
.section-alt { background: #ffffff; }
.tag { background: var(--ink); color: #fff; }
.eyebrow { color: var(--accent); }
.btn-ghost:hover { background: var(--ink); }
.cta-inner { background: var(--ink); }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: #bdbdc2; opacity: 1; }
.cta-inner .btn-primary { background: var(--accent); color: #fff; }
.cta-inner .btn-primary::before { background: #fff; }
.cta-inner .btn-primary:hover { color: var(--ink); }
.project-chip { background: var(--accent); color: #fff; }
.tier.is-featured { border-color: var(--accent); }
.header-cta { background: var(--ink); color: #fff; }
.header-cta::before { background: var(--accent); }
.header-cta:hover { color: #fff; box-shadow: none; }

/* Linear scroll timeline (home + process) */
.timeline { padding-inline-start: 4rem; }
.timeline::before { inset-inline-start: 1.2rem; }
.timeline::after { inset-inline-start: 1.2rem; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); }
.tl-item { opacity: 1; }
.tl-card { opacity: 0.62; transition: opacity 0.4s, border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s; }
.tl-item.is-in .tl-card { opacity: 0.85; }
.tl-item.is-current .tl-card { opacity: 1; border-color: var(--accent); box-shadow: var(--shadow); transform: translateX(6px); }
.tl-item.is-current .tl-dot { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-card h2, .tl-card h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.process-split { display: grid; gap: 2.5rem; }
.process-intro .section-head { margin-bottom: 1.8rem; }
@media (min-width: 900px) {
    .process-split { grid-template-columns: 0.8fr 1.2fr; gap: 4.5rem; align-items: start; }
    .process-intro { position: sticky; top: calc(var(--header-h) + 2.5rem); }
    .process-split .timeline { max-width: none; margin: 0; }
}
@media (max-width: 480px) { .timeline { padding-inline-start: 3.1rem; } .timeline::before, .timeline::after { inset-inline-start: 1rem; } }

/* -------------------------------------------------- Case study blocks */
.story { display: grid; gap: 1rem; margin-top: 2.4rem; }
.story-item { padding: 1.4rem 1.5rem; border-inline-start: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.story-item h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.story-item p { color: var(--muted); }

.screens-block, .features-block { margin-top: clamp(3rem, 7vw, 5rem); }
.screens { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.2rem 2rem; padding: clamp(1.6rem, 4vw, 3rem); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4); }
.screen { display: grid; gap: 0.9rem; justify-items: center; text-align: center; }
.screen figcaption { font-size: 0.92rem; color: var(--muted); max-width: 24ch; }
.screens--wide .screen { flex: 1 1 100%; }
.screens--wide .screen figcaption { max-width: none; }
.demo-note { margin-top: 1rem; font-size: 0.88rem; color: var(--muted); text-align: center; }

.features { display: grid; gap: 1rem; }
.feature { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s; }
.feature:hover { border-color: var(--ink); transform: translateY(-5px); box-shadow: var(--shadow); }
.feature h3 { font-size: 1.2rem; margin-block: 0.4rem; }
.feature p { color: var(--muted); font-size: 0.98rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } .story { grid-template-columns: repeat(3, 1fr); } .story-item { border-radius: var(--radius); border-inline-start-width: 1px; border: 1px solid var(--line); border-top: 3px solid var(--accent); } }

/* Phone mockup */
.phone {
    position: relative;
    width: 250px;
    aspect-ratio: 9 / 18.5;
    padding: 9px;
    background: #0b0b0c;
    border-radius: 36px;
    box-shadow: 0 30px 50px -28px rgba(11, 11, 12, 0.7);
    transition: transform 0.5s var(--ease);
}
.screen:hover .phone { transform: translateY(-8px) rotate(-1deg); }
.phone-notch { position: absolute; top: 14px; left: 50%; width: 70px; height: 16px; margin-left: -35px; background: #0b0b0c; border-radius: 10px; z-index: 2; }
.phone-screen { height: 100%; padding: 2.1rem 0.9rem 0.9rem; background: #fff; border-radius: 28px; overflow: hidden; text-align: start; font-size: 0.72rem; line-height: 1.4; color: #0b0b0c; display: flex; flex-direction: column; gap: 0.55rem; }
.u-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.2rem; }
.u-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.u-dot { width: 22px; height: 22px; border-radius: 50%; background: #e8e6e2; }
.u-card { padding: 0.8rem; border: 1px solid #e0deda; border-radius: 12px; display: grid; gap: 0.2rem; }
.u-card small { color: #6b6b70; }
.u-card--ink { background: #0b0b0c; color: #fff; border-color: #0b0b0c; }
.u-card--ink small, .u-card--ink span { color: #b9b9be; }
.u-card--ink b { font-family: var(--font-display); font-size: 1.5rem; }
.u-section { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6b6b70; margin-top: 0.3rem; }
.u-bars { display: flex; align-items: flex-end; gap: 5px; height: 54px; }
.u-bars span { flex: 1; background: #0b0b0c; border-radius: 3px; opacity: 0.85; }
.u-bars span:nth-child(4) { background: var(--accent); }
.u-tx { display: flex; align-items: center; gap: 0.55rem; padding-block: 0.3rem; border-bottom: 1px solid #efede9; }
.u-ico { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f0eeea; font-weight: 700; }
.u-tx-main { flex: 1; display: grid; min-width: 0; }
.u-tx-main small { color: #6b6b70; }
.u-amt { font-weight: 700; white-space: nowrap; }
.u-amt.is-plus { color: #0b0b0c; }
.u-chips { display: flex; gap: 0.35rem; }
.u-chips span { padding: 0.25rem 0.65rem; border: 1px solid #e0deda; border-radius: 99px; font-size: 0.68rem; }
.u-chips span.is-on { background: #0b0b0c; color: #fff; border-color: #0b0b0c; }
.u-budget { display: grid; gap: 0.3rem; padding: 0.65rem; border: 1px solid #e0deda; border-radius: 10px; }
.u-budget-head { display: flex; justify-content: space-between; gap: 0.5rem; }
.u-budget-head small { color: #6b6b70; }
.u-track { height: 7px; background: #efede9; border-radius: 99px; overflow: hidden; }
.u-track span { display: block; height: 100%; background: #0b0b0c; border-radius: 99px; }
.u-chip { align-self: start; justify-self: start; padding: 0.1rem 0.5rem; border-radius: 99px; background: #efede9; font-size: 0.64rem; font-weight: 500; white-space: nowrap; }
.u-chip.is-done { background: #0b0b0c; color: #fff; }
.u-chip.is-alert { background: color-mix(in srgb, var(--accent) 16%, #fff); color: var(--accent); }
.u-sms { padding: 0.7rem; background: #efede9; border-radius: 12px 12px 12px 3px; }
.u-sms small { display: block; color: #6b6b70; margin-bottom: 0.2rem; }
.u-arrow { text-align: center; color: var(--accent); font-weight: 700; }
.u-field { display: flex; justify-content: space-between; padding-block: 0.28rem; border-bottom: 1px solid #efede9; }
.u-field span { color: #6b6b70; }
.u-actions { display: flex; gap: 0.5rem; margin-top: auto; }
.u-btn { flex: 1; text-align: center; padding: 0.55rem; border: 1px solid #0b0b0c; border-radius: 99px; font-weight: 500; }
.u-btn.is-ink { background: #0b0b0c; color: #fff; }

/* Desktop window mockup */
.desk { width: min(100%, 880px); border-radius: 14px; background: #fff; border: 1px solid #d6d3cd; box-shadow: 0 30px 50px -30px rgba(11, 11, 12, 0.6); overflow: hidden; text-align: start; color: #0b0b0c; transition: transform 0.5s var(--ease); }
.screen:hover .desk { transform: translateY(-6px); }
.desk-bar { display: flex; align-items: center; gap: 6px; padding: 0.6rem 0.8rem; background: #f0eeea; border-bottom: 1px solid #e0deda; }
.desk-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9c6c0; }
.desk-bar i:first-child { background: var(--accent); }
.desk-bar em { margin-inline-start: 0.6rem; font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; color: #6b6b70; background: #fff; padding: 0.1rem 0.7rem; border-radius: 99px; }
.desk-body { display: flex; min-height: 280px; font-size: 0.82rem; }
.d-side { flex: none; width: 150px; padding: 0.9rem 0.6rem; background: #0b0b0c; display: grid; align-content: start; gap: 0.15rem; }
.d-side span { padding: 0.45rem 0.7rem; border-radius: 8px; color: #b9b9be; }
.d-side span.is-on { background: var(--accent); color: #fff; }
.d-main { flex: 1; min-width: 0; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.d-main--full { padding: 1.2rem; }
.d-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.d-kpi { padding: 0.8rem; border: 1px solid #e0deda; border-radius: 12px; display: grid; gap: 0.2rem; }
.d-kpi small { color: #6b6b70; font-size: 0.7rem; }
.d-kpi b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.d-row { display: grid; grid-template-columns: 70px 1fr 90px auto; gap: 0.8rem; align-items: center; padding-block: 0.5rem; border-bottom: 1px solid #efede9; }
.d-table { display: grid; }
.d-th, .d-tr { display: grid; grid-template-columns: 0.8fr 1.4fr 1fr 1fr 0.9fr; gap: 0.8rem; align-items: center; padding: 0.6rem 0.4rem; }
.d-table--6 .d-th, .d-table--6 .d-tr { grid-template-columns: 0.8fr 0.8fr 1.8fr 1fr 1fr 0.9fr; }
.d-th { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6b6b70; border-bottom: 2px solid #0b0b0c; }
.d-tr { border-bottom: 1px solid #efede9; }
.d-main .u-chips { margin-bottom: 0.3rem; }

@media (max-width: 640px) {
    .desk:not(.is-fit) .d-side { display: none; }
    .desk:not(.is-fit) .d-kpis { grid-template-columns: repeat(2, 1fr); }
    .desk:not(.is-fit) .d-row { grid-template-columns: 56px 1fr auto; }
    .desk:not(.is-fit) .d-row .u-chip { display: none; }
    .desk:not(.is-fit) .d-th, .desk:not(.is-fit) .d-tr, .desk:not(.is-fit) .d-table--6 .d-th, .desk:not(.is-fit) .d-table--6 .d-tr { grid-template-columns: 1fr 1.4fr 1fr; }
    .desk:not(.is-fit) .d-th span:nth-child(n+4), .desk:not(.is-fit) .d-tr > :nth-child(n+4) { display: none; }
}

/* four phones in one row on desktop */
.screens:not(.screens--wide) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; }
.screens:not(.screens--wide) .phone { width: min(100%, 240px); }
@media (min-width: 1000px) { .screens:not(.screens--wide) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.4rem; } }
@media (max-width: 440px) { .screens:not(.screens--wide) { grid-template-columns: minmax(0, 1fr); } }
.screens--wide { flex-direction: column; }
