/* Hallmark · genre: modern-minimal · macrostructure: 15 Split Studio (marketing) · 14 Narrative Workflow (services) · 12 Letter (contact, 404) · design-system: design.md · designed-as-app
 * Hallmark · pre-emit critique: P5 H5 E5 S4 R5 V4
 *
 * Section styles for the three page families. Loaded after base.css. Shared
 * byte-identical by all 12 locale pages and 404.html.
 *
 * The families never borrow from each other: no diptych appears on a services
 * page, no numbered rail appears on a marketing page. That separation is the
 * only thing keeping three page types from collapsing into one template.
 */

/* ==================== Section scaffolding ====================
 * Section rhythm is deliberately uneven — no two bands share a padding pair.
 */
.band {
    padding-block: var(--space-2xl);
}

.band-tight {
    padding-block: var(--space-xl);
}

.band-wide {
    padding-block: var(--space-3xl);
}

:is(.band, .band-tight, .band-wide) + :is(.band, .band-tight, .band-wide) {
    border-block-start: 1px solid var(--hairline);
}

/* Section head — stacks on mobile (gate 52), never tag-left/heading-right. */
.band-head {
    max-width: var(--measure);
    margin-block-end: var(--space-lg);
}

.band-head .outlier {
    display: block;
    margin-block-end: var(--space-2xs);
}

.band-head p {
    margin-block-start: var(--space-xs);
}

/* ==================== 15 · Split Studio ====================
 * Every major block is a diptych. .diptych-flip swaps which half leads, and
 * the direction alternates down the page. The proof half is a real screenshot,
 * a rule-separated list, or a numeral — never drawn UI chrome (gate 47).
 */
.diptych {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* gate 50 */
    gap: var(--space-xl);
    align-items: center;
}

.diptych-words {
    min-width: 0;
}

.diptych-proof {
    min-width: 0;
}

.diptych-flip .diptych-words {
    order: 2;
}

.diptych-flip .diptych-proof {
    order: 1;
}

.diptych-words .outlier {
    display: block;
    margin-block-end: var(--space-2xs);
}

.diptych-words p {
    margin-block-start: var(--space-sm);
}

.diptych-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-block-start: var(--space-lg);
}

/* ---- Proof variant A · real screenshot in a hairline figure (gate 47) ---- */
.shot {
    margin: 0;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--card);
}

.shot img {
    width: 100%;
    height: auto;
}

.shot figcaption {
    padding: var(--space-xs) var(--space-sm);
    border-block-start: 1px solid var(--hairline);
    color: var(--text-dim);
    font-size: var(--text-xs);
}

/* ---- Proof variant B · rule-separated list ---- */
.rule-list {
    display: grid;
    gap: 0;
}

.rule-list li {
    padding-block: var(--space-sm);
    border-block-start: 1px solid var(--hairline);
}

.rule-list li:first-child {
    border-block-start: none;
    padding-block-start: 0;
}

.rule-list h3 {
    font-size: var(--text-lg);
}

.rule-list p {
    margin-block-start: var(--space-3xs);
    color: var(--text-dim);
    font-size: var(--text-sm);
}

/* ---- Proof variant C · a single numeral ---- */
.numeral {
    display: grid;
    gap: var(--space-2xs);
    padding-inline-start: var(--space-md);
    border-inline-start: 2px solid var(--accent);
}

.numeral b {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: 700;
    line-height: 1;
    letter-spacing: var(--track-display);
    color: var(--text);
}

.numeral span {
    color: var(--text-dim);
    font-size: var(--text-sm);
    max-width: 22ch;
}

.numerals {
    display: grid;
    gap: var(--space-lg);
}

/* The one demo that has no screenshot yet gets a hairline placeholder, not a
 * fake window and not a stock illustration. */
.shot-empty {
    display: grid;
    place-items: center;
    gap: var(--space-2xs);
    aspect-ratio: 16 / 9;
    padding: var(--space-md);
    border: 1px dashed var(--hairline-strong);
    border-radius: var(--radius-card);
    background: var(--card);
    text-align: center;
}

.shot-empty b {
    font-family: var(--font-outlier);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-outlier);
    text-transform: uppercase;
    color: var(--accent-text);
}

.shot-empty span {
    color: var(--text-dim);
    font-size: var(--text-sm);
    max-width: 26ch;
}


/* ==================== Hero — the opening diptych ====================
 * Words lead, proof follows. No centred stack, no filled CTA pair, no
 * "trusted by" bar. The hero is one paragraph of measure and two actions.
 */
.hero {
    padding-block: var(--space-2xl) var(--space-3xl);
}

.hero .diptych {
    align-items: start;
    gap: var(--space-2xl);
}

.hero h1 {
    margin-block-start: var(--space-2xs);
}

.hero .lede {
    margin-block-start: var(--space-md);
}

/* ==================== Work carousel ====================
 * The demo band. One slide is itself a diptych — screenshot plus a short read.
 * Autoplay is opt-out by design: it stops on hover, on focus-within, when the
 * tab is hidden, and when the reader presses pause. The status line is live.
 */
.carousel {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: var(--radius-card);
    /* Drag horizontally, scroll vertically — the browser keeps the page scroll,
     * the script keeps the swipe. */
    touch-action: pan-y;
    cursor: grab;
}

.carousel[data-dragging="true"] .carousel-viewport {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    /* --drag is the live finger offset in px; it is 0 except mid-swipe. */
    translate: calc(var(--i, 0) * -100% + var(--drag, 0px)) 0;
    transition: translate var(--dur-long) var(--ease-out);
}

[dir="rtl"] .carousel-track {
    translate: calc(var(--i, 0) * 100% + var(--drag, 0px)) 0;
}

/* While a finger is down the track must follow it exactly — a transition here
 * would lag the drag by 620ms. */
.carousel[data-dragging="true"] .carousel-track {
    transition: none;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: center;
}

/* Off-screen slides are hidden by the viewport clip, not by `visibility` —
 * hiding them outright made the outgoing slide vanish the instant the script
 * flipped aria-hidden, so the track slid a blank space in and out. They stay
 * out of the a11y tree via aria-hidden and out of the tab order via tabindex,
 * both written by site.js. */
.carousel-slide[aria-hidden="true"] {
    pointer-events: none;
}

.slide-words h3 {
    margin-block-start: var(--space-2xs);
}

.slide-words p {
    margin-block-start: var(--space-xs);
    color: var(--text-dim);
}

.slide-words .link {
    margin-block-start: var(--space-md);
}

.carousel-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-block-start: var(--space-md);
    padding-block-start: var(--space-sm);
    border-block-start: 1px solid var(--hairline);
}

/* ---- Direction controls ----
 * They live in the bar, not floating over the screenshot — drawn chrome on top
 * of real work is exactly what this system refuses (gate 47).
 */
.carousel-nav {
    display: flex;
    gap: var(--space-3xs);
}

.carousel-arrow {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-input);
    color: var(--text-dim);
    transition: border-color var(--dur-short) var(--ease-out),
                color var(--dur-short) var(--ease-out);
}

.carousel-arrow:hover {
    border-color: var(--hairline-strong);
    color: var(--text);
}

.carousel-arrow svg {
    width: 0.5rem;
    height: 0.75rem;
}

/* The chevron points along the reading direction, so it mirrors with the page.
 * scale is a separate slot from translate, so nothing else is disturbed. */
[dir="rtl"] .carousel-arrow svg {
    scale: -1 1;
}

.carousel-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    padding: var(--space-3xs) var(--space-2xs);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-input);
    color: var(--text-dim);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap; /* gate 49 */
    transition: border-color var(--dur-short) var(--ease-out),
                color var(--dur-short) var(--ease-out);
}

.carousel-toggle:hover {
    border-color: var(--hairline-strong);
    color: var(--text);
}

.carousel-toggle svg {
    width: 0.6875rem;
    height: 0.6875rem;
}

/* One glyph at a time; the script flips data-playing. */
.carousel-toggle .icon-play {
    display: none;
}

.carousel-toggle[data-playing="false"] .icon-play {
    display: block;
}

.carousel-toggle[data-playing="false"] .icon-pause {
    display: none;
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    margin-inline-start: auto;
}

/* A 3px rule you can actually hit: the rule is drawn in the content box, the
 * touch target is the padding around it. The rule doubles as this slide's
 * clock — site.js writes --p (0 → 1) on the current dot's fill each frame.
 */
.carousel-dots button {
    width: 2.75rem;
    height: 1.5rem;
    padding-block: calc(0.75rem - 1.5px);
    background: var(--hairline-strong);
    background-clip: content-box;
    transition: background-color var(--dur-short) var(--ease-out);
}

.carousel-dots button:hover {
    background-color: var(--text-dim);
}

/* The current dot's track stays grey so the accent fill on top of it can be
 * read as progress. With JS off there is no fill and no clock, so the track
 * itself carries the current state. */
.carousel-dots button[aria-current="true"] {
    background-color: var(--text-dim);
}

.carousel-dots:not([data-timing="true"]) button[aria-current="true"] {
    background-color: var(--accent);
}

.dot-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(var(--p, 0));
}

[dir="rtl"] .dot-fill {
    transform-origin: 100% 50%;
}

.carousel-status {
    color: var(--text-dim);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ==================== 14 · Narrative Workflow ====================
 * Services. Numbered phases run down a vertical rail: the rail is one hairline,
 * the numeral sits on it, the phase text hangs beside it. Rail plus type only —
 * no cards, no screenshots, no three-across grid (design.md § allowances).
 */
.rail {
    display: grid;
    gap: 0;
}

.phase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 5rem) minmax(0, 1fr);
    gap: var(--space-md);
    padding-block: var(--space-xl);
    border-block-start: 1px solid var(--hairline);
}

.phase:first-child {
    border-block-start: none;
}

.phase-num {
    font-family: var(--font-outlier);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: var(--track-outlier);
    color: var(--accent-text);
    padding-block-start: 0.4rem;
}

.phase-body h2 {
    font-size: var(--text-2xl);
}

.phase-body > p {
    margin-block-start: var(--space-sm);
    color: var(--text-dim);
}

.phase-price {
    display: block;
    margin-block-start: var(--space-sm);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.phase-price small {
    display: inline-block;
    margin-inline-end: var(--space-3xs);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-outlier);
    text-transform: uppercase;
}

.phase-price small + small {
    margin-inline: var(--space-2xs) 0;
}

/* Deliverables — a hairline list, one line per item, no check icons. */
.phase-items {
    margin-block-start: var(--space-md);
    display: grid;
    gap: 0;
    max-width: var(--measure);
}

.phase-items li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-sm);
    padding-block: var(--space-2xs);
    border-block-start: 1px solid var(--hairline);
    font-size: var(--text-sm);
}

.phase-items li span:last-child {
    color: var(--text-dim);
    font-family: var(--font-outlier);
    font-size: var(--text-xs);
    letter-spacing: var(--track-outlier);
    text-transform: uppercase;
}

.phase-mark {
    width: 1.375rem;
    height: 1.375rem;
    color: var(--accent-text);
    margin-block-end: var(--space-2xs);
}

/* ==================== 12 · Letter ====================
 * Contact and 404. First person, opens on a greeting, no button in the fold,
 * channels listed as a colophon table rather than cards. Typography and the
 * table are the whole page (design.md § allowances).
 */
.letter {
    padding-block: var(--space-2xl) var(--space-xl);
}

.letter-inner {
    max-width: 34rem;
}

.letter-greeting {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    max-width: none;
}

.letter-body > p {
    margin-block-start: var(--space-md);
}

.letter-sign {
    margin-block-start: var(--space-lg);
    font-family: var(--font-display);
    font-weight: 500;
}

.letter-sign span {
    display: block;
    color: var(--text-dim);
    font-family: var(--font-outlier);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-outlier);
    text-transform: uppercase;
    margin-block-start: var(--space-3xs);
}

/* Channels — a table of ways to reach a person, not four hover cards. */
.channels {
    margin-block-start: var(--space-xl);
    display: grid;
    gap: 0;
    border-block-start: 1px solid var(--hairline);
}

.channel {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 7rem) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-sm);
    padding-block: var(--space-sm);
    border-block-end: 1px solid var(--hairline);
}

.channel img,
.channel svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-dim);
}

.channel-label {
    color: var(--text-dim);
    font-family: var(--font-outlier);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: var(--track-outlier);
    text-transform: uppercase;
}

/* Handles and numbers read left-to-right in every locale — the <bdi> inside the
 * link carries that, not this box. Flipping the box itself would also flip
 * which edge of its grid column it aligns to. */
.channel-value {
    color: var(--text);
    font-size: var(--text-sm);
    text-decoration: none;
    border-block-end: 1px solid transparent;
    justify-self: start;
    overflow-wrap: anywhere;
    transition: color var(--dur-short) var(--ease-out),
                border-color var(--dur-short) var(--ease-out);
}

.channel-value:hover {
    color: var(--accent-text);
    border-block-end-color: var(--accent);
}

/* ==================== Closing band ====================
 * One line, one action. Not a full-bleed accent slab.
 */
.closing {
    padding-block: var(--space-2xl);
    border-block-start: 1px solid var(--hairline);
}

.closing-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-lg);
}

.closing h2 {
    max-width: 24ch;
}

.closing-inner .outlier {
    display: block;
    margin-block-end: var(--space-2xs);
}

.closing-inner p {
    margin-block-start: var(--space-xs);
}

/* ==================== Notice pages ====================
 * The root language redirect. No masthead, no colophon — a page with nowhere
 * to go should not pretend to be part of the site's navigation. 404.html is
 * the same family but carries its own copy of these rules inline, because an
 * error document cannot rely on a stylesheet path resolving.
 */
.notice {
    display: grid;
    place-items: center;
    min-height: 100svh;
    padding-block: var(--space-2xl);
}

.notice-inner {
    max-width: 46ch;
}

.notice-mark {
    display: block;
    margin-block-end: var(--space-md);
}

.notice-inner .outlier {
    display: block;
    margin-block-end: var(--space-2xs);
}

.notice-inner p {
    margin-block-start: var(--space-sm);
}

.notice-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
    list-style: none;
    padding: 0;
    margin-block-start: var(--space-lg);
}

/* ==================== RTL · Latin runs ====================
 * Latin strings inside RTL text come in two shapes, and they need opposite
 * treatments.
 *
 * A · The element's whole content is Latin — the wordmark, the slide counter,
 * the language code, an about-band numeral. The element itself can flip to
 * `ltr`, because there is no RTL word inside it to disturb. But a block that
 * flips to `ltr` also flips where its text starts, which is what stuck the
 * numerals to the left edge of their column; the ones that fill their column
 * get their alignment back below.
 *
 * B · The Latin run sits *inside* an RTL line — `<small>من</small>$500`. Here
 * flipping the container is the bug: it re-orders the Arabic words around the
 * amount, so "من $500" rendered as "$500 من". The isolation belongs to the run
 * alone, which is what `<bdi>` is for. The line keeps the page's direction and
 * only the amount reads left-to-right.
 *
 * This used to live in kurdish.css and arabic.css as two copies of the same
 * list. One copy, keyed on dir, cannot drift.
 */
[dir="rtl"] .wordmark-text,
[dir="rtl"] .carousel-status,
[dir="rtl"] .locale-btn span,
[dir="rtl"] .numeral b {
    font-family: var(--font-latin);
    direction: ltr;
    unicode-bidi: isolate;
}

/* Shape A, the one that fills its column. */
[dir="rtl"] .numeral b {
    text-align: right;
}

/* Shape B — the face only; <bdi> brings its own isolation. */
[dir="rtl"] :is(.phase-price, .channel-value) bdi {
    font-family: var(--font-latin);
}

/* ==================== Responsive ====================
 * Diptychs collapse to a single column and the flip order is dropped, so words
 * always precede their proof in the reading order on a narrow screen.
 */
@media (max-width: 900px) {
    .diptych,
    .carousel-slide,
    .hero .diptych {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-lg);
    }

    .diptych-flip .diptych-words,
    .diptych-flip .diptych-proof {
        order: 0;
    }

    .band-wide {
        padding-block: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    .band,
    .closing {
        padding-block: var(--space-xl);
    }

    .band-tight {
        padding-block: var(--space-lg);
    }

    .hero {
        padding-block: var(--space-xl) var(--space-2xl);
    }

    .letter {
        padding-block: var(--space-xl) var(--space-lg);
    }

    /* Numeral above the phase text — 5rem of rail is not worth 40 % of a
     * 375px screen. (gate 52) */
    .phase {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2xs);
        padding-block: var(--space-lg);
    }

    .phase-num {
        padding-block-start: 0;
    }

    .channel {
        grid-template-columns: 1.25rem minmax(0, 1fr);
        row-gap: var(--space-3xs);
        column-gap: var(--space-2xs);
    }

    .channel-value {
        grid-column: 2;
    }

    .carousel-bar {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    /* Thumb-sized controls once there is no pointer. */
    .carousel-arrow {
        width: 2.75rem;
        height: 2.75rem;
    }

    .carousel-dots {
        order: 3;
        width: 100%;
        margin-inline-start: 0;
    }

    .carousel-dots button {
        flex: 1 1 auto;
        height: 2.75rem;
        padding-block: calc(1.375rem - 1.5px);
    }
}

@media (max-width: 420px) {
    .numeral {
        padding-inline-start: var(--space-sm);
    }

    .phase-items li {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .closing-inner {
        align-items: start;
    }
}











