/* afterglow — a simple two-section site */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --paper: #f4f2ed;
    --ink: #1c1b19;
    --ink-soft: #6b6862;
    --ember: #c2602f;
    --rule: rgba(28, 27, 25, 0.14);
    --gutter: clamp(1.5rem, 5vw, 6rem);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Crimson Text', Georgia, serif;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- top bar ---------- */
.top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: clamp(3rem, 8vh, 6rem);
}
.wordmark {
    font-family: 'SeasonMix', serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}
.top-nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2.25rem);
}
/* tagline sitting just under the baked-in "AfterGlow" title */
.hero-tagline {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 2;
    color: #fff;
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.05rem, 2.4vw, 1.7rem);
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.28);
}

/* home hero already shows the AfterGlow title in the image */
.intro .wordmark { visibility: hidden; }
.intro .top-link {
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.top-link {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    opacity: 0.75;
    transition: opacity 0.3s var(--ease);
}
.top-link:hover { opacity: 1; }

/* ---------- section 1: intro ---------- */
.intro {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) clamp(3rem, 6vh, 5rem);
    /* dreamy floral background image */
    background: #cfe0cf url('home-bg-lg.jpg') center center / cover no-repeat;
}

/* real Hawaiian flower photos — soft-edged corner vignettes */
.floral-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.flower {
    position: absolute;
    width: clamp(150px, 22vw, 320px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.9;
    /* feather the edges so each photo melts into the peach */
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 42%, rgba(0,0,0,0.55) 60%, transparent 74%);
    mask-image: radial-gradient(circle at 50% 50%, #000 42%, rgba(0,0,0,0.55) 60%, transparent 74%);
}
.flower-tl { top: -7%; left: -6%; transform: rotate(-6deg); }
.flower-tr { top: -8%; right: -6%; width: clamp(130px, 18vw, 260px); transform: rotate(8deg); }
.flower-bl { bottom: -8%; left: -5%; width: clamp(130px, 18vw, 260px); transform: rotate(6deg); }
.flower-br { bottom: -7%; right: -6%; transform: rotate(-8deg); }
.flower-mid { top: 40%; right: 3%; width: clamp(96px, 12vw, 170px); opacity: 0.8; transform: rotate(4deg); }

.intro > .top,
.intro > .intro-copy { position: relative; z-index: 1; }

.intro-copy {
    max-width: 900px;
    margin: auto;
    text-align: center;
}
.intro-copy p {
    margin-left: auto;
    margin-right: auto;
}
.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ember);
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
}
.intro-copy h1 {
    font-family: 'SeasonMix', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin-bottom: clamp(1.5rem, 3vh, 2.25rem);
}
.intro-copy p {
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.55;
    max-width: 46ch;
    color: var(--ink);
}

/* simple image grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.gallery figure {
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.gallery figure:nth-child(1),
.gallery figure:nth-child(4) { aspect-ratio: 4 / 5; }
.gallery img {
    transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
}
.gallery figure:hover img {
    transform: scale(1.04);
}

/* ---------- section 2: contact ---------- */
.contact {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(6rem, 16vh, 12rem) var(--gutter) clamp(2rem, 5vw, 3rem);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contact-inner { max-width: 820px; }
.contact h2 {
    font-family: 'SeasonMix', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}
.contact p {
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.6;
    max-width: 52ch;
    color: rgba(244, 242, 237, 0.85);
    margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.email {
    display: inline-block;
    font-family: 'SeasonMix', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 4vw, 3rem);
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--paper);
    border-bottom: 2px solid transparent;
    transition: border-color 0.4s var(--ease);
}
.email:hover { border-color: var(--ember); }

.book-btn {
    display: inline-block;
    margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
    padding: 0.95rem 2rem;
    background: var(--ember);
    color: var(--paper);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.book-btn:hover { transform: translateY(-2px); background: #d06e39; }

.social {
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.social a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(244, 242, 237, 0.8);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: color 0.3s var(--ease);
}
.social a:hover { color: var(--ember); }
.social svg { display: block; }

.foot {
    display: flex;
    justify-content: space-between;
    padding-top: clamp(3rem, 8vh, 5rem);
    border-top: 1px solid rgba(244, 242, 237, 0.15);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(244, 242, 237, 0.5);
}

/* ---------- mobile nav toggle (hidden on desktop) ---------- */
.nav-toggle { display: none; }

/* the persistent mobile tab bar is hidden on desktop */
.mobile-tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
    /* stop any stray wide element causing a horizontal wobble on phones */
    html, body { overflow-x: hidden; }

    .gallery { grid-template-columns: repeat(2, 1fr); }
    .foot { flex-direction: column; gap: 0.5rem; }

    /* keep the header a tidy single row on phones */
    .top { align-items: center; }

    /* >=16px stops iOS from auto-zooming when a field is focused */
    input, select, textarea { font-size: 16px; }

    /* art-directed portrait hero for phones: a landscape crop over a tall
       screen over-zooms and clips the baked "AfterGlow" title, and ships a
       heavy file. this crop keeps the title whole and is ~50KB, so the hero
       stays full-height and full-impact. */
    .intro { background-image: url('home-bg-mobile.jpg'); }
    .hero-tagline { top: 56%; font-size: clamp(1rem, 4.5vw, 1.4rem); }

    /* the header owns the full-screen menu overlay; lift it above the
       hero tagline (z-index 2) so "we capture moments" can't bleed
       through the open menu between the tabs */
    .intro > .top { z-index: 3; }

    /* hamburger button — fixed so the menu is reachable from anywhere on any
       page. given a visible pill so it reads clearly as a tappable control
       instead of three faint lines lost against a photo or paper background. */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        position: fixed;
        top: clamp(1rem, 3.5vw, 1.5rem);
        right: clamp(1rem, 4vw, 1.75rem);
        width: 46px;
        height: 46px;
        padding: 11px;
        border: 1px solid var(--rule);
        border-radius: 999px;
        background: rgba(250, 249, 246, 0.92);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        cursor: pointer;
        z-index: 2001;
        transition: transform 0.25s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
        -webkit-tap-highlight-color: transparent;
    }
    /* on the home hero the button sits over a photo — dark pill, white bars */
    .intro .nav-toggle {
        background: rgba(20, 18, 16, 0.4);
        border-color: rgba(255, 255, 255, 0.45);
    }
    /* once the full-screen menu is open, drop the pill so the X sits clean
       over the dark overlay */
    .nav-toggle.open {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    .nav-toggle:active { transform: scale(0.9); }
    .nav-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--ink);
        border-radius: 2px;
        transition: transform 0.35s var(--ease), opacity 0.2s var(--ease), background 0.3s var(--ease);
    }
    /* on the home hero the bars sit over a photo — make them white */
    .intro .nav-toggle span { background: #fff; }
    /* when open, bars sit over the dark overlay */
    .nav-toggle.open span { background: var(--paper); }
    .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* full-screen overlay menu (applies to both home and interior navs) */
    .top-nav,
    .pf-nav {
        position: fixed;
        inset: 0;
        z-index: 2000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.9rem;
        background: var(--ink);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-6px);
        transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
    }
    .top-nav.open,
    .pf-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .top-nav a,
    .pf-nav a,
    .intro .top-link {
        color: var(--paper);
        opacity: 0.9;
        font-size: 1.4rem;
        letter-spacing: 0.16em;
        text-shadow: none;
        /* links start shifted + faded; revealed with a stagger when menu opens */
        transform: translateY(14px);
        opacity: 0;
        transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.3s var(--ease);
    }
    .top-nav a:active,
    .pf-nav a:active { color: var(--ember); }
    .pf-nav a.active { border-bottom: 1px solid var(--ember); padding-bottom: 3px; }

    /* staggered reveal once the overlay is open */
    .top-nav.open a,
    .pf-nav.open a { transform: translateY(0); opacity: 0.92; }
    .top-nav.open a:nth-child(1),
    .pf-nav.open a:nth-child(1) { transition-delay: 0.08s; }
    .top-nav.open a:nth-child(2),
    .pf-nav.open a:nth-child(2) { transition-delay: 0.14s; }
    .top-nav.open a:nth-child(3),
    .pf-nav.open a:nth-child(3) { transition-delay: 0.20s; }
    .top-nav.open a:nth-child(4),
    .pf-nav.open a:nth-child(4) { transition-delay: 0.26s; }
    .top-nav.open a:nth-child(5),
    .pf-nav.open a:nth-child(5) { transition-delay: 0.32s; }

    /* on phones the nav is a persistent, always-visible bottom bar so every
       page is reachable from every page in one tap. this replaces the
       hidden hamburger menu, which was easy to miss. */
    .nav-toggle { display: none !important; }
    .top-nav, .pf-nav { display: none !important; }

    body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

    .mobile-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2050;
        align-items: stretch;
        background: rgba(250, 249, 246, 0.97);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--rule);
        box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.09);
        padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
    }
    .mobile-tabbar a {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--ink);
        opacity: 0.62;
        font-size: 0.56rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        padding: 3px 0;
        transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-tabbar a svg {
        width: 23px;
        height: 23px;
        display: block;
    }
    .mobile-tabbar a span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .mobile-tabbar a.active { opacity: 1; color: var(--ember); }
    .mobile-tabbar a:active { opacity: 1; transform: scale(0.94); }
}

/* respect users who prefer reduced motion */
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
    .top-nav, .pf-nav,
    .top-nav a, .pf-nav a,
    .nav-toggle, .nav-toggle span { transition: none !important; }
    .top-nav a, .pf-nav a { transform: none; }
}
@media (max-width: 440px) {
    .gallery { grid-template-columns: 1fr; }
}
