/* divinedavis.com home: one page, dark, a floating menu bar over a full-screen
   hero, then one row per project with a strip of screenshots. */
:root {
    --bg: #0e0f10;
    --panel: #18191b;
    --line: #2a2b2e;
    --ink: #f2f0ea;
    --dim: #9a9890;
    --cream: #f2efe6;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
    --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
    --gutter: clamp(16px, 2.2vw, 32px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* ---------- floating bar ---------- */
.bar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 2 * 16px));
    z-index: 20;
    background: rgba(20, 21, 23, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .06);
}
.bar-top {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    height: 48px;
    padding: 0 6px 0 12px;
}
.bar-logo { font-weight: 800; font-size: 17px; letter-spacing: -.04em; }
.bar-tag {
    text-align: center;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-burger {
    width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer;
    display: grid; place-content: center; gap: 4px;
}
.bar-burger span {
    display: block; width: 18px; height: 2px; background: var(--ink);
    transition: transform .25s ease, opacity .2s ease;
}
.bar.is-open .bar-burger span:nth-child(1) { transform: translateY(6px); opacity: 0; }
.bar.is-open .bar-burger span:nth-child(3) { transform: translateY(-6px); opacity: 0; }

.menu { border-top: 1px solid var(--line); }
.menu-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 14px 22px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    transition: background .15s ease;
}
a.menu-row:hover { background: rgba(255, 255, 255, .04); }
.menu-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
    text-align: right;
    overflow-wrap: anywhere;
}
.menu-actions { padding: 12px; }
.menu-btn {
    display: block;
    text-align: center;
    padding: 16px;
    background: var(--cream);
    color: #111;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 500;
    transition: background .15s ease;
}
.menu-btn:hover { background: #fff; }
.bar.is-open .menu { animation: drop .22s ease both; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- hero ---------- */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hero-bg, .hero-grain { position: absolute; inset: 0; }
.hero-bg img {
    position: absolute; inset: -6%;
    width: 112%; height: 112%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.8s ease;
    animation: drift 18s ease-in-out infinite alternate;
}
.hero-bg img.is-on { opacity: 1; }
@keyframes drift { to { transform: scale(1.22) translate(-2%, 1%); } }
.hero-grain {
    background:
        linear-gradient(180deg, rgba(14, 15, 16, .25) 0%, rgba(14, 15, 16, .35) 55%, rgba(14, 15, 16, .92) 100%),
        radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 3px 3px;
}
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    align-items: end;
    gap: 24px 48px;
    padding: 0 var(--gutter) 44px;
}
.kicker {
    grid-column: 1 / -1;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(40px, 7.4vw, 112px);
    line-height: .9;
    letter-spacing: -.045em;
    font-weight: 800;
    text-transform: uppercase;
    max-width: 14ch;
}
.hero-copy { font-size: 15px; line-height: 1.5; color: rgba(242, 240, 234, .88); }
.hero-foot {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px var(--gutter);
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
}
.hero-foot a { color: var(--ink); }

/* ---------- work rows ---------- */
.work-intro {
    font-size: clamp(24px, 3.2vw, 44px);
    line-height: 1.12;
    letter-spacing: -.025em;
    max-width: 24ch;
    padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(48px, 7vw, 96px);
    margin-left: auto;
    margin-right: clamp(0px, 14vw, 240px);
}
.row {
    display: grid;
    grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 22px 0 22px var(--gutter);
    border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row-head {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    gap: 10px 18px;
}
.row h2 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.row h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.tags li {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .02em;
    background: #000;
    border: 1px solid var(--line);
    padding: 5px 8px;
    border-radius: 999px;
}
.row-blurb { grid-column: 1 / -1; font-size: 14px; color: var(--dim); line-height: 1.45; max-width: 36ch; }
.row-count { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--dim); }

.strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-right: var(--gutter);
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
}
.strip::-webkit-scrollbar { display: none; }
.strip img {
    height: clamp(170px, 19vw, 260px);
    width: auto;
    flex: none;
    scroll-snap-align: start;
    background: var(--panel);
    transition: transform .35s ease, filter .35s ease;
}
.strip img.is-phone { aspect-ratio: 1320 / 2868; }
.strip img.is-wide { aspect-ratio: 8 / 5; }
.row:hover .strip img { filter: brightness(.8); }
.row .strip img:hover { filter: none; transform: translateY(-4px); }

.foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 40px var(--gutter) 48px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dim);
}
.foot a:hover { color: var(--ink); }

@media (max-width: 760px) {
    .hero-inner { grid-template-columns: 1fr; padding-bottom: 32px; }
    .hero-foot span:nth-child(2) { display: none; }
    .work-intro { margin: 0; }
    .row { grid-template-columns: 1fr; gap: 16px; padding: 24px 0 24px var(--gutter); }
    .row-head { padding-right: var(--gutter); }
    .strip img { height: 300px; }
    .strip img.is-wide { height: 200px; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-bg img { animation: none; transition: none; }
}
