/*
    Shared styles for the "Your house, your rules" homepage and the story page: the UXD section 8
    tokens, the Montserrat face, and the chrome both pages share. Linked first by both pages, before
    their own sheet. Used by no other page.

    One face, Montserrat, for everything including headings. Do not add a serif heading face or a
    Fraunces @font-face here; the blog keeps its own. The font file is the self-hosted one under
    /site-v2/fonts/, read in place.
*/

:root {
    --navy: #0F1C3F;
    --deep: #243F99;
    --ink: #091228;
    --body: #2A3350;
    --muted: #4A5370;
    --cream: #FFF4DE;
    --cream-2: #FFF9EE;
    --gold: #F2A23A;
    --gold-deep: #B8650A;
    --gold-text: #9A5208;
    --line: #E6DCC6;
    --footer-bg: #0A1430;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/site-v2/fonts/montserrat-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

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

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

body {
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
    background: var(--cream-2);
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 760px) {
    body {
        font-size: 17px;
    }
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.15;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.wrap {
    width: min(1180px, 100% - 48px);
    margin: 0 auto;
}

/* Buttons: every main button is at least 48px tall. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    border: 0;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    cursor: pointer;
}

.btn--gold {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 6px 0 var(--gold-deep);
}

.btn--navy {
    background: var(--deep);
    color: #fff;
}

/* ---------- Founder's Season strip ---------- */
.promobar {
    margin: 0;
    padding: 7px 16px;
    background: var(--navy);
    color: var(--cream);
    text-align: center;
    font-size: 16px;
}

.promobar b {
    color: var(--gold);
}

/* ---------- Header ---------- */
.nav {
    position: relative;
    z-index: 20;
    background: rgba(255, 249, 238, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 76px;
}

.nav .logo-link {
    align-self: flex-start;
    flex: none;
}

/* 128px tall, overfilling the bar, at 761px and up (UXD 4.2). */
.nav .logo {
    display: block;
    height: 128px;
    width: auto;
    margin-top: 6px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 6px 10px rgba(15, 28, 63, .28));
}

.nav .links {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
    white-space: nowrap;
}

.nav .links a {
    text-decoration: none;
}

.nav .links a:hover {
    text-decoration: underline;
}

.nav .btn {
    flex: none;
    min-height: 48px;
    padding: 0 22px;
    font-size: 16px;
    white-space: nowrap;
}

.nav .links a.btn:hover {
    text-decoration: none;
}

/* ---------- Phone menu ---------- */
.menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 2px solid var(--ink);
    background: #fff;
    color: var(--ink);
    font: 700 16px/1 'Montserrat', system-ui, sans-serif;
    cursor: pointer;
}

.menu-btn svg {
    width: 18px;
    height: 18px;
}

.menu-panel {
    position: absolute;
    right: 20px;
    top: calc(100% + 8px);
    z-index: 30;
    min-width: 240px;
    padding: 8px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 28, 63, .25);
}

.menu-panel a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}

.menu-panel a:hover {
    background: var(--cream);
}

@media (min-width: 1025px) {
    .menu-panel {
        display: none !important;
    }
}

/* Tablet and down: logo, Menu, Try. */
@media (max-width: 1024px) {
    .nav .links {
        gap: 12px;
    }

    .nav .links a:not(.btn) {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
    }
}

/* Phones: the logo sits inside the bar, 52px tall. */
@media (max-width: 760px) {
    .wrap {
        width: calc(100% - 40px);
    }

    .nav .wrap {
        height: 64px;
        gap: 12px;
    }

    .nav .logo-link {
        align-self: center;
    }

    .nav .logo {
        height: 52px;
        margin-top: 0;
        filter: none;
    }

    .nav .links {
        gap: 10px;
        min-width: 0;
    }

    .nav .btn {
        min-height: 44px;
        padding: 0 14px;
        font-size: 15px;
    }

    .menu-panel {
        right: 12px;
        left: 12px;
    }
}

/* Small phones: 48px logo, icon-only Menu (its name stays for screen readers). */
@media (max-width: 420px) {
    .wrap {
        width: calc(100% - 32px);
    }

    .promobar {
        padding: 6px 12px;
        font-size: 14px;
    }

    .nav .wrap {
        gap: 8px;
    }

    .nav .logo {
        height: 48px;
    }

    .menu-btn {
        padding: 0 10px;
    }

    .menu-btn .lbl {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .nav .btn {
        padding: 0 12px;
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .promobar {
        padding: 6px 8px;
        font-size: 13px;
    }

    .nav .wrap {
        width: calc(100% - 24px);
        gap: 6px;
    }

    .nav .btn {
        padding: 0 10px;
        font-size: 14px;
    }
}

/* Phones held sideways: a shorter bar and a 48px logo inside it. */
@media (max-height: 500px) and (orientation: landscape) {
    .promobar {
        padding: 4px 12px;
        font-size: 14px;
    }

    .nav .wrap {
        height: 60px;
    }

    .nav .logo-link {
        align-self: center;
    }

    .nav .logo {
        height: 48px;
        margin-top: 0;
        filter: none;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 40px 0;
    background: var(--footer-bg);
    color: #C9D2EA;
    font-size: 16px;
}

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

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

/* Every footer target is at least 44px tall. */
.site-footer a,
.site-footer span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.site-footer a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .site-footer .wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .site-footer .wrap > span {
        order: 2;
    }
}

/* No JavaScript: no Menu button; every link shows as an open row so each one is reachable. */
.no-js .menu-btn {
    display: none !important;
}

@media (max-width: 1024px) {
    .no-js .nav .wrap {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .no-js .nav .links {
        flex-wrap: wrap;
        white-space: normal;
    }

    .no-js .nav .links a:not(.btn) {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
