/* Bell & Cord — site styles.
   Top half: original page styles, extracted verbatim from index.html.
   Bottom half: portfolio slideshow, Selected Work gallery, and lightbox. */

:root {
    --bc-bg: #f6efe3;
    --bc-ink: #33251a;
    --bc-ink-soft: #4a3a2a;
    --bc-line: rgba(51, 37, 26, 0.2);
    --hero-interval: 5s;
    --hero-fade: 1s;
}

/* ---------- original page styles ---------- */

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

body {
    font-family: 'Georgia', serif;
    background-color: #f6efe3;
    color: #33251a;
    line-height: 1.6;
}

@font-face {
    font-family: 'Georgia';
    font-display: optional;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 40px 0;
    text-align: center;
}

.logo {
    display: block;
    width: 100%;
    max-width: 512px;
    height: auto;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 20px 0 60px 0;
    content-visibility: auto;
    min-height: 280px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 1.2;
    min-height: 3.6rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-style: italic;
    opacity: 0.8;
    line-height: 1.6;
    min-height: 2.08rem;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: #33251a;
    color: #f6efe3;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 2px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: #4a3a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 37, 26, 0.2);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 80px 0;
}

.feature {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.feature p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.8;
}

.about {
    text-align: center;
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 1px;
}

.about p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.9;
}

footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(51, 37, 26, 0.2);
}

footer p {
    opacity: 0.7;
}

.contact {
    margin-top: 30px;
}

.contact a {
    color: #33251a;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s ease;
}

.contact a:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .about h2 {
        font-size: 2rem;
    }
}

/* ---------- hero slideshow ---------- */

/* Full-bleed, full-viewport shell that carries the slideshow behind the
   logo AND the hero text (R3: rotating imagery behind logo, headline,
   tagline, and CTA). Content is vertically centred. */
.hero-shell {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
}

.hero-shell > .container {
    flex: 1;
    margin: 0 auto;
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bc-ink);
}

/* Cream scrim keeps the dark logo and serif text legible over any image. */
.hero-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(246, 239, 227, 0.82) 0%,
        rgba(246, 239, 227, 0.55) 45%,
        rgba(246, 239, 227, 0.75) 100%
    );
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--hero-fade) ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Logo and hero copy sit above the slideshow + scrim. */
.hero-shell header,
.hero > h1,
.hero > p,
.hero > .cta-button {
    position: relative;
    z-index: 2;
}

/* Scroll prompt: subtle chevron nudging the visitor down the page.
   Positioned within the hero by default (no-JS fallback); when
   JavaScript adds .is-fixed it pins to the VIEWPORT bottom instead, so on
   phones — where the hero content can exceed 100svh and push the shell's
   own bottom edge below the fold — it keeps a constant clearance above
   the Android nav bar / iOS home indicator. JS fades it out (.scroll-prompt-hidden)
   once the hero has scrolled away. */
.scroll-prompt {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--bc-ink);
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.6;
    animation: scroll-bob 2.4s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.scroll-prompt.is-fixed {
    position: fixed;
    z-index: 50; /* above page sections, below the lightbox (z 100) */
}

.scroll-prompt-hidden {
    opacity: 0;
    pointer-events: none; /* also blocks :hover from re-showing it */
}

.scroll-prompt:hover,
.scroll-prompt:focus-visible {
    opacity: 1;
}

@keyframes scroll-bob {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(7px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-prompt {
        animation: none;
    }
}

/* Short viewports (laptop ~768-850px tall): shrink the logo and tighten
   padding so logo, headline, CTA and scroll prompt fit the first screen. */
@media (max-height: 859px) and (min-width: 769px) {
    .logo {
        max-width: 380px;
    }

    header {
        padding: 24px 0;
    }

    .hero {
        padding: 10px 0 40px;
    }
}

/* ---------- Selected Work gallery ---------- */

.selected-work {
    padding: 60px 0;
    text-align: center;
}

.selected-work h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 300;
    letter-spacing: 1px;
}

.selected-work .section-lede {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 45px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 45px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid var(--bc-line);
    border-radius: 3px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(51, 37, 26, 0.18);
}

.gallery-item:focus-visible {
    outline: 2px solid var(--bc-ink);
    outline-offset: 3px;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.gallery-item h3 {
    font-size: 1.25rem;
    font-weight: 400;
    padding: 16px 18px 6px;
}

.gallery-item p {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.5;
    padding: 0 18px 18px;
}

.gallery-cta {
    margin-top: 0;
}

/* ---------- contact section ---------- */

.contact-section {
    padding: 70px 0 30px;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.contact-section .section-lede {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 45px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    border: 1px solid var(--bc-line);
    border-radius: 3px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.contact-card:hover,
a.contact-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(51, 37, 26, 0.18);
}

a.contact-card:focus-visible {
    outline: 2px solid var(--bc-ink);
    outline-offset: 3px;
}

.contact-icon {
    font-size: 1.75rem;
    opacity: 0.75;
    margin-bottom: 4px;
}

.contact-label {
    font-size: 1.2rem;
    font-weight: 400;
}

.contact-value {
    font-size: 0.98rem;
    opacity: 0.8;
    word-break: break-word;
}

.contact-card.disabled {
    opacity: 0.55;
}

.contact-card.disabled .contact-value {
    font-style: italic;
}

/* ---------- lightbox ---------- */

body.lightbox-open {
    overflow: hidden;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 22, 14, 0.78);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    margin: 0;
    background: var(--bc-bg);
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-radius: 3px;
    padding-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-content img {
    width: 100%;
    max-height: 55vh;
    object-fit: cover;
    display: block;
}

.lightbox-content figcaption {
    padding: 22px 28px 0;
}

.lightbox-content h2 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.lightbox-content p {
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 24px;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(51, 37, 26, 0.3);
    background: rgba(246, 239, 227, 0.92);
    color: var(--bc-ink);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    background: var(--bc-ink);
    color: var(--bc-bg);
}

@media (max-width: 768px) {
    .selected-work h2,
    .contact-section h2 {
        font-size: 2rem;
    }

    /* Give the fixed scroll prompt room: keep the hero content short enough
       that a 48px-above-the-fold prompt can't collide with the CTA. */
    .logo {
        max-width: 300px;
    }

    header {
        padding: 28px 0;
    }

    .hero {
        padding: 16px 0 48px;
    }

    /* The min-heights in the base .hero rules size the 3rem desktop h1;
       drop them so a single mobile line doesn't reserve desktop height. */
    .hero h1 {
        min-height: 2.1rem;
    }

    .hero p {
        min-height: 1.7rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-content figcaption {
        padding: 18px 18px 0;
    }
}
