/* Studio by Char V4 */

@font-face { font-family: 'Playfair Display'; src: url('../fonts/PlayfairDisplay-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/PlayfairDisplay-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/DMSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/DMSans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

/* Light only: the brand palette is fixed by the client. Dark is kept for
   highlights (buttons, figures, one closing band per page). */
:root {
    color-scheme: light;
    --bg:        #FAF9F6;
    --bg-soft:   #F0EEE9;
    --bg-dark:   #2a2825;
    --text:      #1a1a1a;
    --text-inv:  #FAF9F6;
    --muted:     #6a6a6a;
    --accent:    #C08A74;   /* fills and decoration on light grounds (2.8:1) */
    --accent-lt: #d4a896;   /* text-safe on --bg-dark (6.9:1) */
    --border:    #e2dfd9;
    --wash:      250, 249, 246;

    --f-head: 'Playfair Display', Georgia, serif;
    --f-body: 'DM Sans', 'Segoe UI', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --t-ui: 240ms;
    --gutter: clamp(1rem, 4vw, 3.5rem);
    --header-h: 84px;
    --section: clamp(5rem, 11vw, 9.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 860px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--bg); padding: .75rem 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Type */
h1, h2, h3 { font-family: var(--f-head); font-weight: 400; text-wrap: balance; }
h2 { font-size: clamp(2.25rem, 4.4vw, 3.9rem); line-height: 1.04; letter-spacing: -.022em; }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -.01em; }
h2 em, h3 em, h1 em { font-style: italic; }
p { text-wrap: pretty; }
.muted { color: var(--muted); }
.lede { font-size: 1.1875rem; line-height: 1.6; max-width: 46ch; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .75rem;
    font-size: .8125rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
    color: var(--bg-dark);
}
.eyebrow::before { content: ''; width: 2.5rem; height: 1px; background: var(--accent); }
.eyebrow + h2, .eyebrow + h1 { margin-top: 1.25rem; }
.text-link {
    display: inline-flex; align-items: center; gap: .6rem;
    font-weight: 500; padding-block: .6rem;
    background: linear-gradient(currentColor, currentColor) 0 calc(100% - .35rem) / 100% 1px no-repeat;
}
.text-link .arrow { transition: transform var(--t-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .text-link:hover .arrow { transform: translateX(4px); } }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 48px; padding: 0 1.75rem; border-radius: 999px; border: 0; cursor: pointer;
    font: 500 .9375rem/1 var(--f-body); letter-spacing: .01em;
    transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.btn-fill { background: var(--bg-dark); color: var(--text-inv); }
.btn-accent { background: var(--accent); color: var(--text); }
.btn-ghost { color: var(--text); box-shadow: inset 0 0 0 1px var(--text); background: transparent; }
.btn-ghost-inv { color: var(--text-inv); box-shadow: inset 0 0 0 1px rgba(250,249,246,.6); }
.btn .arrow { transition: transform var(--t-ui) var(--ease-out); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
@media (hover: hover) and (pointer: fine) {
    .btn:hover { transform: translateY(-2px); }
    .btn:hover .arrow { transform: translateX(4px); }
}

/* Header: transparent over the hero, cream bar once scrolled */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; color: var(--text); }
.site-header::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--bg); box-shadow: 0 1px 0 var(--border);
    opacity: 0; transition: opacity 300ms var(--ease-out);
}
.site-header[data-scrolled="true"]::before { opacity: 1; }
.site-header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    height: var(--header-h);
}
/* Shrink the two ends toward their own edges so neither drifts off the column.
   Desktop only: a transform on .nav would trap the fixed mobile menu. */
.site-header .logo { transform-origin: left center; transition: transform 300ms var(--ease-out); }
.site-header[data-scrolled="true"] .logo { transform: scale(.88); }
@media (min-width: 961px) {
    .site-header .nav { transform-origin: right center; transition: transform 300ms var(--ease-out); }
    .site-header[data-scrolled="true"] .nav { transform: scale(.92); }
}
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-head); font-size: 1.5rem; letter-spacing: -.01em; white-space: nowrap; }
/* Charlotte's line-drawing mark, traced to SVG (tools/make-logo.py), kept in its own blue. */
.logo-mark {
    flex: none; width: 2.6rem; height: 2.5rem; background: #2715C1;
    -webkit-mask: url('../images/studiobychar-studio-by-char-logo.svg?v=2') center / contain no-repeat;
    mask: url('../images/studiobychar-studio-by-char-logo.svg?v=2') center / contain no-repeat;
}
.site-footer .logo-mark { width: 3.4rem; height: 3.3rem; }
.logo em { color: var(--accent); }
.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.2vw, 2.25rem); }
.nav a:not(.btn) { position: relative; font-size: .9375rem; white-space: nowrap; padding-block: .75rem; }
.nav a:not(.btn)::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: .45rem; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform var(--t-ui) var(--ease-out);
}
.nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
    .nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
}
.nav .btn { min-height: 44px; padding: 0 1.4rem; }
.menu-btn { display: none; }

@media (max-width: 960px) {
    .menu-btn {
        display: grid; place-items: center; width: 44px; height: 44px;
        background: none; border: 0; color: inherit; cursor: pointer;
    }
    .menu-btn span, .menu-btn span::before, .menu-btn span::after {
        display: block; width: 22px; height: 1.5px; background: currentColor; position: relative;
        transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
    }
    .menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
    .menu-btn span::before { top: -7px; }
    .menu-btn span::after { top: 7px; }
    .menu-open .menu-btn span { background: transparent; }
    .menu-open .menu-btn span::before { transform: translateY(7px) rotate(45deg); }
    .menu-open .menu-btn span::after { transform: translateY(-7px) rotate(-45deg); }

    .nav {
        position: fixed; inset: 0; z-index: -1;
        flex-direction: column; justify-content: center; align-items: flex-start; gap: .25rem;
        padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
        background: var(--bg);
        opacity: 0; visibility: hidden;
        transition: opacity 300ms var(--ease-out), visibility 0s 300ms;
    }
    .nav a:not(.btn) { font-family: var(--f-head); font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.2; padding-block: .2rem; }
    .nav a:not(.btn)::after { display: none; }
    .nav a[aria-current="page"] { font-style: italic; color: var(--accent); }
    .nav .btn { margin-top: 1.5rem; }
    .menu-open .nav { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }
    .menu-open { overflow: hidden; }
}

/* Heroes. The cream sits behind the words only; the photo stays clear elsewhere. */
.hero, .page-hero {
    position: relative; isolation: isolate;
    display: flex; align-items: flex-end;
    background: var(--bg-soft);
    overflow: hidden;
}
.hero { min-height: max(88vh, 600px); }
.page-hero { min-height: max(72vh, 520px); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.hero::after, .page-hero::after {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 150px; z-index: -1;
    background: linear-gradient(to bottom, rgba(var(--wash), .72), rgba(var(--wash), 0));
}
.hero-copy { width: 100%; padding-block: calc(var(--header-h) + 3rem) clamp(2.5rem, 7vh, 5rem); }
.hero-title { position: relative; max-width: 50rem; }
.hero-title::before {
    content: ''; position: absolute; z-index: -1; inset: -35% -30% -45% -45%;
    background: radial-gradient(closest-side, rgba(var(--wash), .9) 0%, rgba(var(--wash), .78) 50%, rgba(var(--wash), 0) 100%);
    pointer-events: none;
}
.hero h1, .page-hero h1 {
    font-size: clamp(2.75rem, 6.4vw, 5.75rem);
    line-height: .98; letter-spacing: -.028em;
    margin-top: 1.25rem; max-width: 13ch;
}
.page-hero h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); max-width: 16ch; line-height: 1; }
.h1-line { display: block; overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }
.h1-line > span { display: block; }
.page-hero .lede { margin-top: 1.5rem; }
.glass {
    background: rgba(var(--wash), .8);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    padding: 1.75rem;
}
.glass .lede { font-size: 1.0625rem; }
.glass .btn-row { margin-top: 1.5rem; }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .glass { background: var(--bg); box-shadow: inset 0 0 0 1px var(--text); } }

@media (min-width: 961px) {
    .hero-copy {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
        gap: 3rem; align-items: end;
    }
}
@media (max-width: 960px) {
    .hero { min-height: 100svh; }
    .hero .hero-media img { object-position: var(--pos-m, 13% 30%); }
    .page-hero { min-height: 94svh; }
    .page-hero .hero-media img { object-position: var(--pos-m, var(--pos, 50% 50%)); }
    .hero-title::before { inset: -30% -20% -30% -20%; }
    .hero .glass { margin-top: 1.75rem; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
    .hero::before {
        content: ''; position: absolute; inset: auto 0 0 0; height: 62%; z-index: -1;
        background: linear-gradient(to top, rgba(var(--wash), .95) 0%, rgba(var(--wash), .8) 60%, rgba(var(--wash), 0) 100%);
    }
}

/* Trust bar */
.trust { background: var(--bg); border-bottom: 1px solid var(--border); }
.trust ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust li {
    display: flex; align-items: baseline; gap: .75rem;
    padding: 1.6rem 0 1.6rem clamp(1rem, 2.5vw, 2rem);
    border-left: 1px solid var(--border);
    font-size: .9375rem; color: var(--muted);
}
.trust li:first-child { border-left: 0; padding-left: 0; }
.trust strong {
    font-family: var(--f-head); font-weight: 400; font-size: 2.25rem; line-height: 1;
    color: var(--bg-dark); font-variant-numeric: lining-nums tabular-nums;
}
@media (max-width: 760px) {
    .trust ul { grid-template-columns: 1fr 1fr; }
    .trust li { padding: 1.25rem 0 1.25rem 1rem; }
    .trust li:nth-child(odd) { border-left: 0; padding-left: 0; }
    .trust li:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* Sections */
.section { padding-block: var(--section); }
.section-soft { background: var(--bg-soft); }
.section-head { display: grid; gap: 1.5rem 4rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 900px) {
    .section-head.split-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
}

/* Image frame: square corners, zooms settle as they scroll in */
.frame { position: relative; overflow: hidden; background: var(--bg-soft); }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.ar-portrait { aspect-ratio: 4 / 5; }
.ar-tall { aspect-ratio: 2 / 3; }
.ar-land { aspect-ratio: 3 / 2; }
.ar-square { aspect-ratio: 1; }
.ar-wide { aspect-ratio: 16 / 9; }
.caption { margin-top: .9rem; font-size: .875rem; color: var(--muted); }

/* Split: text + image, the image breaks the column edge */
.split { display: grid; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
@media (min-width: 900px) {
    .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .split.flip > :first-child { order: 2; }
    .split.wide-img { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
.split p + p { margin-top: 1rem; }
.split .body { font-size: 1.0625rem; color: var(--muted); }
.pull {
    font-family: var(--f-head); font-style: italic; font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.35;
    padding-left: 1.25rem; border-left: 2px solid var(--accent); margin: 1.75rem 0;
}
.overlap { position: relative; }
.overlap .frame-inset {
    position: absolute; width: 44%; right: -6%; bottom: -12%;
    box-shadow: 0 0 0 10px var(--bg);
}
@media (max-width: 899px) { .overlap .frame-inset { right: 0; bottom: -8%; width: 46%; } .overlap { margin-bottom: 3rem; } }

/* Feature list */
.ticks { margin-top: 2rem; border-top: 1px solid var(--border); }
.ticks li {
    display: flex; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--border);
}
.ticks li::before {
    content: ''; flex: none; width: .5rem; height: .5rem; margin-top: .6em; border-radius: 50%;
    background: var(--accent);
}

/* Offer cards (image-led) */
.offers { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 900px) {
    .offers { grid-template-columns: 1.15fr 1fr 1fr; align-items: start; }
    .offers > :nth-child(2) { margin-top: 5rem; }
    .offers > :nth-child(3) { margin-top: 2.5rem; }
}
.offer { display: block; }
.offer .frame img { transition: transform 900ms var(--ease-out); }
.offer-num { display: block; margin-top: 1.5rem; font-family: var(--f-head); font-style: italic; color: var(--bg-dark); font-size: 1.125rem; }
.offer h3 { margin-top: .35rem; }
.offer p { margin-top: .75rem; color: var(--muted); }
.offer .text-link { margin-top: 1rem; }
@media (hover: hover) and (pointer: fine) { .offer:hover .frame img { transform: scale(1.05); } }

/* Two-up image grid */
.duo { display: grid; gap: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 800px) { .duo { grid-template-columns: 1fr 1fr; } .duo > :nth-child(even) { margin-top: 4rem; } }
.duo h3 { margin-top: 1.25rem; }
.duo p { margin-top: .6rem; color: var(--muted); max-width: 46ch; }
@media (hover: hover) and (pointer: fine) { .duo .frame img { transition: transform 900ms var(--ease-out); } .duo .frame:hover img { transform: scale(1.05); } }

/* Two ticked lists side by side */
.lists { display: grid; gap: 3rem; }
@media (min-width: 800px) { .lists { grid-template-columns: 1fr 1fr; } }
.lists h3 { font-size: 1.5rem; }

/* Numbered cards (text only) */
.cards { display: grid; gap: 0; border-top: 1px solid var(--border); }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
    position: relative; padding: 2.25rem clamp(1.25rem, 2.5vw, 2.25rem) 2.5rem 0;
    border-bottom: 1px solid var(--border);
}
.card-num { font-family: var(--f-head); font-size: 3rem; line-height: 1; color: var(--bg-dark); }
.card h3 { margin-top: 1.25rem; }
.card p { margin-top: .75rem; color: var(--muted); }
.card::after {
    content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent);
    transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .card:hover::after { transform: scaleX(1); } }

/* Steps */
.steps { display: grid; gap: 2.5rem; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { border-top: 1px solid var(--text); padding-top: 1.5rem; }
.step-num { font-family: var(--f-head); font-style: italic; font-size: 3.5rem; line-height: 1; color: var(--bg-dark); }
.step h3 { margin-top: 1rem; font-size: 1.375rem; }
.step p { margin-top: .6rem; color: var(--muted); font-size: 1rem; }

/* Tiles */
.tiles { display: grid; gap: clamp(.75rem, 1.5vw, 1.25rem); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } .tiles > :nth-child(even) { margin-top: 3rem; } }
.tiles .frame img { transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tiles .frame:hover img { transform: scale(1.05); } }

/* Bento */
.bento { display: grid; gap: clamp(.75rem, 1.5vw, 1.25rem); grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
@media (min-width: 900px) {
    .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 17vw, 250px); }
    .bento .b1 { grid-column: span 1; grid-row: span 2; }
    .bento .b2 { grid-column: span 2; grid-row: span 2; }
    .bento .b3 { grid-column: span 1; grid-row: span 1; }
    .bento .b4 { grid-column: span 1; grid-row: span 1; }
    .bento .b5 { grid-column: span 2; grid-row: span 1; }
    .bento .b6 { grid-column: span 2; grid-row: span 1; }
    .bento .b7 { grid-column: 1 / -1; grid-row: span 2; }
}
.bento .frame { height: 100%; }
.bento .frame img { transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bento .frame:hover img { transform: scale(1.05); } }

/* Masonry */
.masonry { columns: 3 280px; column-gap: clamp(.75rem, 1.5vw, 1.25rem); }
.masonry .frame { break-inside: avoid; margin-bottom: clamp(.75rem, 1.5vw, 1.25rem); }
.masonry .frame img { height: auto; transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .masonry .frame:hover img { transform: scale(1.04); } }

/* Full-bleed band */
.band { position: relative; height: clamp(360px, 70vh, 760px); overflow: hidden; background: var(--bg-soft); }
.band img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.band-label {
    position: absolute; right: var(--gutter); bottom: var(--gutter); max-width: min(22rem, calc(100% - 2 * var(--gutter)));
    font-family: var(--f-head); font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.1;
    color: var(--text);
}

/* Horizontal set strip */
.strip-wrap { position: relative; }
.strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 560px);
    gap: clamp(1rem, 2vw, 1.75rem);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding-inline: max(var(--gutter), calc((100vw - 1320px) / 2 + var(--gutter)));
    scroll-padding-inline: max(var(--gutter), calc((100vw - 1320px) / 2 + var(--gutter)));
    scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip > * { scroll-snap-align: start; }
.set-tag { display: block; margin-top: 1.25rem; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.strip h3 { margin-top: .35rem; }
.strip p { margin-top: .6rem; color: var(--muted); max-width: 44ch; }
.strip-ctrl { display: flex; gap: .5rem; }
.strip-ctrl button {
    width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--bg-dark); color: var(--text-inv); font-size: 1.1rem;
    transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.strip-ctrl button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .strip-ctrl button:not(:disabled):hover { transform: scale(1.06); } }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
    min-height: 44px; padding: 1.35rem 0; cursor: pointer; list-style: none;
    font-family: var(--f-head); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    font: 400 1.35rem/1 var(--f-body); box-shadow: inset 0 0 0 1px var(--border);
    transition: transform var(--t-ui) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 3.5rem 1.6rem 0; color: var(--muted); }
.faq-foot { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }

/* Closing band: the page's one dark highlight */
.cta-dark { background: var(--bg-dark); color: var(--text-inv); padding-block: var(--section); overflow: hidden; }
.cta-dark .eyebrow { color: var(--accent-lt); }
.cta-dark h2 { font-size: clamp(2.5rem, 5.6vw, 5rem); max-width: 16ch; }
.cta-dark h2 em { color: var(--accent-lt); }
.cta-dark p { margin-top: 1.25rem; color: rgba(250,249,246,.78); max-width: 46ch; }
.cta-dark > .wrap:not(.cta-grid) { text-align: center; }
.cta-dark > .wrap:not(.cta-grid) h2, .cta-dark > .wrap:not(.cta-grid) p { margin-inline: auto; }
.cta-dark > .wrap:not(.cta-grid) .btn-row { justify-content: center; }
.cta-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.cta-dark .frame { background: #34312d; }

/* Booking */
.book { display: grid; min-height: 100vh; }
@media (min-width: 960px) { .book { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.book-side {
    position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
    padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
    min-height: 70vh;
}
.book-side .hero-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(var(--wash), .96) 0%, rgba(var(--wash), .88) 45%, rgba(var(--wash), .2) 100%);
}
.book-side h1 { font-size: clamp(2.75rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -.025em; margin-top: 1.25rem; }
.book-side .lede { margin-top: 1.25rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.facts dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: .3rem; }
.facts a { text-decoration: underline; text-underline-offset: 4px; }
.book-form { padding: calc(var(--header-h) + 3rem) var(--gutter) 4rem; background: var(--bg); }
.book-form h2 { font-size: clamp(2rem, 3vw, 2.6rem); }
.form { display: grid; gap: 1.25rem; margin-top: 2rem; max-width: 36rem; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .5rem; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 50px; padding: .8rem 1rem;
    font: 400 1rem/1.4 var(--f-body); color: var(--text);
    background: var(--bg); border: 1px solid #cfcac2; border-radius: 0;
    transition: border-color var(--t-ui) var(--ease-out), box-shadow var(--t-ui) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.form .btn { width: 100%; min-height: 56px; }
.form-note { font-size: .875rem; color: var(--muted); text-align: center; }

/* Footer */
.site-footer { background: var(--bg-soft); padding-top: clamp(4rem, 8vw, 6.5rem); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-grid p { color: var(--muted); max-width: 32ch; margin-top: 1rem; }
.footer-head { font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.footer-grid li a { display: inline-block; padding-block: .35rem; }
@media (hover: hover) and (pointer: fine) { .footer-grid li a:hover { color: var(--accent); } }
.footer-mark {
    margin-top: clamp(3rem, 6vw, 5rem);
    font-family: var(--f-head); font-size: clamp(3.25rem, 14.2vw, 14rem); line-height: .9; letter-spacing: -.045em;
    padding-bottom: .16em; white-space: nowrap; color: var(--bg-dark);
}
.footer-mark em { color: var(--accent); }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
    padding-block: 1.75rem; margin-top: 1.5rem; border-top: 1px solid var(--border);
    font-size: .875rem; color: var(--muted);
}

/* Chat widget (ported from chiangmaiambassador.com, CHAT WIDGET block) */
#sbc-zone { position: fixed; bottom: 0; left: 0; width: 40vw; height: 30vh; z-index: 9998; pointer-events: all; }
#sbc-widget { position: fixed; bottom: 20px; left: 20px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
#sbc-widget.active { pointer-events: all; }
#sbc-channels { display: flex; flex-direction: column; gap: 7px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
#sbc-channels.show { opacity: 1; transform: translateY(0); pointer-events: all; }
.sbc-ch { display: flex; align-items: center; gap: 10px; min-height: 44px; background: var(--bg); border-radius: 50px; padding: 7px 15px 7px 7px; box-shadow: 0 2px 14px rgba(26,24,21,.14); transition: transform .14s ease; white-space: nowrap; }
.sbc-ch svg { width: 28px; height: 28px; flex-shrink: 0; }
.sbc-ch span { font-size: 13px; font-weight: 500; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .sbc-ch:hover { transform: translateX(4px); } #sbc-btn:hover { transform: scale(1.08); } }
#sbc-foot { display: flex; align-items: center; }
#sbc-btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--bg-dark); box-shadow: 0 0 0 2px var(--bg), 0 3px 16px rgba(26,24,21,.22); cursor: pointer; display: grid; place-items: center; transition: transform .14s ease; }
#sbc-btn svg { width: 26px; height: 26px; }
#sbc-label { background: var(--bg-dark); color: var(--text-inv); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; padding: 5px 13px; border-radius: 50px; margin-left: 9px; white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
#sbc-widget.active #sbc-label { opacity: 1; transform: translateX(0); }
@media (max-width: 768px) { #sbc-zone { display: none; } #sbc-label { display: none; } #sbc-widget { pointer-events: auto; } }
.menu-open #sbc-widget { visibility: hidden; }

/* Motion.
   Load: CSS keyframes, so nothing waits on a script.
   Scroll: view timelines where supported; elsewhere everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
    .hero-media img { animation: hero-push 2.6s var(--ease-out) both; }
    .page-hero .hero-media img { animation-duration: 2s; }
    .hero-title .eyebrow { animation: fade-up .9s .15s var(--ease-out) both; }
    .h1-line > span { animation: line-rise 1.1s var(--ease-out) both; }
    .h1-line:nth-child(1) > span { animation-delay: .25s; }
    .h1-line:nth-child(2) > span { animation-delay: .38s; }
    .h1-line:nth-child(3) > span { animation-delay: .51s; }
    .hero-title .lede, .hero-aside { animation: fade-up .9s .7s var(--ease-out) both; }
    .trust li { animation: fade-up .8s var(--ease-out) both; animation-delay: calc(1s + var(--i, 0) * 80ms); }

    @supports (animation-timeline: view()) {
        .reveal {
            animation: fade-up linear both;
            animation-timeline: view();
            animation-range: entry 5% entry 55%;
        }
        .frame.zoom img {
            animation: settle linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 55%;
        }
        .band img {
            animation: drift linear both;
            animation-timeline: view();
            animation-range: cover 0% cover 100%;
        }
        .footer-mark {
            animation: mark-in linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 40%;
        }
    }
}
@keyframes hero-push { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes line-rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes drift { from { transform: translateY(-6%); } to { transform: translateY(6%); } }
@keyframes mark-in { from { transform: translateX(-6%); opacity: .2; } to { transform: none; opacity: 1; } }
