/* Outerspace Gardens — minimal, image-led layout */

:root {
    --ink: #1c211c;
    --ink-soft: rgba(28, 33, 28, 0.65);
    --paper: #f6f4ef;
    --photo-bg: #1f2620;
    --white: #ffffff;
    --sans: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
    --gutter: clamp(20px, 5vw, 56px);
    --header-h: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* No rubber-band stretch past the top or bottom of the page */
html, body { overscroll-behavior-y: none; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Header ---------- */

/* Always solid and light, and part of the page so nothing can show between it and the content */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 var(--gutter);
    color: var(--ink);
    background-color: var(--paper);
    box-shadow: 0 1px 0 var(--ink);
}

/* Same lettering as the big homepage headline, just smaller */
.logo {
    font-family: var(--sans);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: clamp(20px, 3vw, 44px);
    font-size: 17px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.site-nav { align-items: center; }
.site-nav a { transition: opacity 0.3s ease; }
.nav-icon { display: flex; }
.nav-icon svg { width: 20px; height: 20px; }
.site-nav a:hover { opacity: 0.55; }

/* ---------- Home: landing photo ---------- */

.hero {
    position: relative;
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    overflow: hidden;
    background: var(--photo-bg);
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* gentle shade so white text stays readable */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

/* Oversized headline across the bottom of the photo */
.intro-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0 var(--gutter) clamp(16px, 2.5vw, 36px);
    color: var(--white);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 11.6vw;
    line-height: 0.88;
    letter-spacing: -0.055em;
    white-space: nowrap;
}

.intro-title .intro-break { display: block; }

/* ---------- Home: statement left, photo right ---------- */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    background: var(--paper);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.split-text {
    display: flex;
    align-items: center;
    padding: 18vh var(--gutter) 10vh;
    border-right: 1px solid var(--ink);
}

.split-statement {
    max-width: 13em;
    font-family: var(--sans);
    font-weight: 400;
    font-size: clamp(36px, 4.4vw, 76px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--ink);
}

.split-media { position: relative; overflow: hidden; }

.split-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Home: projects grid ---------- */

.projects {
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
}

.projects-head {
    padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(20px, 2.5vw, 32px);
    border-bottom: 1px solid var(--ink);
}

.projects-title {
    font-family: var(--sans);
    font-weight: 400;
    font-size: clamp(36px, 4.4vw, 76px);
    line-height: 1;
    letter-spacing: -0.035em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.project-card {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--ink);
}

.project-card:last-child { border-right: 0; }

.project-card-img {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-card-img img { transform: scale(1.03); }

.project-card-name {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px var(--gutter) 24px;
    border-top: 1px solid var(--ink);
    font-size: clamp(20px, 1.8vw, 28px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.project-card-name span { transition: transform 0.3s ease; }
.project-card:hover .project-card-name span { transform: translateX(6px); }

/* keep anchored sections clear of the fixed header */
section[id] { scroll-margin-top: var(--header-h); }

/* Captions over full-screen project photos */
.slide-caption {
    position: absolute;
    left: var(--gutter);
    bottom: 40px;
    z-index: 2;
    color: var(--white);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.slide-caption span { display: block; font-family: var(--sans); font-size: 28px; letter-spacing: -0.035em; text-transform: none; margin-bottom: 2px; }

/* ---------- Text sections ---------- */

.section {
    padding: clamp(80px, 14vw, 160px) var(--gutter);
}

.section + .section { padding-top: 0; }

.section-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px 64px;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-top: 10px;
}

.lead {
    font-family: var(--sans);
    letter-spacing: -0.035em;
    font-weight: 400;
    font-size: clamp(26px, 3.2vw, 36px);
    line-height: 1.35;
}

.lead + .lead { margin-top: 24px; }

.service-list { list-style: none; border-top: 1px solid rgba(28, 33, 28, 0.15); }

.service-list li {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px 32px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(28, 33, 28, 0.15);
}

.service-list h3 { font-family: var(--sans); font-weight: 400; font-size: 24px; line-height: 1.25; letter-spacing: -0.03em; }
.service-list p { color: var(--ink-soft); font-size: 15px; }

.contact-lines { font-family: var(--sans); font-size: clamp(20px, max(3.2vw, 6.6vw - 4px), 36px); line-height: 1.4; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.contact-lines a { border-bottom: 1px solid rgba(28, 33, 28, 0.3); transition: border-color 0.3s ease; }
.contact-lines a:hover { border-color: var(--ink); }

.site-footer {
    font-size: 13px;
    color: var(--ink);
    border-top: 1px solid var(--ink);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 40px var(--gutter) 48px;
}

.footer-cols > div { display: flex; flex-direction: column; gap: 6px; }
.footer-cols a { width: fit-content; transition: opacity 0.3s ease; }
.footer-cols a:hover { opacity: 0.55; }

.footer-label { color: var(--ink-soft); margin-bottom: 10px; }

.footer-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px var(--gutter);
    font-size: 12px;
    color: var(--ink-soft);
    border-top: 1px solid rgba(28, 33, 28, 0.15);
}

.footer-art {
    position: relative;
    margin: 32px var(--gutter) 48px;
    height: 33vw; /* replaced by the drawing's real height once it loads */
}

.footer-art canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ---------- Project pages ---------- */

.project-hero {
    position: relative;
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    background: var(--photo-bg);
    color: var(--white);
}

.project-hero img { width: 100%; height: 100%; object-fit: cover; }

.project-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.4));
}

.project-hero .slide-caption span { font-size: clamp(40px, 6vw, 72px); line-height: 1.1; margin-bottom: 8px; }

.project-gallery {
    padding: clamp(64px, 10vw, 120px) var(--gutter);
    display: grid;
    gap: clamp(16px, 2vw, 28px);
    max-width: 1400px;
    margin: 0 auto;
}

.project-gallery img { width: 100%; height: auto; }

.back-link {
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: color 0.3s ease;
}

.back-link:hover { color: var(--ink); }

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
    :root { --header-h: 64px; }
    .logo { font-size: 19px; }
    .site-nav { font-size: 15px; gap: 16px; }
    .section-inner { grid-template-columns: 1fr; gap: 20px; }
    .service-list li { grid-template-columns: 1fr; }
    .slide-caption { bottom: 32px; }
    .split { grid-template-columns: 1fr; }
    .split-text { border-right: 0; border-bottom: 1px solid var(--ink); padding: 96px var(--gutter); }
    .split-media { min-height: 110vw; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card { border-right: 0; border-bottom: 1px solid var(--ink); }
    .project-card:last-child { border-bottom: 0; }
    .intro-title { font-size: 19vw; padding-bottom: 28px; }
    .intro-title span { display: block; }
}

/* Small phones: tighten the header so the logo and all three links fit on one line */
@media (max-width: 420px) {
    /* sizes shrink with the screen so everything stays on one line, even on the smallest phones */
    .site-header { padding: 0 min(16px, 4vw); gap: min(12px, 3vw); }
    .logo { font-size: min(16px, 4.3vw); }
    .site-nav { font-size: min(13px, 3.5vw); gap: min(10px, 2.6vw); }
    .nav-icon svg { width: min(16px, 4.3vw); height: min(16px, 4.3vw); }
}

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

/* Projects page: start below the fixed header */
.projects-page { min-height: calc(100vh - var(--header-h)); }

/* Second split: photo left, services right */
.split + .split { border-top: 0; }
.split-reverse .split-media { border-right: 1px solid var(--ink); }
.split-reverse .split-text { border-right: 0; padding-top: 14vh; padding-bottom: 14vh; }

.split-services { list-style: none; width: 100%; max-width: 30em; }
.split-services li + li { margin-top: clamp(24px, 4vh, 44px); }

.split-services h3 {
    font-weight: 400;
    font-size: clamp(26px, 2.3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.split-services p {
    margin-top: 8px;
    max-width: 24em;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
}

@media (max-width: 760px) {
    .split-reverse .split-media { border-right: 0; border-bottom: 1px solid var(--ink); }
    .split-reverse .split-text { border-bottom: 0; }
    .footer-cols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
    .split-reverse .split-media { display: none; }
    .footer-art { display: none; } /* no drawing on phones; its image isn't downloaded either */
}

/* Projects page: the grid's bottom line doubles as the footer's top line */
.projects-page + .site-footer { border-top: 0; }
.projects-page .projects-head { padding-top: clamp(28px, 3.5vw, 48px); }
