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


/* Accessible visually-hidden utility */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html, body {
    height: 100%;
    width: 100%;
}

html {
    font-size: 16px; /* base for rem units (1rem = 16px) */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0a0806;
    color: #e8ddd4;
    overflow-x: hidden;
}

.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(
        to bottom,
        #0a0806 0%,
        #1a1410 20%,
        #2a1f18 50%,
        #1a1410 80%,
        #0a0806 100%
    );
}

/* Logo */
.logo {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo img {
    display: block;
    max-height: 3.5rem;
    width: auto;
}

/* Hero Section: make hero fill the viewport and image cover it */
.hero {
    min-height: 100vh;
    width: 100%;
    display: block;
    position: relative;
    padding: 0;
}

.hero-image {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    width: 100vw;
    height: 100vh;   
    overflow: hidden;
    background-image: url("assets/hero.jpg");
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Film grain texture overlay */
.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

/* Footer */
.footer {
    font-family: "adobe-garamond-pro", serif;
    font-weight: 400;
    font-style: normal;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 layout */
    align-items: end;
    gap: 2rem;
    z-index: 10;
}

.tagline {
    justify-self: start;
    font-size: 1.25rem;
    line-height: 1.45;
    color: #FBF9F0;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.contact {
    color: #FBF9F0;
    text-decoration: none;
    font-size: 20 / 16 rem; /* 20pt */
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    white-space: nowrap;
    /* place contact in the right column on grid layouts */
    justify-self: end;
    align-self: end;
}

.contact-link {
    color: #FBF9F0;
    text-decoration: none;
}


.contact-link:hover {
    color: #f5efe8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        top: 1.5rem;
    }

    .logo img {
        max-height: 3rem;
    }

    .hero {
        padding: 0;
    }
    /* Stack footer on smaller screens */
    .footer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
        top: 16vh;
        text-align: center;

    }

    .tagline {
        align-self: flex-start;
        max-width: 100%;
    }

    .contact {
        align-self: center;
    }
    
        /* tagline stays 28pt on smaller screens */

    .hero-image {
        background-position: 70% center; /* adjust focal point for smaller screens */
    }
    
}

@media (max-width: 480px) {
    .logo img {
        max-height: 2.5rem;
    }

    .hero {
        padding: 0;
    }

    

    .footer {
        padding: 1.25rem;
    }

    /* tagline stays 28pt on smaller screens */

    .contact {
        align-self: center;
    }

}


/* Large screens */
@media (min-width: 1200px) {
    .logo img {
        max-height: 4rem;
    }

    .footer {
        padding: 3rem;
    }

    /* removed tagline max-width so tagline remains 20pt */
}

/* =========================
   New semantic layout styles
   ========================= */

:root {
    --ink: #0a0806;
    --sand: #FBF9F0;
    --terra: #A15C34;
    --gutter: clamp(16px, 4vw, 56px);
    --header-pad-y: clamp(8px, 1.2vw, 12px);
    --hero-bottom-pad: clamp(1rem, 3vh, 2.5rem);
    --logo-offset: 2.5rem; /* ~40px */
    --join-title-offset: clamp(3rem, 12vh, 12rem); /* up to 192px */
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--sand);
    background: var(--terra);
}

.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(-120%);
    background: var(--ink);
    color: var(--sand);
    padding: 0.5rem 0.75rem;
    z-index: 10000;
}
.skip-link:focus { transform: translateY(0); }

/* Sticky header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: var(--logo-offset) var(--gutter) var(--header-pad-y);
    color: var(--sand);
    background: transparent;
    backdrop-filter: none;
}
.brand {
    grid-column: 2;
    justify-self: center;
}
.brand img {
    display: block;
    height: 56px;
    width: auto;
}
.primary-nav {
    grid-column: 3;
    justify-self: end;
}
.primary-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}
.primary-nav a {
    color: var(--sand);
    text-decoration: none;
    font-family: "adobe-garamond-pro", serif;
    font-weight: 400;
}
.primary-nav a:hover { text-decoration: underline; }

/* Hero section */
.hero-section {
    position: relative;
    /* Fill the visible viewport on mobile without being pushed by browser UI bars */
    min-height: 100vh;   /* fallback */
    min-height: 100svh;  /* small viewport (iOS Safari, Chrome mobile) */
    /* Force true full-bleed width even inside any centered parent */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: var(--ink);
}
@supports (height: 100dvh) {
    .hero-section {
        min-height: 100dvh; /* dynamic viewport on modern browsers */
    }
}
.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    margin: 0; /* reset default figure margins that can shift layout */
    /* Defensively ensure the media spans the full viewport width in Safari */
    width: 100vw;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}
.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 100%;
    display: block;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    gap: 1rem;
    padding: 0 var(--gutter) calc(var(--hero-bottom-pad) + env(safe-area-inset-bottom));
}
.lede {
    font-family: "adobe-garamond-pro", serif;
    font-weight: 400;
    font-size: 1.375rem; /* 22pt */
    line-height: 1.2;
    max-width: 48rem;
    color: var(--sand);
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.scroll-cue {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scroll-cue img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.25));
}
.scroll-cue:hover img { opacity: 1; }

/* Join section */
.join-section {
    background: var(--terra);
    color: #131E14;
    display: flex;
    justify-content: center;
    min-height: 80vh;
    padding-top: var(--join-title-offset);
    padding-bottom: clamp(3rem, 10vh, 8rem);
    padding-inline: var(--gutter);
}

/* Improve anchor scrolling so fixed header doesn't cover content */
section {
    scroll-margin-top: 80px;
}
.join-inner {
    width: 100%;
    max-width: 720px;
    text-align: center;
}
.substack-embed {
    display: flex;
    justify-content: center;
    margin: 1rem 0 1.25rem;
}
.substack-embed iframe {
    width: min(100%, 480px);
    height: 320px;
}
#join-title {
    font-family: "adobe-garamond-pro", serif;
    font-weight: 400;
    font-size: 1.375rem; /* 22pt */
    line-height: 1.35;
    margin-bottom: 0.75rem;
}
.subtitle {
    font-family: "adobe-garamond-pro", serif;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}
.subscribe-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    width: min(640px, 100%);
    margin: 0 auto;
}
.subscribe-form input[type="email"] {
    padding: 0.8rem 0.9rem;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.2);
    background: #f4eee8;
    color: #2b1e17;
    font-size: 1rem;
}
.subscribe-form button {
    padding: 0 1rem;
    border: 1px solid rgba(0,0,0,0.25);
    background: var(--ink);
    color: var(--sand);
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
}
.subscribe-form button:hover {
    background: #171310;
}
@media (max-width: 560px) {
    .subscribe-form { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
    font-family: "adobe-garamond-pro", serif;
    font-weight: 400;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 1rem;
    padding: 2rem var(--gutter) 3rem;
    background: var(--terra);
    color: #131E14;
}
.site-footer a {
    color: #131E14;
    text-decoration: none;
    font-style: normal; /* prevent italics from <address> inheritance */
}
.site-footer a:hover { text-decoration: underline; }
.footer-left { justify-self: start; }
.footer-center { justify-self: center; }
.footer-right { justify-self: end; }
.back-to-top {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.back-to-top .footer-rose {
    height: 36px;
    width: auto;
    display: block;
}

.substack-widget {
    background-color: #f3e9dd !important; /* editorial cream */
    border-radius: 0px !important; 
    border: none !important;
    box-shadow: none !important;
  }

/* Larger screens */
@media (min-width: 1200px) {
    .brand img { height: 64px; }
}

/* Center hero image on smaller breakpoints */
@media (max-width: 768px) {
    .brand img {
        height: 50px; /* ~10% smaller than default 56px */
    }
    .hero-media img {
        object-position: 80% 40%; /* shift focus right and slightly up to include subject */
    }
    .hero-image {
        background-position: 80% 40%;
    }
    /* Stack footer vertically on mobile */
    .site-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
    .footer-left,
    .footer-center,
    .footer-right {
        align-self: center;
    }
    .back-to-top .footer-rose {
        height: 36px;
    }
}
