/* Shared layout for Atlas Arbitrage app marketing pages (<slug>.html).
   Same structure as the Traders of Venice page (venice.html / venice.css), with every colour
   and font behind a token. Do not put app colours here: each page links product.css, then
   its own <slug>.css, which sets the tokens below in :root and adds page-only rules.

   Copy this file to the repo root as product.css the first time a page needs it; after that,
   every product page shares it. Change it carefully: it affects every product page. */

:root {
    /* ---- Theme tokens: every page's <slug>.css overrides all of these ---- */
    --brand: #2F4A6D;          /* header bar, links, step numbers, table heads, captions */
    --brand-deep: #1E3048;     /* footer background, link hover */
    --accent: #D9822B;         /* focus rings, small emphasis; must reach 3:1 on --page-bg */
    --on-brand: #FFFFFF;       /* text on --brand and --brand-deep */
    --hero-fallback: #14202F;  /* hero colour while its image loads, or with no image */
    --hero-overlay: rgba(0, 0, 0, 0.42); /* darkens the hero image so white text passes AA */
    --hero-soft: #E4ECF5;      /* eyebrow and caption text on the hero */
    --page-bg: #FFFFFF;
    --band: #EEF3F8;           /* alternate section background */
    --band-light: #F6F9FC;     /* lighter alternate section background */
    --card: #E6EDF5;           /* step cards, tiles, striped table rows */
    --line: #C9D5E3;           /* borders around screenshots, tables, cards */
    --ink: #1F2933;            /* body text */
    --link: var(--brand);      /* link text; must pass AA on --page-bg and both bands */
    --caption: var(--brand);   /* figure captions and small print; same rule */
    --footer-soft: #C9D5E3;    /* small print in the footer */

    --display-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --body-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display-weight: 700;

    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);

    /* ---- Layout constants: not theme ---- */
    --header-height: 56px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--body-font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--page-bg);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, p, figure, ol, ul {
    margin: 0;
}

h1, h2, h3 {
    font-family: var(--display-font);
    font-weight: var(--display-weight);
    line-height: 1.15;
    text-wrap: balance;
}

a {
    color: var(--link);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--brand-deep);
}

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

[id] {
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.skip-link {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    z-index: 30;
    padding: 0.6rem 1rem;
    background: var(--page-bg);
    color: var(--brand-deep);
    border-radius: 0 0 8px 8px;
}

.skip-link:focus {
    top: 0;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.wrap--narrow {
    max-width: 720px;
}

/* ---------- App Store badge ----------
   Apple's artwork, unaltered: scaled only, never below 40px high, with clear space of a
   quarter of its height on every side (the padding). */
.store-badge {
    display: inline-block;
    padding: 12px;
    line-height: 0;
    vertical-align: top;
}

.store-badge img {
    display: block;
    width: 150px;
    height: 50px;
}

.site-header .store-badge,
.hero .store-badge {
    border-radius: 10px;
}

.site-header .store-badge:focus-visible,
.hero .store-badge:focus-visible {
    outline-color: var(--hero-soft);
    outline-offset: -2px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--brand);
    color: var(--on-brand);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-height);
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.app-icon {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 22.37%;
}

.site-header__name {
    font-family: var(--display-font);
    font-size: 1.1875rem;
    font-weight: var(--display-weight);
    line-height: 1.2;
}

/* Too wide for the header on a narrow phone, where the hero's badge sits just below and
   Safari shows the Smart App Banner. */
.site-header__badge {
    display: none;
    margin-right: -10px;
}

.site-header__badge.store-badge {
    padding: 10px;
}

.site-header__badge img {
    width: 120px;
    height: 40px;
}

/* ---------- Hero ----------
   <slug>.css sets the image: .hero { background-image: url("images/<slug>/hero-bg.webp"); } */
.hero {
    position: relative;
    isolation: isolate;
    color: #fff;
    background: var(--hero-fallback) center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--hero-overlay);
}

.hero__inner {
    display: grid;
    gap: 2.5rem;
    padding-top: 1.25rem;
    padding-bottom: 3rem;
    text-align: center;
}

.hero__emblem {
    display: block;
    width: 84px;
    height: 84px;
    margin: 0 auto 0.35rem;
}

.hero__eyebrow {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--hero-soft);
}

.hero h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(2.125rem, 1.35rem + 3.6vw, 3.75rem);
    line-height: 1.08;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero__lede {
    max-width: 34em;
    margin: 0 auto 1.1rem;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero__trust {
    margin-top: 1rem;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero__small {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Screenshots ---------- */
.shot img {
    display: block;
    width: 100%;
    box-shadow: var(--shadow);
}

.shot figcaption,
.wide-figure figcaption {
    margin-top: 0.9rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--caption);
    text-align: center;
    text-wrap: balance;
}

.hero .hero__shot figcaption {
    color: var(--hero-soft);
}

.shot--phone {
    width: min(78vw, 320px);
    margin-inline: auto;
}

.shot--phone.hero__shot {
    width: min(70vw, 300px);
}

.shot--phone.shot--large {
    width: min(92vw, 400px);
}

/* Elliptical radii keep the corners circular on a 1320 x 2868 iPhone 6.9" capture.
   For another capture size, set border-radius in <slug>.css: 9.5% / (9.5% * w / h). */
.shot--phone img {
    border-radius: 9.5% / 4.37%;
}

/* Whole 2064 x 2752 iPad 13" captures. The radius hides the system resize handle in the
   bottom-right corner (needs 5.5% of the width). */
.shot--tablet img {
    border: 1px solid var(--line);
    border-radius: 6% / 4.5%;
}

/* A crop out of a screenshot; only when the brief says to crop. */
.shot--crop img {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--page-bg);
}

/* ---------- Sections ---------- */
.section {
    padding: 3.5rem 0;
}

.section--band {
    background: var(--band);
}

.section--band-light {
    background: var(--band-light);
}

.section--centered {
    text-align: center;
}

.section__title {
    margin-bottom: 1.25rem;
    font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
}

.lede {
    max-width: 36em;
    font-size: 1.125rem;
}

.lede + .lede {
    margin-top: 1rem;
}

.section--centered .lede {
    margin-inline: auto;
}

.section__link {
    margin-top: 1.75rem;
}

/* ---------- Numbered steps (how it works) ---------- */
.steps {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    padding: 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
    counter-increment: step;
}

.step::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.75rem;
    font-family: var(--display-font);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: var(--on-brand);
    background: var(--brand);
    border-radius: 50%;
}

.step h3 {
    margin-bottom: 0.4rem;
    font-size: 1.3125rem;
}

.closing-line {
    margin-top: 2rem;
    font-family: var(--display-font);
    font-size: 1.3125rem;
    line-height: 1.35;
    text-align: center;
}

.feature-shot {
    max-width: 760px;
    margin: 2.5rem auto 0;
}

/* ---------- Full-width image (Venice: the map) ---------- */
.wide-figure {
    max-width: 1400px;
    margin: 2rem auto 0;
}

.wide-figure img {
    display: block;
    width: 100%;
}

.wide-figure figcaption {
    padding: 0 1.25rem;
}

/* ---------- Table beside a screenshot (Venice: cities and goods) ---------- */
.table-split {
    display: grid;
    gap: 2.5rem;
    margin-top: 3rem;
}

.table-split > *,
.split > *,
.work > *,
.trio > * {
    min-width: 0;
}

.table-split h3 {
    margin-bottom: 1rem;
    font-size: 1.375rem;
}

.data-table {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-spacing: 0;
    overflow: hidden;
    font-size: 0.9375rem;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.6rem;
}

.data-table thead th {
    color: var(--on-brand);
    background: var(--brand);
    font-weight: 600;
}

.data-table tbody th {
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
    background: var(--card);
}

.table-split__note {
    margin-top: 1rem;
}

.table-split__shot {
    width: min(92vw, 480px);
    margin-inline: auto;
}

/* ---------- Text beside a screenshot ---------- */
.split {
    display: grid;
    gap: 2.5rem;
}

/* ---------- Feature list with screenshots (Venice: routes and warehouses) ---------- */
.work {
    display: grid;
    gap: 1.75rem;
    margin-top: 2rem;
}

.work + .work {
    margin-top: 3rem;
}

.work__item {
    padding-left: 1rem;
    border-left: 3px solid var(--line);
}

.work__item h3 {
    margin-bottom: 0.35rem;
    font-size: 1.375rem;
}

.work__item p {
    max-width: 34em;
}

/* ---------- Short list of options (Venice: ways to play) ---------- */
.modes {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.mode h3 {
    margin-bottom: 0.3rem;
    font-size: 1.3125rem;
}

.mode p {
    max-width: 36em;
}

/* ---------- Three cards (Venice: learn, earn, sound) ---------- */
.trio {
    display: grid;
    gap: 1rem;
}

.trio__card {
    padding: 1.5rem;
    background: var(--page-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.trio__title {
    margin-bottom: 0.75rem;
    font-size: 1.625rem;
}

.badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem 1.25rem;
    margin: 1.1rem 0 1.25rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge img {
    flex: none;
    width: 64px;
    height: 64px;
}

.badge figcaption {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--caption);
}

/* ---------- Promise tiles (Venice: no strings) ---------- */
.tiles {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding: 0;
    list-style: none;
}

.tile {
    padding: 1.5rem 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
}

.tile h3 {
    margin-bottom: 0.4rem;
    font-size: 1.375rem;
}

/* ---------- FAQ ---------- */
.faq {
    margin-top: 2rem;
}

.faq__item {
    margin-bottom: 1.6rem;
    break-inside: avoid;
}

.faq__item h3 {
    margin-bottom: 0.3rem;
    font-family: var(--body-font);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
}

.faq__item p + p {
    margin-top: 0.4rem;
}

/* ---------- Final call ---------- */
.final-cta {
    padding: 4.5rem 0;
}

.final-cta .store-badge {
    margin-top: 1rem;
}

.final-cta__small {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--caption);
}

/* ---------- Footer ---------- */
.footer {
    padding: 2.5rem 0;
    font-size: 0.875rem;
    color: var(--footer-soft);
    background: var(--brand-deep);
    text-align: center;
}

.footer a {
    color: var(--on-brand);
}

.footer a:focus-visible {
    outline-color: var(--on-brand);
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.6rem;
}

.footer__credit {
    max-width: 46em;
    margin: 1.5rem auto 0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ---------- Small phones ----------
   Keep the hero's trust line above the fold on a 375 x 553 Safari viewport. */
@media (max-width: 400px) {
    .hero__inner {
        padding-top: 0.75rem;
    }

    .hero__emblem {
        width: 64px;
        height: 64px;
    }

    .hero h1 {
        margin-bottom: 0.6rem;
    }

    .hero__lede {
        margin-bottom: 0.9rem;
    }
}

@media (max-width: 359px) {
    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.45rem 0.4rem;
    }
}

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
    :root {
        --header-height: 60px;
    }

    .site-header__badge {
        display: block;
    }

    .data-table {
        font-size: 1rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.55rem 0.9rem;
    }

    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 760px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 860px) {
    .wrap {
        padding: 0 2rem;
    }

    .section {
        padding: 5.5rem 0;
    }

    .hero__inner {
        grid-template-columns: 1fr 300px;
        align-items: center;
        gap: 4rem;
        padding-top: 4rem;
        padding-bottom: 4.5rem;
        text-align: left;
    }

    .hero__emblem {
        width: 120px;
        height: 120px;
        margin: 0 0 0.5rem;
    }

    .hero__eyebrow {
        font-size: 1rem;
    }

    .hero__lede {
        margin-left: 0;
        font-size: 1.1875rem;
    }

    /* The clear space stays; the artwork lines up with the text. */
    .hero__badge {
        margin-left: -12px;
    }

    .shot--phone.hero__shot {
        width: 300px;
    }

    .table-split {
        grid-template-columns: 1fr minmax(0, 480px);
        gap: 3.5rem;
        align-items: start;
    }

    .table-split__shot {
        width: auto;
    }

    .split {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 4rem;
    }

    .split .shot--phone {
        width: 320px;
    }

    .split .shot--phone.shot--large {
        width: 400px;
    }

    .work {
        grid-template-columns: 1fr minmax(0, 620px);
        align-items: center;
        gap: 3.5rem;
    }

    .faq {
        columns: 2;
        column-gap: 4rem;
    }

    .final-cta {
        padding: 7rem 0;
    }
}

@media (min-width: 960px) {
    .trio {
        grid-template-columns: 1fr 1.55fr 1fr;
    }

    .tiles {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .wide-figure img {
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
}
