/* Site stylesheet — one file for the whole subproject.
   Baseline: Safari 12 / Chrome 70 (2018). Flexbox, grid and custom properties
   are fine; CSS nesting, :has(), container queries, @layer and oklch() are not. */

:root {
    --ink: #10151c;
    --ink-soft: #4a5462;
    --line: #e2e6ea;
    --bg: #ffffff;
    --bg-soft: #f5f7f9;
    --dark: #0f1720;
    --dark-soft: #1b2532;
    --accent: #2f6df0;
    --accent-dark: #2356c4;
    --danger: #c0392b;
    --ok: #1e7a45;
    --radius: 10px;
    --wrap: 1160px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    /* A phone is 280px of content wide. One unbreakable run — an IBAN, a long
       address, a support email — would otherwise widen the whole page and give
       every screen a horizontal scrollbar. */
    overflow-wrap: break-word;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    line-height: 1.25;
    margin: 0 0 16px;
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 20px;
}

p {
    margin: 0 0 16px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- topbar --- */

.topbar {
    background: var(--dark);
    color: #aab4c0;
    font-size: 14px;
}

.topbar__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    gap: 8px 20px;
}

.topbar a {
    color: #dfe5ec;
    margin-left: 18px;
}

.topbar__contacts a:first-child {
    margin-left: 0;
}

/* --- header --- */

.header {
    background: var(--dark-soft);
    position: relative;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}

.logo {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo:hover {
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav a {
    color: #cfd7e0;
    font-size: 15px;
}

.nav a:hover {
    color: #fff;
    text-decoration: none;
}

.nav__cta {
    background: var(--accent);
    color: #fff !important;
    border-radius: var(--radius);
    padding: 9px 18px;
}

.nav__cta:hover {
    background: var(--accent-dark);
}

.nav__burger {
    display: none;
}

/* --- hero --- */

.hero {
    /* The photo carries on its own hero, with its settings: cover,
       centred, and fixed, so it stands still while the band scrolls past it.
       --dark stays underneath — it is what the band shows while the file loads
       and what it keeps if the file is missing. */
    background:
        linear-gradient(rgba(15, 23, 32, 0.68), rgba(15, 23, 32, 0.68)),
        url('../img/hero.jpg') 50% 50% / cover no-repeat fixed,
        var(--dark);
    color: #fff;
    padding: 72px 0;
}

/* The same photo standing still behind another band — the price list. Written
   out rather than shared with .hero through a class of its own: the two agree
   on the background and on nothing else (padding, text colour), and two users
   do not pay for the indirection. */
.section--photo {
    background:
        linear-gradient(rgba(15, 23, 32, 0.68), rgba(15, 23, 32, 0.68)),
        url('../img/hero.jpg') 50% 50% / cover no-repeat fixed,
        var(--dark);
}

/* iOS Safari sizes a `fixed` background to the viewport instead of to the
   element, and repaints it only once the scroll stops: the parallax turns into
   an over-zoomed crop that jumps. Touch devices get the plain attachment — the
   band looks the same standing still, which is how a phone reads it anyway. */
@media (hover: none) {
    .hero,
    .section--photo {
        background-attachment: scroll;
    }
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.hero__kicker {
    color: #8fb0ff;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.hero h1 {
    color: #fff;
    font-size: 46px;
}

.hero__text {
    color: #b9c3ce;
    font-size: 18px;
    max-width: 34em;
}

/* --- sections --- */

.section {
    padding: 64px 0;
}

.section--soft {
    background: var(--bg-soft);
}

.section__kicker {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.section__lead {
    color: var(--ink-soft);
    font-size: 18px;
    max-width: 46em;
}

.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    color: var(--ink-soft);
    margin: 0;
}

/* A card that opens with the project's own picture. The padding moves onto the
   text so the photo can reach the card's edges. */
.card--photo {
    padding: 0;
    overflow: hidden;
}

.card--photo > h3,
.card--photo > p {
    padding: 0 24px;
}

.card--photo > h3 {
    padding-top: 20px;
}

.card--photo > p {
    padding-bottom: 24px;
}

.card__photo {
    display: block;
}

.card__photo img {
    display: block;
    width: 100%;
    /* Cropped to a band rather than shown whole: the source is 1792x1274, and
       at card width that would push the text off the screen. object-fit is
       safe here — Safari has had it since 10, well under our floor of 12. */
    height: 240px;
    object-fit: cover;
    object-position: 50% 0;
}

.stat {
    text-align: center;
}

.stat__value {
    color: var(--accent);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
}

.stat__text {
    color: var(--ink-soft);
}

/* --- pricing --- */

.tiers {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tier {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.tier--featured {
    border-color: var(--accent);
    box-shadow: 0 6px 24px rgba(47, 109, 240, 0.12);
}

.tier__badge {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tier__price {
    font-size: 34px;
    font-weight: 700;
    margin: 8px 0 20px;
}

.tier__price span {
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 400;
}

.tier__roles {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    color: var(--ink-soft);
}

.tier__roles li {
    border-top: 1px solid var(--line);
    padding: 9px 0;
}

.tier .btn {
    margin-top: auto;
}

.service__price {
    display: inline-block;
    margin-top: 12px;
    font-weight: 700;
}

/* --- buttons --- */

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 22px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: var(--accent-dark);
    text-decoration: none;
}

/* --- form --- */

.form {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    color: var(--ink);
}

.form h2 {
    font-size: 24px;
}

.form__field {
    margin-bottom: 14px;
}

.form__field label {
    display: block;
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.form input,
.form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 13px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.form input:focus,
.form textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.form textarea {
    min-height: 110px;
    resize: vertical;
}

.form .btn {
    width: 100%;
}

.alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 15px;
}

.alert--error {
    background: #fdeceb;
    color: var(--danger);
}

.alert--ok {
    background: #e8f6ee;
    color: var(--ok);
}

/* --- prose (legal pages, portfolio entry) --- */

.prose {
    max-width: 46em;
}

.prose h2 {
    font-size: 24px;
    margin-top: 36px;
}

.prose h3 {
    margin-top: 26px;
}

.prose ul {
    padding-left: 22px;
}

.prose li {
    margin-bottom: 8px;
}

.prose__meta {
    color: var(--ink-soft);
    font-size: 14px;
    margin-bottom: 28px;
}

.page-head {
    background: var(--dark);
    color: #fff;
    padding: 56px 0;
}

/* Only the photo comes inline, since it differs per page; --dark stays under
   it as what the band shows until it loads. The mask that keeps the heading
   readable is a layer of its own — top/right/bottom/left rather than `inset`,
   which Safari only understands from 14. */
.page-head--photo {
    position: relative;
    background-color: var(--dark);
    background-position: 50% 50%;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 96px 0;
}

.page-head--photo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 32, 0.7);
}

.page-head--photo > .wrap {
    position: relative;
}

.page-head h1 {
    color: #fff;
    margin: 0;
}

.page-head__kicker {
    color: #8fb0ff;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

/* --- footer --- */

.footer {
    background: var(--dark);
    color: #9aa5b1;
    padding: 48px 0 24px;
    margin-top: 24px;
}

.footer__inner {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
}

.footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__list li {
    margin-bottom: 8px;
}

.footer a {
    color: #c6ced7;
}

.logo--footer {
    display: block;
    margin-bottom: 10px;
}

.footer__note {
    margin: 0;
    font-size: 14px;
}

.footer__bottom {
    border-top: 1px solid #223041;
    margin-top: 32px;
    padding-top: 18px;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* --- error page --- */

.error {
    padding: 90px 0;
    text-align: center;
}

.error__code {
    color: var(--accent);
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

/* --- mobile --- */

@media (max-width: 860px) {
    h1 {
        font-size: 32px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero {
        padding: 48px 0;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nav__burger {
        display: block;
        /* 44px square: the bars are 30x2, but the thing a thumb has to hit is
           the box around them. */
        width: 44px;
        height: 44px;
        cursor: pointer;
        position: relative;
    }

    .nav__burger span,
    .nav__burger span::before,
    .nav__burger span::after {
        position: absolute;
        width: 30px;
        height: 2px;
        background: #fff;
        content: '';
    }

    /* The middle bar is placed inside the 44px box; the other two are
       positioned against IT, so their own offsets stay relative. */
    .nav__burger span {
        top: 21px;
        left: 7px;
    }

    .nav__burger span::before {
        top: -9px;
        left: 0;
    }

    .nav__burger span::after {
        top: 9px;
        left: 0;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 0 0 18px;
    }

    /* Rows rather than lines of text: 16px of line plus this padding is a
       44px-tall target, and the gap above shrinks to match so the open menu
       stays the same height it was. */
    .nav a {
        display: block;
        width: 100%;
        padding: 9px 0;
    }

    /* Already a button, so it keeps its own box rather than stretching across
       the menu. The tag is in the selector only to outweigh `.nav a` above. */
    .nav a.nav__cta {
        display: inline-block;
        width: auto;
        margin-top: 8px;
        padding: 11px 18px;
    }

    .nav__toggle:checked ~ .nav {
        display: flex;
    }

    .header__inner {
        flex-wrap: wrap;
    }

    .topbar__inner {
        justify-content: center;
        text-align: center;
    }

    /* The desktop rhythm is built for a 1160px column; on a phone the same
       paddings are simply scrolling. */
    .section {
        padding: 44px 0;
    }

    .section--plain {
        padding: 48px 0 56px;
    }

    .page-head {
        padding: 40px 0;
    }

    .page-head--photo {
        padding: 60px 0;
    }

    .form {
        padding: 20px;
    }

    .summary th,
    .summary td {
        padding: 12px;
    }
}

/* --- case-study screenshots --- */

.shots {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 20px 0 28px;
}

.shots img {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.tier__role--excluded {
    opacity: 0.45;
    text-decoration: line-through;
}

.footer__pay {
    /* A row of its own, so the badges keep their spacing when the line below
       the footer wraps on a phone — a left margin on the first one would read
       as a stray indent there. */
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.footer__pay img {
    /* A flex item shrinks by default, and these are logos: on a narrow footer
       they would quietly squash instead of keeping their size. */
    flex: 0 0 auto;
}

/* --- order summary (checkout) --- */

.summary {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0 32px;
}

.summary th,
.summary td {
    padding: 14px 16px;
    text-align: left;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.summary th {
    font-size: 14px;
    color: var(--ink-soft);
}

.summary__amount {
    text-align: right;
    white-space: nowrap;
}

/* --- plain white pages (checkout, notices) --- */

.section--plain {
    padding: 80px 0 96px;
}

.plain {
    max-width: 720px;
}

.plain__title {
    margin: 0 0 24px;
}

.plain__lead {
    color: var(--ink-soft);
    margin: 0 0 24px;
}
