:root {
    --header: #2d2d2d;
    --footer: #222;
    --ink: #282828;
    --muted: #6f7479;
    --paper: #fff;
    --line: #e8e8e8;
    --accent: #fff;
    --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 500 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 66px;
    background: var(--header);
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.header-inner,
.footer-inner,
.content-section,
.text-page {
    width: min(90%, var(--max-width));
    margin-inline: auto;
}

.header-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand img { width: 208px; max-height: 57px; object-fit: contain; }

.desktop-nav { display: flex; align-items: stretch; align-self: stretch; }
.desktop-nav a {
    display: grid;
    place-items: center;
    padding: 0 13px;
    color: rgba(255,255,255,.62);
    font-size: 13px;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}
.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.05); }

.mobile-nav { display: none; position: relative; color: #fff; }
.mobile-nav summary { cursor: pointer; list-style: none; padding: 10px 0; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 240px;
    padding: 8px;
    background: #242424;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.mobile-nav a { display: block; padding: 10px 12px; color: #ddd; text-decoration: none; }
.mobile-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }

main { min-height: calc(100vh - 126px); }

.home-hero,
.project-hero {
    min-height: clamp(420px, 65vh, 680px);
    display: grid;
    place-items: center;
    padding: 72px 24px;
    text-align: center;
    background-position: center;
    background-size: cover;
}

.home-hero {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15,15,15,.82), rgba(45,45,45,.62)),
        url("../images/matrixdojo-793666-1.jpeg") center/cover;
}

.mars-hero {
    color: #fff;
    background-image: linear-gradient(rgba(5,8,14,.48), rgba(5,8,14,.68)), url("../images/10.jpg");
}

.tactic-hero {
    color: #fff;
    background-image: linear-gradient(rgba(8,10,12,.56), rgba(8,10,12,.72)), url("../images/Screenshot_2015-02-16-09-14-34.jpg");
}

.hero-copy { width: min(760px, 100%); text-shadow: 0 2px 18px rgba(0,0,0,.48); }
.hero-copy h1,
.text-page h1,
.text-block h1 {
    margin: 0 0 18px;
    font-family: Ubuntu, "Trebuchet MS", sans-serif;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.04;
    font-weight: 500;
    letter-spacing: -.035em;
}
.hero-copy > p:not(.eyebrow) { margin: 0 auto 14px; font-size: clamp(18px, 2.4vw, 25px); }
.hero-copy .project-meta { max-width: 620px; font-size: 15px; line-height: 1.75; opacity: .9; }
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; opacity: .68; }

.content-section { padding-block: clamp(48px, 7vw, 90px); }
.project-page { display: grid; gap: clamp(34px, 5vw, 64px); }
.project-banner { width: 100%; }
.text-block { max-width: 780px; }
.text-block h1,
.text-page h1 { font-size: clamp(38px, 6vw, 62px); }
.text-block p { color: var(--muted); }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.store-links a {
    padding: 11px 16px;
    border: 1px solid var(--ink);
    border-radius: 3px;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}
.store-links a:hover { color: #fff; background: var(--ink); }

.gallery { display: grid; gap: clamp(14px, 2.4vw, 28px); margin-block: clamp(24px, 4vw, 52px); }
.gallery-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery a,
.wide-image { display: block; overflow: hidden; background: #f1f1f1; }
.gallery img,
.wide-image img { width: 100%; transition: transform .25s ease, opacity .25s ease; }
.gallery a:hover img,
.wide-image:hover img { transform: scale(1.015); opacity: .93; }
.portrait-gallery img { aspect-ratio: 9/16; object-fit: cover; }
.phone-gallery img { object-position: top; }
.small-phones { max-width: 880px; margin-inline: auto; }
.landscape-gallery img { aspect-ratio: 1.42/1; object-fit: cover; }
.wide-image { margin-block: clamp(24px, 4vw, 52px); }

.text-page { padding-block: clamp(70px, 11vw, 150px); }
.text-page .prose { max-width: 790px; color: var(--muted); font-size: 17px; }
.text-page .prose p { margin: 0 0 20px; }
.text-page h2 { color: var(--ink); font-size: 23px; }
.text-page a { color: var(--ink); text-underline-offset: 3px; }

.site-footer { color: #aaa; background: var(--footer); }
.footer-inner {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}
.footer-inner a { color: #ddd; text-decoration: none; }

@media (max-width: 980px) {
    .desktop-nav { display: none; }
    .mobile-nav { display: block; }
    .gallery-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .header-inner { width: 92%; }
    .brand img { width: 165px; }
    .home-hero,
    .project-hero { min-height: 520px; }
    .gallery-two,
    .gallery-three { grid-template-columns: 1fr; }
    .portrait-gallery { width: min(100%, 430px); margin-inline: auto; }
    .landscape-gallery { grid-template-columns: 1fr; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
