/* ==========================================================================
   iOwnIt — shared styles
   Tokens, reset, typography, nav, footer, buttons, app frames.
   Page-specific rules stay in each page's own <style> block.
   ========================================================================== */

/* Self-hosted so no visitor request reaches Google before consent. */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/dmsans-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/dmsans-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/dmsans-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/dmsans-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/fraunces-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
    /* palette */
    --warm-white: #FDF9F3;
    --cream: #F5EDE3;
    --cream-deep: #EDE1D3;
    --terracotta: #C75B39;
    --terracotta-dark: #A84832;
    --terracotta-deep: #8F3D2A;
    --charcoal: #2D2A26;
    --ink: #4A443D;
    --warm-gray: #6B635A;
    --hairline: rgba(45, 42, 38, 0.12);

    /* section rhythm — deliberately uneven, see .band modifiers */
    --sp-tight: 56px;
    --sp: 88px;
    --sp-loose: 124px;

    /* measure */
    --measure: 60ch;
    --measure-narrow: 46ch;
}

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

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

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background-color: var(--warm-white);
    color: var(--ink);
    line-height: 1.65;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--charcoal);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); font-variation-settings: 'opsz' 120; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-variation-settings: 'opsz' 72; }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }

a { color: var(--terracotta-dark); }

/* Small-caps kicker that replaces the centred h2 + subtitle pattern */
.kicker {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--terracotta-dark);
    margin-bottom: 14px;
}

.lede {
    font-size: 1.15rem;
    color: var(--warm-gray);
    max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--mid { max-width: 940px; }

/* Bands carry the vertical rhythm. Sections vary on purpose — a page where
   every band is the same height is the thing we were trying to get away from. */
.band { padding: var(--sp) 0; }
.band--tight { padding: var(--sp-tight) 0; }
.band--loose { padding: var(--sp-loose) 0; }
.band--cream { background: var(--cream); }
.band--ink { background: var(--charcoal); color: rgba(255,255,255,0.82); }
.band--ink h2, .band--ink h3 { color: #fff; }

.split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

nav {
    padding: 16px 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(253, 249, 243, 0.92);
    backdrop-filter: saturate(1.4) blur(8px);
    z-index: 100;
    border-bottom: 1px solid var(--hairline);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    color: var(--warm-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--charcoal); }

.nav-links a.active {
    color: var(--charcoal);
    box-shadow: inset 0 -2px 0 var(--terracotta);
}

.nav-cta {
    background: var(--terracotta-dark);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.2s;
}

.nav-cta:hover { background: var(--terracotta-deep); }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 101;
    background: none;
    border: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(45, 42, 38, 0.5);
    z-index: 99;
}

.mobile-overlay.active { display: block; }

/* --------------------------------------------------------------------------
   Focus
   -------------------------------------------------------------------------- */

:focus-visible {
    outline: 3px solid var(--terracotta-dark);
    outline-offset: 3px;
    border-radius: 3px;
}

.band--ink :focus-visible,
footer :focus-visible {
    outline-color: #E5A08A;
}

/* Skip link, visible only once focused */
.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 300;
    background: var(--charcoal);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.15s ease;
}

.skip-link:focus { top: 16px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--terracotta-dark);
    color: #fff;
}

.btn-primary:hover { background: var(--terracotta-deep); }

.btn-secondary {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--cream-deep);
}

.btn-secondary:hover { border-color: var(--terracotta); }

.btn-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.note {
    font-size: 0.9rem;
    color: var(--warm-gray);
}

/* --------------------------------------------------------------------------
   App frame — installed PWA, portrait, no browser chrome.
   The manifest is display:standalone / orientation:portrait, so no URL bar.
   -------------------------------------------------------------------------- */

.appframe {
    position: relative;
    width: 100%;
    max-width: 330px;
    border-radius: 30px;
    background: var(--warm-white);
    padding: 8px;
    box-shadow:
        0 0 0 1px rgba(45, 42, 38, 0.10),
        0 24px 60px rgba(45, 42, 38, 0.20);
}

.appframe__screen {
    position: relative;
    border-radius: 23px;
    overflow: hidden;
    background: var(--warm-white);
}

.appframe__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 18px 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: 0.01em;
}

.appframe__bar span:last-child { letter-spacing: 0.08em; }

.appframe img {
    display: block;
    width: 100%;
}

.appframe--sm { max-width: 260px; }

.appframe figcaption {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--warm-gray);
    text-align: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

footer {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.62);
    padding: 48px 0 40px;
    font-size: 0.92rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
}

.footer-links a:hover { color: #fff; }

.footer-copy { color: rgba(255, 255, 255, 0.45); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .split, .split--wide-left { grid-template-columns: 1fr; gap: 36px; }
    .rail { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 768px) {
    :root {
        --sp-tight: 44px;
        --sp: 60px;
        --sp-loose: 76px;
    }

    body { font-size: 1rem; }

    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--warm-white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 88px 28px 28px;
        gap: 22px;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    .nav-links.active { right: 0; }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}

/* --------------------------------------------------------------------------
   Consent banner (injected by consent.js, only when no choice is stored)
   -------------------------------------------------------------------------- */

.consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 200;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: var(--warm-white);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(45, 42, 38, 0.18);
}

.consent__text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
}

.consent__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.consent__actions .btn {
    padding: 9px 16px;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .consent {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .consent__actions .btn { flex: 1; justify-content: center; }
}
