/* ==========================================================================
   Vintage Ambiance · Branch selector
   Palette inspired by the gold VA monogram:
     - warm ivory backgrounds
     - champagne gold accents
     - soft taupe / blush stone supporting tones
   ========================================================================== */

:root {
    --ivory: #faf6ee;
    --ivory-soft: #f3ecdd;
    --beige: #ede3d0;
    --stone: #e6d9c3;
    --taupe: #8c7a62;
    --taupe-soft: #a99a83;
    --ink: #3a2f22;
    --ink-soft: #5b4b38;
    --gold: #b6914f;
    --gold-light: #d9b776;
    --gold-deep: #8a6a32;
    --gold-glow: rgba(182, 145, 79, 0.18);

    --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --ease-soft: cubic-bezier(0.4, 0.1, 0.2, 1);
    --shadow-sm: 0 1px 2px rgba(58, 47, 34, 0.04), 0 2px 6px rgba(58, 47, 34, 0.04);
    --shadow-md: 0 10px 30px -12px rgba(58, 47, 34, 0.18),
        0 4px 12px -6px rgba(58, 47, 34, 0.08);
    --shadow-lg: 0 24px 60px -20px rgba(58, 47, 34, 0.28),
        0 8px 24px -12px rgba(58, 47, 34, 0.12);

    --radius-sm: 2px;
    --radius-md: 6px;

    --maxw: 1440px;
}

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

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

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

/* Strict no-scroll: the page is always exactly 100dvh, content fits. */
body {
    overflow: hidden;
    overscroll-behavior: none;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

/* -------- Base -------- */
body {
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--ivory);
    background-image:
        radial-gradient(
            ellipse 80% 55% at 50% 0%,
            rgba(217, 183, 118, 0.14),
            transparent 60%
        ),
        radial-gradient(
            ellipse 70% 50% at 0% 100%,
            rgba(230, 217, 195, 0.55),
            transparent 65%
        ),
        radial-gradient(
            ellipse 70% 50% at 100% 100%,
            rgba(237, 227, 208, 0.55),
            transparent 65%
        ),
        linear-gradient(180deg, var(--ivory) 0%, var(--ivory-soft) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Subtle paper-grain overlay via svg noise */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.45  0 0 0 0 0.28  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* -------- Layout shell -------- */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: clamp(18px, 3vh, 48px) clamp(20px, 4vw, 64px)
        clamp(14px, 2vh, 32px);
    max-width: var(--maxw);
    margin: 0 auto;
    gap: clamp(12px, 2.2vh, 36px);
}

/* Header and footer take only the space they need; branches absorb the rest. */
.intro,
.footer {
    flex: 0 0 auto;
    min-height: 0;
}

/* -------- Intro / header -------- */
.intro {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 1s var(--ease-soft) forwards;
}

.intro__logo {
    display: inline-block;
    width: clamp(88px, 11vw, 128px);
    height: auto;
    transition: transform 0.6s var(--ease-soft);
}

.intro__logo:hover {
    transform: translateY(-2px);
}

/* --- Animated inline logo --- */
.logo {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 18px rgba(138, 106, 50, 0.12));
    transition: filter 0.5s var(--ease-soft);
}

/* The filled frame starts hidden; it fades in once the stroke has finished
   tracing the square, creating a seamless hand-off from line to solid gold. */
.logo__frame {
    opacity: 0;
    animation: logoFrameFill 0.9s 1.45s var(--ease-soft) forwards;
}

/* Two symmetric half-paths drawn from top-center, meeting at bottom-center. */
.logo__frame-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0;
    animation:
        logoFrameReveal 0.01s 0.2s linear forwards,
        logoFrameDraw 1.3s 0.2s cubic-bezier(0.65, 0, 0.25, 1) forwards,
        logoFrameHandoff 0.7s 1.45s var(--ease-soft) forwards;
}

.logo__letters {
    transform-origin: center;
    transform: translateY(6px);
    opacity: 0;
    animation: logoLettersIn 1.1s 0.95s var(--ease-soft) forwards;
}

.intro__logo:hover .logo {
    filter: drop-shadow(0 10px 26px rgba(217, 183, 118, 0.35)) brightness(1.04);
}

@keyframes logoFrameReveal {
    to {
        opacity: 1;
    }
}

@keyframes logoFrameDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes logoFrameHandoff {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes logoFrameFill {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes logoLettersIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.intro__eyebrow {
    margin: 6px 0 0;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--taupe);
}

.intro__heading {
    margin: 2px 0 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: 0.005em;
    color: var(--ink);
}

.intro__heading::after {
    content: "";
    display: block;
    width: 54px;
    height: 1px;
    margin: 14px auto 0;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold-light),
        var(--gold),
        var(--gold-light),
        transparent
    );
}

.intro__lede {
    margin: 4px 0 0;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink-soft);
    max-width: 34ch;
}

/* -------- Branches layout -------- */
.branches {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: clamp(20px, 3vw, 48px);
}

.branches__divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1px;
    min-height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(182, 145, 79, 0.22) 22%,
        rgba(182, 145, 79, 0.45) 50%,
        rgba(182, 145, 79, 0.22) 78%,
        transparent 100%
    );
}

/* Tiny gold diamond centred on the hairline — a single editorial
   accent that echoes the ornament above each CTA. */
.branches__divider-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: var(--gold);
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0.7;
    box-shadow: 0 0 0 4px var(--ivory);
}

/* -------- Branch card -------- */
.branch {
    position: relative;
    min-height: 0;
    min-width: 0;
    display: flex;
    border: 1px solid rgba(182, 145, 79, 0.18);
    border-radius: var(--radius-md);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.25) 100%
        ),
        linear-gradient(
            180deg,
            var(--ivory) 0%,
            var(--beige) 100%
        );
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        transform 0.55s var(--ease-soft),
        box-shadow 0.55s var(--ease-soft),
        border-color 0.55s var(--ease-soft),
        opacity 0.55s var(--ease-soft);
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 1.1s 0.15s var(--ease-soft) forwards;
}

.branch[data-branch="boothstown"] {
    animation-delay: 0.28s;
}

/* Decorative corner flourishes */
.branch::before,
.branch::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 1px solid var(--gold-light);
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-soft), border-color 0.5s var(--ease-soft);
}

.branch::before {
    top: 14px;
    left: 14px;
    border-right: none;
    border-bottom: none;
}

.branch::after {
    bottom: 14px;
    right: 14px;
    border-left: none;
    border-top: none;
}

/* Clickable full-card overlay */
.branch__link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.branch__link:focus {
    outline: none;
}

.branch__link:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -6px;
}

.branch__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* Asymmetric vertical padding: slightly tighter at the top,
       a touch more generous at the bottom. The effective optical
       centre sits just above geometric centre — a classic editorial
       rebalance that stops the card feeling top-heavy-empty. */
    padding: clamp(24px, 3.5vw, 48px) clamp(28px, 4vw, 60px)
        clamp(32px, 4.5vw, 60px);
    text-align: center;
    align-items: center;
    justify-content: safe center;
    gap: 14px;
    pointer-events: none; /* allow overlay link to handle clicks */
    overflow: hidden;
}

/* Re-enable pointer events on interactive children inside inner */
.branch__inner a,
.branch__inner .branch__cta {
    pointer-events: auto;
}

.branch__eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.branch__name {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.5rem, 5.2vw, 4rem);
    line-height: 1;
    color: var(--ink);
    letter-spacing: 0.005em;
}

.branch__name::after {
    content: "";
    display: block;
    width: 42px;
    height: 1px;
    margin: 12px auto 4px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--gold),
        transparent
    );
}

.branch__subtitle {
    margin: 0;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--ink-soft);
    max-width: 32ch;
}

.branch__details {
    margin: 4px 0 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.branch__detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.branch__detail dt {
    font-family: var(--sans);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--taupe);
}

.branch__detail dd {
    margin: 0;
    font-size: 14.5px;
    color: var(--ink);
}

.branch__address,
.branch__phone {
    display: inline-block;
    border-bottom: 1px solid transparent;
    transition: color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.branch__address:hover,
.branch__address:focus-visible,
.branch__phone:hover,
.branch__phone:focus-visible {
    color: var(--gold-deep);
    border-bottom-color: rgba(182, 145, 79, 0.5);
    outline: none;
}

.branch__address--placeholder,
.branch__phone--placeholder {
    color: var(--taupe-soft);
    font-style: italic;
}

/* CTA */
.branch__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 34px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0.05)
    );
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
    transition:
        color 0.55s var(--ease-soft),
        background 0.55s var(--ease-soft),
        border-color 0.55s var(--ease-soft),
        box-shadow 0.6s var(--ease-soft),
        letter-spacing 0.55s var(--ease-soft),
        transform 0.55s var(--ease-soft);
}

/* Small editorial diamond ornament floating just above the CTA.
   Echoes the divider mark between the two cards for visual cohesion. */
.branch__cta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -18px;
    width: 4px;
    height: 4px;
    background: var(--gold-light);
    transform: translateX(-50%) rotate(45deg);
    opacity: 0.55;
    transition: opacity 0.55s var(--ease-soft),
        background 0.55s var(--ease-soft);
    pointer-events: none;
}

.branch__cta-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.55s var(--ease-soft);
}

.branch__cta:hover,
.branch__cta:focus-visible {
    color: var(--ivory);
    background: linear-gradient(
        135deg,
        var(--gold-deep) 0%,
        var(--gold) 55%,
        var(--gold-light) 100%
    );
    border-color: var(--gold);
    box-shadow:
        0 16px 36px -18px rgba(138, 106, 50, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    letter-spacing: 0.34em;
    outline: none;
}

.branch:hover .branch__cta::before,
.branch:focus-within .branch__cta::before,
.branch__cta:hover::before,
.branch__cta:focus-visible::before {
    opacity: 0.95;
    background: var(--gold);
}

.branch__cta:hover .branch__cta-arrow,
.branch__cta:focus-visible .branch__cta-arrow {
    transform: translateX(4px);
}

/* Disabled / "Coming Soon" CTA — muted tones, no interactive affordance. */
.branch__cta--disabled,
.branch__cta--disabled:hover,
.branch__cta--disabled:focus-visible {
    color: var(--taupe);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.35),
        rgba(255, 255, 255, 0.02)
    );
    border-color: rgba(140, 122, 98, 0.45);
    box-shadow: none;
    letter-spacing: 0.32em;
    cursor: default;
}

.branch__cta--disabled::before {
    background: var(--taupe-soft);
    opacity: 0.45;
}

/* Coming-soon card — slightly quieter overall so the focus stays on
   the live branch. Subtle, never "greyed out". */
.branch--coming-soon .branch__eyebrow {
    color: var(--taupe);
}

/* ---- Hover / active state for whole card ---- */
.branch:hover,
.branch:focus-within,
.branch.is-active {
    transform: translateY(-4px);
    border-color: rgba(182, 145, 79, 0.55);
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px rgba(217, 183, 118, 0.35) inset,
        0 0 60px var(--gold-glow) inset;
}

.branch:hover::before,
.branch:hover::after,
.branch:focus-within::before,
.branch:focus-within::after,
.branch.is-active::before,
.branch.is-active::after {
    opacity: 1;
    border-color: var(--gold);
}

/* Soften sibling when one is highlighted */
.branches:hover .branch:not(:hover):not(:focus-within),
.branches.has-active .branch:not(.is-active) {
    opacity: 0.72;
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* -------- Footer -------- */
.footer {
    text-align: center;
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: fadeIn 1.2s 0.6s var(--ease-soft) forwards;
}

.footer p {
    margin: 0;
}

.footer__copy {
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--taupe);
    opacity: 0.85;
}

.footer__credit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--taupe-soft);
}

.footer__heart {
    width: 9px;
    height: 9px;
    color: var(--gold);
    transform: translateY(0.5px);
    opacity: 0.75;
    filter: drop-shadow(0 0 1px rgba(182, 145, 79, 0.3));
}

.footer__link {
    color: var(--gold-deep);
    border-bottom: 1px solid transparent;
    transition: color 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft);
}

.footer__link:hover,
.footer__link:focus-visible {
    color: var(--gold);
    border-bottom-color: rgba(182, 145, 79, 0.45);
    outline: none;
}

/* -------- Animations -------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
    .page {
        padding: 18px 20px 20px;
        gap: 16px;
    }

    /* Stack vertically and split the remaining vertical space evenly. */
    .branches {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto 1fr;
        gap: 14px;
    }

    /* On mobile, the branch cards become a focused "pick one" experience —
       eyebrow, name and CTA only. Full details live on each branch site. */
    .branch__details,
    .branch__subtitle {
        display: none;
    }

    .footer__rights {
        display: none;
    }

    .branches__divider {
        width: 70%;
        height: 1px;
        min-height: 0;
        margin: 0 auto;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(182, 145, 79, 0.45) 50%,
            transparent 100%
        );
    }

    .branches__divider-mark {
        width: 4px;
        height: 4px;
    }

    .branch__inner {
        padding: 18px 22px 24px;
        gap: 10px;
    }

    .branch__name {
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }

    .intro {
        gap: 8px;
    }

    .intro__lede {
        font-size: 13.5px;
    }
}

/* Medium-short viewports — compress the intro and card padding further
   so the page still fits without scrolling. */
@media (max-height: 780px) {
    .intro__logo {
        width: clamp(56px, 10vh, 104px);
    }

    .intro__heading {
        font-size: clamp(1.5rem, 3.6vh, 2.5rem);
    }

    .intro__heading::after {
        margin-top: 10px;
    }

    .branch__inner {
        padding: 16px 22px 24px;
        gap: 10px;
    }

    .branch__name {
        font-size: clamp(1.75rem, 4.8vh, 2.6rem);
    }

    .branch__name::after {
        margin: 8px auto 2px;
    }

    .branch__details {
        font-size: 13.5px;
        gap: 10px;
    }

    .branch__cta {
        padding: 11px 28px;
    }

    .branch__cta::before {
        top: -14px;
    }
}

/* Short viewports — drop non-essential copy to guarantee fit. */
@media (max-height: 620px) {
    .intro__lede,
    .branch__subtitle {
        display: none;
    }

    .intro__heading::after {
        margin-top: 8px;
    }

    .branch__name::after {
        margin: 6px auto 0;
    }

    .branch__details {
        font-size: 12.5px;
        gap: 6px;
    }

    .branch__detail dt {
        font-size: 9.5px;
    }

    .branch__cta {
        padding: 10px 24px;
        letter-spacing: 0.26em;
    }

    .footer {
        gap: 2px;
    }

    .footer__copy {
        font-size: 9.5px;
    }

    .footer__credit {
        font-size: 11px;
    }
}

/* Very short viewports (e.g. phone landscape) — strip down to essentials. */
@media (max-height: 500px) {
    .intro__eyebrow,
    .branch__eyebrow,
    .branches__divider-mark,
    .footer__copy {
        display: none;
    }

    .intro {
        gap: 4px;
    }

    .intro__heading::after {
        display: none;
    }

    .intro__logo {
        width: clamp(42px, 8vh, 72px);
    }

    .intro__heading {
        font-size: clamp(1.3rem, 4.2vh, 2rem);
    }

    .branch__inner {
        padding: 12px 18px;
        gap: 6px;
    }

    .branch__name {
        font-size: clamp(1.4rem, 4.2vh, 2rem);
    }

    .branch__name::after {
        display: none;
    }

    .branch__cta {
        padding: 8px 22px;
    }

    .branch__cta::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .intro__heading {
        font-size: 1.95rem;
    }

    .intro__logo {
        width: 82px;
    }

    .branch__cta {
        padding: 12px 28px;
        letter-spacing: 0.28em;
    }
}

/* -------- Motion & accessibility preferences -------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .intro,
    .branch,
    .footer {
        opacity: 1;
        transform: none;
    }

    .logo,
    .logo__frame,
    .logo__letters {
        opacity: 1;
        transform: none;
    }

    .logo__frame-draw {
        display: none;
    }
}

/* Slight elevation tweak for very wide screens */
@media (min-width: 1600px) {
    .page {
        gap: 72px;
    }
}
