/* ==========================================================================
   Muse & Medium — site styles
   Sizes are written in "mockup pixels" multiplied by --u, so the layout
   scales proportionally with the screen and matches the design comps:
     desktop comp: 1536 x 1024   mobile comp: 1024 x 1536
   ========================================================================== */

:root {
    --cream: #f4ead7;
    --ink: #5a2104;        /* headline brown */
    --ink-deep: #4a1404;   /* nav / small text brown */
    --rule: #7a4528;
    --red: #a50e1c;
    --red-hover: #8a0b17;
    --blue: #346a96;
    --gold: #c9a23c;

    --font-display: "Fraunces", "Georgia", serif;
    --font-script: "Playfair Display", "Georgia", serif;
    --font-label: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;

    /* Mobile comp is 1024 wide. */
    --u: calc(100vw / 1024);
}

@media (min-width: 900px) {
    :root {
        /* Desktop comp is 1536 x 1024; scale to fit both width and height so
           the whole landing page sits in one screen. */
        --u: min(calc(100vw / 1536), calc(100vh / 1024));
    }
}

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

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink-deep);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

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

.site-header {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: calc(140 * var(--u));
    padding: 0 calc(50 * var(--u)) 0 calc(52 * var(--u));
    border-bottom: 2px solid var(--rule);
}

.wordmark {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.wordmark-name {
    font-family: var(--font-script);
    font-style: italic;
    font-weight: 700;
    font-size: calc(54 * var(--u));
    letter-spacing: -0.01em;
    color: var(--blue);
}

.wordmark-tag {
    margin-top: calc(6 * var(--u));
    font-family: var(--font-script);
    font-style: italic;
    font-weight: 400;
    font-size: calc(32 * var(--u));
    letter-spacing: 0.2em;
    color: var(--red);
}

.monogram img {
    width: calc(122 * var(--u));
    height: auto;
}

/* Hamburger (mobile) */
.menu-toggle {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(56 * var(--u));
    height: calc(40 * var(--u));
    min-width: 28px;
    min-height: 20px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: max(2px, calc(4 * var(--u)));
    background: var(--ink-deep);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(calc(18 * var(--u))) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(calc(-18 * var(--u))) rotate(-45deg); }

.wordmark { grid-column: 2; grid-row: 1; }
.monogram { grid-column: 3; grid-row: 1; }

/* Mobile menu: drops down under the header */
.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    padding: 0.5rem calc(52 * var(--u)) 1rem;
    background: var(--cream);
    border-bottom: 2px solid var(--rule);
}

.site-nav.is-open { display: flex; }

.site-nav a {
    padding: 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ink-deep);
    text-decoration: none;
}

.site-nav a + a { border-top: 1px solid rgba(122, 69, 40, .25); }

@media (min-width: 900px) {
    .site-header {
        grid-template-columns: auto 1fr auto auto;
        height: calc(126 * var(--u));
        padding: 0 calc(52 * var(--u)) 0 calc(62 * var(--u));
    }

    .menu-toggle { display: none; }

    .wordmark { grid-column: 1; justify-self: start; }
    .wordmark-name { font-size: calc(54 * var(--u)); }
    .wordmark-tag { font-size: calc(30 * var(--u)); margin-top: calc(4 * var(--u)); }

    .site-nav {
        grid-column: 3;
        position: static;
        display: flex;
        flex-direction: row;
        gap: calc(41 * var(--u));
        margin-right: calc(36 * var(--u));
        padding: 0;
        background: none;
        border: 0;
    }

    .site-nav a {
        padding: 0;
        font-size: calc(22 * var(--u));
        font-weight: 400;
        border: 0 !important;
    }

    .site-nav a:hover { color: var(--red); }

    .monogram { grid-column: 4; }
    .monogram img { width: calc(116 * var(--u)); }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
}

.hero-copy {
    padding: calc(52 * var(--u)) calc(52 * var(--u)) 0;
}

.eyebrow {
    margin: 0;
    font-family: var(--font-label);
    font-weight: 700;
    font-size: calc(25 * var(--u));
    letter-spacing: 0.27em;
    text-transform: uppercase;
    color: var(--blue);
    line-height: 1;
}

.eyebrow span { margin: 0 0.2em; }

.hero-title {
    margin: calc(36 * var(--u)) 0 0;
    font-family: var(--font-display);
    font-variation-settings: "opsz" 72, "SOFT" 0, "WONK" 0;
    font-weight: 800;
    font-size: calc(137 * var(--u));
    line-height: 0.91;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--ink);
}

.hero-title > span { display: block; white-space: nowrap; }

.hero-title em {
    font-style: normal;
    color: var(--red);
}

.hero-star {
    display: inline-block;
    width: 0.62em;
    height: 0.62em;
    margin-left: 0.1em;
    vertical-align: -0.02em;
    fill: var(--red);
}

.hero-sub {
    margin: calc(34 * var(--u)) 0 0;
    max-width: 18em;
    font-size: calc(37 * var(--u));
    line-height: 1.22;
    color: var(--ink-deep);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75em;
    margin-top: calc(26 * var(--u));
    width: calc(584 * var(--u));
    height: calc(97 * var(--u));
    background: var(--red);
    border-radius: calc(5 * var(--u));
    font-family: var(--font-label);
    font-weight: 700;
    font-size: calc(30 * var(--u));
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fbf3e4;
    transition: background-color .2s ease;
}

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

.btn-primary svg {
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Mobile: the torn-paper photo sits under the copy, overlapping slightly. */
.hero-art img {
    width: 100%;
    height: auto;
    margin-top: calc(6 * var(--u));
}

@media (min-width: 900px) {
    .hero {
        height: calc(772 * var(--u));
        overflow: hidden;
    }

    .hero-copy {
        position: relative;
        z-index: 1;
        padding: calc(78 * var(--u)) 0 0 calc(62 * var(--u));
    }

    .eyebrow { font-size: calc(22 * var(--u)); }

    .hero-title {
        margin-top: calc(28 * var(--u));
        font-size: calc(104 * var(--u));
        line-height: 0.93;
    }

    .hero-sub {
        margin-top: calc(22 * var(--u));
        font-size: calc(35 * var(--u));
        line-height: 1.14;
    }

    .btn-primary {
        margin-top: calc(34 * var(--u));
        width: calc(508 * var(--u));
        height: calc(84 * var(--u));
        font-size: calc(25 * var(--u));
        border-radius: calc(4 * var(--u));
    }

    .hero-art {
        position: absolute;
        top: 0;
        right: 0;
        /* Comp width; on wider-than-comp screens the photo grows to fill. */
        width: max(calc(836 * var(--u)), calc(100vw - 800 * var(--u)));
        height: 100%;
    }

    .hero-art img {
        width: 100%;
        height: 100%;
        margin: 0;
        object-fit: cover;
        object-position: left center;
    }
}

/* --------------------------------------------------------------------------
   Offerings strip
   -------------------------------------------------------------------------- */

.offerings {
    border-top: 2px solid var(--rule);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.offerings ul {
    display: flex;
    align-items: center;
    width: max-content;
    margin: 0;
    padding: calc(26 * var(--u)) calc(156 * var(--u));
    list-style: none;
}

.offerings li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.offerings li + li::before {
    content: "";
    width: calc(26 * var(--u));
    height: calc(26 * var(--u));
    margin: 0 calc(46 * var(--u));
    background: var(--ink-deep);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.6 6.6 5.4 11.4 12 12-6.6.6-11.4 5.4-12 12-.6-6.6-5.4-11.4-12-12C6.6 11.4 11.4 6.6 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.6 6.6 5.4 11.4 12 12-6.6.6-11.4 5.4-12 12-.6-6.6-5.4-11.4-12-12C6.6 11.4 11.4 6.6 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.offerings a {
    font-family: var(--font-label);
    font-weight: 500;
    font-size: calc(25 * var(--u));
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-deep);
}

.offerings a:hover { color: var(--red); }

@media (min-width: 900px) {
    .offerings ul {
        width: auto;
        justify-content: center;
        height: calc(122 * var(--u));
        padding: 0;
    }

    .offerings li + li::before {
        width: calc(22 * var(--u));
        height: calc(22 * var(--u));
        margin: 0 calc(38 * var(--u));
    }

    .offerings a { font-size: calc(18 * var(--u)); letter-spacing: 0.18em; }
}

/* --------------------------------------------------------------------------
   Work sections (below the landing hero)
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }
.work { scroll-margin-top: 0; }

.work-section {
    padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 4rem) clamp(1rem, 3vw, 2rem);
    scroll-margin-top: 1rem;
}

.work-section + .work-section { border-top: 1px solid rgba(122, 69, 40, .35); }

.work-head {
    display: flex;
    align-items: baseline;
    gap: clamp(.75rem, 2vw, 1.5rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.work-num {
    font-family: var(--font-label);
    font-weight: 700;
    font-size: clamp(.8rem, 1.2vw, 1rem);
    letter-spacing: .25em;
    color: var(--blue);
}

.work-title {
    margin: 0;
    font-family: var(--font-display);
    font-variation-settings: "opsz" 72;
    font-weight: 800;
    font-size: clamp(2.25rem, 6vw, 5rem);
    line-height: .95;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    color: var(--ink);
}

.work-section:nth-child(even) .work-title { color: var(--red); }

.work-rule {
    flex: 1;
    min-width: 2rem;
    height: 2px;
    align-self: center;
    background: var(--rule);
}

.work-count {
    font-family: var(--font-label);
    font-weight: 500;
    font-size: clamp(.7rem, 1vw, .85rem);
    letter-spacing: .22em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink-deep);
}

/* Justified rows: every photo in a row shares one height, nothing is cropped,
   and order reads left-to-right exactly as arranged in the admin portal. */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(.5rem, 1.2vw, 1rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery::after { content: ""; flex-grow: 999999; }

.gallery-item {
    flex-grow: calc(var(--ar) * 100);
    flex-basis: calc(var(--ar) * 19rem);
    max-width: 100%;
}

.gallery-link {
    display: block;
    overflow: hidden;
    background: #eadcc3;
    border-radius: 3px;
    cursor: zoom-in;
}

.gallery-link img {
    width: 100%;
    height: auto;
    aspect-ratio: var(--ar);
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.gallery-link:hover img { transform: scale(1.035); }

.gallery-caption {
    margin: .5rem 0 0;
    font-size: .95rem;
    line-height: 1.35;
    color: var(--ink-deep);
}

@media (max-width: 600px) {
    .gallery-item { flex-basis: calc(var(--ar) * 9rem); }
    .work-count { display: none; }
}

/* Reveal on scroll (only when JS runs, so content never stays hidden). */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* Lightbox */
.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(28, 12, 4, .94);
    color: var(--cream);
}

.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(28, 12, 4, .6); }

.lightbox figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 3.5rem 1rem 1.5rem;
}

.lightbox img {
    max-width: min(92vw, 1600px);
    max-height: calc(100vh - 8rem);
    width: auto;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.lightbox figcaption { max-width: 60ch; text-align: center; font-size: 1rem; }

.lightbox-close, .lightbox-nav {
    position: fixed;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(244, 234, 215, .12);
    color: var(--cream);
    cursor: pointer;
    transition: background-color .2s;
}

.lightbox-close:hover, .lightbox-nav:hover { background: rgba(244, 234, 215, .25); }

.lightbox-close { top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; font-size: 1.75rem; line-height: 1; }

.lightbox-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; font-size: 2.25rem; line-height: 1; }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

@media (max-width: 600px) {
    .lightbox-nav { top: auto; bottom: 1rem; margin: 0; }
}

/* --------------------------------------------------------------------------
   Interior pages (placeholders until each page is built)
   -------------------------------------------------------------------------- */

.page {
    max-width: 60rem;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.page h1 {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    text-transform: uppercase;
    color: var(--ink);
}

.page .eyebrow { margin-bottom: 1rem; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Narrow desktops: keep "MY MEDIUM" and its star clear of the hero image. */
@media (min-width: 900px) and (max-width: 1199px) {
    .hero-title { font-size: calc(90 * var(--u)); }
}
