/*
 * Home page ("Index" design), loaded only by resources/views/layouts/home.blade.php.
 * Layout idea: Swiss typographic index with a numbered top navbar. Desktop shows the five
 * sections inline with a live underline; phones get a strip of numbered tabs under the bar.
 * Light and dark palettes follow the visitor's system theme.
 */
:root {
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --ink: #0D1017;
    --muted: #586070;
    --rule: #D3D7DF;
    --accent: #1F3BFF;
    --accent-ink: #FFFFFF;
    --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0C0E13;
        --surface: #141821;
        --ink: #EDEFF4;
        --muted: #9AA3B5;
        --rule: #262C3A;
        --accent: #8394FF;
        --accent-ink: #0C0E13;
        color-scheme: dark;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 1rem/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.d-none { display: none !important; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; }
.in { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Arches logo (partials/logo.blade.php): the arches take the text colour, the shared pillar the accent */
.logo { height: 26px; width: auto; display: block; flex: none; }
.logo .side { stroke: var(--ink); }
.logo .pillar { stroke: var(--accent); }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font: 700 1.05rem var(--display);
}

/* header: bar + numbered navigation */
.top {
    position: sticky;
    top: 0;
    z-index: 31;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
}

.talk {
    font: 500 .8rem var(--mono);
    text-decoration: none;
    border: 1px solid var(--ink);
    padding: 0 14px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.dnav,
.mailbtn { display: none; }

.strip {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--rule);
    padding: 0 8px;
}

.strip::-webkit-scrollbar { display: none; }

.strip a {
    flex: none;
    display: flex;
    gap: 7px;
    align-items: center;
    min-height: 46px;
    padding: 0 13px;
    font: 500 .8rem var(--mono);
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.strip a b { color: var(--accent); font-weight: 500; }
.strip a.on { color: var(--ink); border-bottom-color: var(--accent); }

@media (min-width: 960px) {
    :root { --gutter: 40px; }
    html { scroll-padding-top: 84px; }
    .bar { height: 68px; }
    .strip,
    .talk { display: none; }
    .dnav { display: flex; margin-left: auto; }

    .dnav a {
        position: relative;
        display: flex;
        gap: 8px;
        align-items: center;
        padding: 0 14px;
        min-height: 68px;
        text-decoration: none;
        font: 500 .96rem var(--body);
        color: var(--muted);
    }

    .dnav a b { font: 500 .74rem var(--mono); color: var(--muted); }

    .dnav a::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: -1px;
        height: 2px;
        background: transparent;
        transition: background .2s;
    }

    .dnav a:hover { color: var(--ink); }
    .dnav a.on { color: var(--ink); }
    .dnav a.on b { color: var(--accent); }
    .dnav a.on::after { background: var(--accent); }

    .mailbtn {
        display: inline-flex;
        align-items: center;
        min-height: 42px;
        padding: 0 18px;
        border: 1.5px solid var(--ink);
        font: 600 .92rem var(--body);
        text-decoration: none;
        margin-left: 12px;
    }

    .mailbtn:hover { background: var(--ink); color: var(--bg); }
}

/* hero */
.hero { padding-block: 40px 30px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }

h1 {
    font: 800 clamp(2.3rem, 9.2vw, 3.9rem)/1 var(--display);
    letter-spacing: -.035em;
    margin: 0 0 24px;
    text-wrap: balance;
}

h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.22rem); max-width: 54ch; color: var(--muted); margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    font: 600 1rem var(--body);
    text-decoration: none;
    border: 1.5px solid var(--ink);
    cursor: pointer;
    background: none;
    color: var(--ink);
}

.button.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:hover { transform: translateY(-1px); }

.collage { position: relative; aspect-ratio: 5 / 4; width: 100%; max-width: 520px; margin: 6px 0 0; }

.collage img {
    position: absolute;
    width: 72%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    border: 1px solid var(--rule);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(13, 16, 23, .22);
}

.collage img:nth-child(1) { left: 0; top: 4%; transform: rotate(-5deg); }
.collage img:nth-child(2) { right: 0; top: 30%; transform: rotate(4deg); z-index: 2; }
.collage img:nth-child(3) { left: 10%; bottom: 0; transform: rotate(-2deg); z-index: 3; }

.badge {
    position: absolute;
    right: 4%;
    top: 0;
    z-index: 4;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    display: grid;
    place-items: center;
    text-align: center;
    transform: rotate(8deg);
    font: 800 2rem/1 var(--display);
    letter-spacing: -.02em;
}

.badge small {
    display: block;
    font: 500 .56rem/1.2 var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-top: 3px;
}

@media (min-width: 960px) {
    .hero { padding-block: 68px 40px; }
    h1 { font-size: clamp(3rem, 5vw, 5.2rem); }
    .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
    .collage { margin: 0 0 0 auto; }
}

.facts { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 42px; border-top: 1px solid var(--ink); }
.fact { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.fact strong { font: 700 1.5rem/1.1 var(--display); letter-spacing: -.02em; }
.fact span { color: var(--muted); font-size: .95rem; }

@media (min-width: 700px) {
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fact { border-bottom: 0; padding: 20px 20px 0 0; }
}

/* sections */
section { padding: 62px 0; border-top: 1px solid var(--rule); }
.label { color: var(--muted); display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px; }
.label b { color: var(--accent); font-weight: 500; }

h2 {
    font: 700 clamp(1.85rem, 5.2vw, 3.2rem)/1.05 var(--display);
    letter-spacing: -.028em;
    margin: 0;
    text-wrap: balance;
    max-width: 20ch;
}

.copy { margin-top: 24px; }
.copy p { margin: 0 0 1.1em; max-width: 62ch; font-size: 1.06rem; }
.copy p.mu { color: var(--muted); }

.about-grid { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
.portrait { margin: 0; }
.portrait img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 46% 38%; border: 1px solid var(--rule); }
.portrait figcaption { color: var(--muted); margin-top: 8px; }

@media (min-width: 760px) {
    .about-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
    .portrait img { aspect-ratio: 4 / 5; }
}

.svc { display: grid; margin-top: 34px; border-top: 1px solid var(--ink); }
.svc article { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.svc .n { color: var(--accent); }
.svc h3 { font: 700 1.35rem/1.15 var(--display); margin: 0; letter-spacing: -.01em; }
.svc p { margin: 0; color: var(--muted); max-width: 52ch; }

@media (min-width: 760px) {
    .svc article { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: baseline; }
}

/* work index */
.work-head { display: grid; gap: 16px; margin-bottom: 32px; grid-template-columns: minmax(0, 1fr); }
.work-head p { margin: 0; color: var(--muted); max-width: 52ch; }

@media (min-width: 860px) {
    .work-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}

.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.row { border-bottom: 1px solid var(--rule); }

.row-head {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 16px 0;
    min-height: 68px;
    font: inherit;
}

.row-head .no { color: var(--muted); }

.row-head .name {
    display: block;
    font: 700 clamp(1.2rem, 4.2vw, 2.1rem)/1.1 var(--display);
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.row-head .meta { display: block; font: 400 .76rem var(--mono); color: var(--muted); margin-top: 5px; }

.row-head .chev {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--ink);
    display: grid;
    place-items: center;
    font: 500 1.2rem/1 var(--mono);
    transition: transform .25s, background .2s;
}

.row.open .row-head .chev { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row-head:hover .name { color: var(--accent); }

.row-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .32s ease, visibility 0s .32s; }
.row.open .row-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .32s ease, visibility 0s; }
.row-inner { overflow: hidden; min-height: 0; }
.row-grid { display: grid; gap: 18px; padding: 2px 0 26px; grid-template-columns: minmax(0, 1fr); }
.shot { display: block; border: 1px solid var(--rule); background: var(--surface); aspect-ratio: 1200 / 630; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-empty { display: grid; place-items: center; color: var(--muted); font: 400 .8rem var(--mono); }
.project-summary { margin: 0 0 16px; max-width: 58ch; }
.project-summary p { margin: 0 0 .6em; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; }
.tags li { font: 400 .74rem var(--mono); border: 1px solid var(--rule); padding: 5px 9px; background: var(--surface); }
.visit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); }
.empty-state { color: var(--muted); padding: 24px 0; border-top: 1px solid var(--ink); }

@media (min-width: 900px) {
    .row-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; padding-left: 48px; }
}

/* approach, expertise */
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; counter-reset: s; border-top: 1px solid var(--ink); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 .85rem var(--mono); color: var(--accent); padding-top: 5px; }
.steps p { margin: 0; font: 500 1.12rem/1.4 var(--display); }

@media (min-width: 900px) {
    .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-top: 0; }
    .steps li { grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); border-bottom: 0; padding: 18px 0 0; }
}

.chips { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 26px 0 30px; }
.chips span { font: 700 clamp(1.3rem, 4.6vw, 2.2rem)/1.3 var(--display); letter-spacing: -.02em; }
.chips span:not(:last-child)::after { content: "/"; color: var(--accent); margin-left: 14px; font-weight: 500; }

.notes { display: grid; border-top: 1px solid var(--ink); }
.notes div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.notes h3 { font: 700 1.08rem var(--display); margin: 0 0 6px; }
.notes p { margin: 0; color: var(--muted); max-width: 50ch; }

@media (min-width: 700px) {
    .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

/* contact */
.contact { background: var(--ink); color: var(--bg); border-top: 0; }
.contact .label { color: color-mix(in srgb, var(--bg) 68%, transparent); }
.contact .label b { color: var(--bg); }
.contact h2 { color: var(--bg); }
.contact .lede { color: color-mix(in srgb, var(--bg) 72%, transparent); margin: 22px 0 0; max-width: 58ch; }

.mail {
    display: block;
    font: 700 clamp(1.3rem, 6.2vw, 3.2rem)/1.1 var(--display);
    letter-spacing: -.025em;
    margin: 28px 0 22px;
    text-decoration: none;
    color: var(--bg);
    overflow-wrap: anywhere;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 10px;
}

.contact .button { border-color: var(--bg); color: var(--bg); }
.contact .button.solid { background: var(--bg); color: var(--ink); }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 24px; color: color-mix(in srgb, var(--bg) 68%, transparent); }

.site-foot { padding: 24px 0 38px; color: var(--muted); }
.site-foot .in { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.site-foot a { text-decoration: underline; text-underline-offset: 3px; }

/* cookie banner (partials/cookie-banner.blade.php), restyled to match */
.ix .cookie-banner {
    background: var(--ink);
    color: var(--bg);
    border-top: 1px solid var(--rule);
    box-shadow: none;
    padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
    font-family: var(--body);
}

.ix .cookie-banner-inner { max-width: 1180px; }
.ix .cookie-banner-actions { gap: 10px; }

.ix .cookie-banner .btn {
    min-height: 44px;
    padding: 0 18px;
    border: 1.5px solid var(--bg);
    background: transparent;
    color: var(--bg);
    font: 600 .9rem var(--body);
    cursor: pointer;
}

.ix .cookie-banner .btn-primary { background: var(--bg); color: var(--ink); }

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