/* Studio by Char V5. Colours live in :root only.
   Text rules (contrast checked): on blue = paper. On pink, lilac, orange = ink. Never pink text on blue. */

@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: optional;
    src: url("/fonts/BodoniModa-normal-latin.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400 900; font-display: swap;
    src: url("/fonts/BodoniModa-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url("/fonts/Anuphan-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anuphan"; font-style: normal; font-weight: 300 700; font-display: swap;
    src: url("/fonts/Anuphan-normal-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }

:root {
    --blue: #2312DD;
    --paper: #F1F1F1;
    --ink: #0E0E14;
    --pink: #E550CE;
    --lilac: #8A70F9;
    --orange: #ED7C3F;
    --ink-soft: #B4B4C0;          /* secondary text on ink, 9:1 */

    --font-display: "Bodoni Moda", "Didot", Georgia, serif;
    --font-body: "Anuphan", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 24px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --header-h: 72px;
    --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--paper); }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
a { color: inherit; }
.sprite { position: absolute; }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.skip { position: absolute; left: .5rem; top: -4rem; z-index: 200; background: var(--paper); color: var(--ink); padding: .75rem 1rem; border-radius: 999px; }
.skip:focus { top: .5rem; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* Type */
.display, h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: .95; letter-spacing: -.012em; }
.display { font-size: clamp(2.6rem, 8.5vw, 6.5rem); }
.display em, h1 em { font-style: italic; font-weight: 700; }
.display, h1, h3, .logo-word, .nav a:not(.btn), .marquee span, .trust strong, .door-num, .footer-mark { font-optical-sizing: none; font-variation-settings: "opsz" 26; }
.outline { color: transparent; -webkit-text-stroke: 2px var(--paper); }
h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -.01em; font-size: clamp(2rem, 4vw, 2.75rem); }

/* Buttons: pill, verbs first */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.6rem; border-radius: 999px;
    border: 2px solid transparent; font: 600 1rem/1.1 var(--font-body); text-decoration: none; text-align: center; cursor: pointer;
    transition: transform .2s var(--ease); }
.btn-pink { background: var(--pink); color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-ghost { color: inherit; border-color: currentColor; background: transparent; }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-3px) rotate(-1deg) scale(1.04); } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { .btn:hover { animation: jiggle .6s var(--ease) both; } }
@keyframes jiggle {
    0% { transform: none; }
    18% { transform: translateY(-5px) rotate(-5deg) scale(1.07); }
    36% { transform: translateY(-4px) rotate(4deg) scale(1.06); }
    54% { transform: translateY(-4px) rotate(-3deg) scale(1.05); }
    72% { transform: translateY(-3px) rotate(2deg) scale(1.04); }
    100% { transform: translateY(-3px) rotate(-1deg) scale(1.04); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.text-link { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Header: shrinks on scroll using transforms only */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--header-h); color: var(--paper); }
.site-header::before { content: ""; position: absolute; inset: 0; background: var(--blue); transform-origin: top; transform: scaleY(1); transition: transform .25s var(--ease), opacity .25s var(--ease); opacity: 0; }
.site-header[data-scrolled="true"]::before { opacity: 1; transform: scaleY(.84); }
.header-inner { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; transition: transform .25s var(--ease); transform-origin: center; }
.site-header[data-scrolled="true"] .header-inner { transform: scale(.94); }
.logo { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--paper); }
.logo-mark { width: 40px; height: 40px; background: currentColor; flex: none;
    -webkit-mask: url("/images/studiobychar-studio-by-char-logo.svg") center / contain no-repeat; mask: url("/images/studiobychar-studio-by-char-logo.svg") center / contain no-repeat; }
.logo-word { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap; }
.logo-word em { font-weight: 700; }
.menu-btn { position: relative; z-index: 3; width: 48px; height: 48px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 12px; width: 24px; height: 3px; border-radius: 3px; background: currentColor; }
.menu-btn span { top: 22px; } .menu-btn span::before { left: 0; top: -8px; } .menu-btn span::after { left: 0; top: 8px; }
.nav { position: fixed; inset: 0; z-index: 2; background: var(--blue); display: flex; flex-direction: column; justify-content: center; gap: .4rem; padding: 5rem var(--gutter) 3rem;
    transform: translateX(100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
.menu-open .nav { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.menu-open { overflow: hidden; }
.nav a:not(.btn) { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 2.4rem; line-height: 1.15; text-decoration: none; color: var(--paper); }
.nav .btn { align-self: flex-start; margin-top: 1.25rem; }
@media (min-width: 1000px) {
    .menu-btn { display: none; }
    .nav { position: static; flex-direction: row; align-items: center; gap: 1.6rem; padding: 0; background: none; transform: none; visibility: visible; }
    .nav a:not(.btn) { font-family: var(--font-body); font-weight: 600; text-transform: none; font-size: 1rem; line-height: 1; padding-block: .5rem; }
    .nav .btn { margin: 0; }
    @media (hover: hover) { .nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; } }
}

/* Flash on load */
.flash { position: fixed; inset: 0; z-index: 150; background: var(--paper); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .flash { animation: flash .9s var(--ease) both; } }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; background: var(--ink); color: var(--paper); }
.hero-media, .hero-media picture, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media img { object-position: 30% 30%; }
@media (min-width: 900px) {
    .hero-media picture { inset: -20% 0 auto 0; height: 125%; }
    .hero-media img { object-position: 50% 50%; }
}
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,18,221,.7) 0%, rgba(35,18,221,.35) 38%, rgba(14,14,20,.88) 100%); }
.hero-sparkle { position: absolute; z-index: 1; right: 6%; top: 16%; width: clamp(64px, 12vw, 150px); height: auto; aspect-ratio: 1; fill: var(--pink); }
.hero-copy { position: relative; z-index: 2; padding-top: calc(var(--header-h) + 3rem); padding-bottom: 6.5rem; }
@media (min-width: 900px) { .hero-copy { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); } .hero-sparkle { top: auto; bottom: 14%; right: 5%; } }
.pill { display: inline-block; background: var(--lilac); color: var(--ink); font-weight: 600; font-size: .9rem; line-height: 1.2; padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.5rem, 9.2vw, 7.6rem); }
.h-line { display: block; }
.hero h1 .outline { -webkit-text-stroke-width: 2.5px; }
.lede { max-width: 40ch; font-size: clamp(1.1rem, 2.2vw, 1.35rem); line-height: 1.45; margin: 1.5rem 0 1.75rem; }

/* Trust bar */
.trust { background: var(--ink); color: var(--paper); }
.trust ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.25rem; }
.trust li { font-size: .95rem; }
.trust strong { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; margin-right: .25rem; vertical-align: -.1em; }
.trust-press a { display: inline-flex; align-items: center; gap: .5rem; background: var(--orange); color: var(--ink); font-weight: 700; text-decoration: none; padding: .55rem 1.1rem; border-radius: 999px; transform: rotate(-2.5deg); }
.trust-press svg { width: 1.1rem; height: 1.1rem; fill: var(--ink); }

/* Marquee */
.marquee { background: var(--lilac); color: var(--ink); overflow: hidden; padding-block: 1rem; }
.marquee-track { display: flex; align-items: center; width: max-content; }
.marquee-track > * { flex: none; margin-right: 1.75rem; }
.marquee span { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1; white-space: nowrap; }
.marquee svg { width: 1.5rem; height: 1.5rem; fill: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
    .marquee-track { animation: marquee 38s linear infinite; }
    @media (hover: hover) { .marquee:hover .marquee-track { animation-play-state: paused; } }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; } }

/* Spinning sparkle */
@media (prefers-reduced-motion: no-preference) { .spin { animation: spin 16s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Doors */
.doors { position: relative; overflow: hidden; background: var(--blue); color: var(--paper); padding-block: clamp(4rem, 9vw, 8rem); }
.doors .display { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.doodle { position: absolute; fill: none; stroke: var(--paper); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.doodle-mic { right: 4%; top: clamp(2rem, 5vw, 4rem); width: clamp(48px, 7vw, 90px); transform: rotate(12deg); }
.doodle-cam { right: clamp(6rem, 14vw, 13rem); top: clamp(3.5rem, 7vw, 6rem); width: clamp(64px, 9vw, 120px); transform: rotate(-8deg); }
@media (max-width: 699px) { .doodle-cam { display: none; } }
.door-grid { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .door-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.folder { position: relative; padding-top: 3.25rem; height: 100%; display: flex; flex-direction: column; }
.folder::before { content: ""; position: absolute; inset: 3.25rem 0 0 0; background: var(--lilac); border-radius: var(--radius); }
.folder-tab { position: absolute; top: 0; left: 0; z-index: 0; height: calc(3.25rem + 2px); padding: 0 1.25rem 4px; border: 0; border-radius: 16px 16px 0 0; background: var(--lilac); color: var(--ink); font: 600 .9rem/1 var(--font-body); cursor: pointer; }
.folder-photo { position: relative; z-index: 1; width: 72%; height: 15rem; margin: 1.25rem auto 0; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--ink); transition: transform .45s var(--ease); }
.folder-photo picture, .folder-photo img { width: 100%; height: 100%; object-fit: cover; }
.folder-front { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; margin-top: -8rem; padding: 1.75rem; background: var(--paper); color: var(--ink); border-radius: var(--radius); transition: transform .45s var(--ease); }
.folder-front p { max-width: 34ch; }
.folder-front .btn { margin-top: auto; }
.door-num { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--blue); }
[data-folder].is-open .folder-photo { transform: translateY(-1.5rem) rotate(-3deg); }
[data-folder].is-open .folder-front { transform: translateY(.6rem); }
@media (hover: hover) and (pointer: fine) {
    [data-folder]:hover .folder-photo, [data-folder]:focus-within .folder-photo { transform: translateY(-1.5rem) rotate(-3deg); }
    [data-folder]:hover .folder-front, [data-folder]:focus-within .folder-front { transform: translateY(.6rem); }
}

.checker { height: 40px; background: conic-gradient(var(--ink) 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0) 0 0 / 40px 40px; }

/* Spaces */
.spaces { background: var(--paper); color: var(--ink); padding-block: clamp(4rem, 9vw, 8rem); }
.spaces .display { color: var(--blue); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.space-grid { display: grid; gap: 3.5rem; }
.space { display: flex; flex-direction: column; gap: 1.5rem; }
.arch { aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--lilac); }
.arch picture, .arch img { width: 100%; height: 100%; object-fit: cover; }
.space-copy { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.space-copy h3 { color: var(--blue); font-size: clamp(2.4rem, 5vw, 3.6rem); }
.space-tag { display: inline-block; background: var(--lilac); color: var(--ink); font-weight: 600; font-size: .85rem; padding: .3rem .85rem; border-radius: 999px; }
.space-copy p:not(.space-tag) { max-width: 44ch; }
@media (min-width: 900px) {
    .space-grid { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: stretch; }
    .arch { flex: 1; aspect-ratio: auto; min-height: 30rem; }
    .space-set { padding-top: 5rem; }
}
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal-arch { animation: arch-up linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
        .reveal-arch img { animation: arch-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
    }
}
@keyframes arch-up { from { clip-path: inset(32% 0 0 0 round 999px 999px 0 0); } to { clip-path: inset(0 0 0 0 round 999px 999px 0 0); } }
@keyframes arch-zoom { from { transform: scale(1.18); } to { transform: scale(1); } }

/* Made here */
.made { background: var(--lilac); color: var(--ink); padding-block: clamp(4rem, 9vw, 7rem); }
.made-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.made-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.made-grid figure { overflow: hidden; border-radius: var(--radius); min-height: 14rem; }
.made-grid picture, .made-grid img { width: 100%; height: 100%; object-fit: cover; }
.made-grid .m1 { grid-column: 1 / -1; min-height: 16rem; }
.made-grid .m2 { border-radius: 50% 50% var(--radius) var(--radius) / 16% 16% var(--radius) var(--radius); }
@media (min-width: 900px) {
    .made-grid { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 17rem); gap: 1rem; }
    .made-grid .m1 { grid-column: 1 / 4; grid-row: 1 / 3; }
    .made-grid .m2 { grid-column: 4 / 5; grid-row: 1 / 3; }
    .made-grid .m3 { grid-column: 5 / 7; grid-row: 1; }
    .made-grid .m4 { grid-column: 5 / 7; grid-row: 2; }
}

/* Find us */
.find { background: var(--blue); color: var(--paper); padding-block: clamp(4rem, 9vw, 7rem); }
.find-grid { display: grid; gap: 2.5rem; }
.find-copy { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.find-copy address { font-size: 1.25rem; font-weight: 600; }
.map { aspect-ratio: 4 / 3; border: 4px solid var(--paper); background: var(--ink); }
.map iframe { width: 100%; height: 100%; border: 0; }
@media (min-width: 900px) { .find-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } .map { aspect-ratio: auto; min-height: 26rem; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: 4.75rem; overflow: hidden; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; }
.footer-about p { margin-top: 1rem; max-width: 34ch; color: var(--ink-soft); }
.footer-head { color: var(--lilac); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .75rem; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-footer .hours { margin-top: .75rem; color: var(--ink-soft); font-size: .95rem; }
.footer-mark { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; white-space: nowrap; font-size: 10.6vw; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--ink-soft); margin: 2.5rem 0 1rem; opacity: .6; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: 1.25rem 2rem; font-size: .85rem; color: var(--ink-soft); border-top: 1px solid rgba(180, 180, 192, .25); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr 1fr; } .footer-about { grid-column: auto; } }

/* Sticky mobile bar */
.sticky-bar { position: fixed; inset: auto 0 0 0; z-index: 80; display: flex; gap: .5rem; padding: .6rem var(--gutter); padding-bottom: calc(.6rem + env(safe-area-inset-bottom)); background: var(--ink); }
.sticky-bar .btn { min-height: 48px; padding-inline: 1rem; }
.sticky-bar .btn-pink { flex: 1.6; }
.sticky-bar .btn-paper { flex: 1; }
@media (min-width: 900px) { .sticky-bar { display: none; } .site-footer { padding-bottom: 0; } }

/* Logo cursor (mouse devices only; JS adds html.has-cursor). Ink on light, Paper on dark, set from the background under the pointer. */
@media (hover: hover) and (pointer: fine) {
    html.has-cursor, html.has-cursor * { cursor: none !important; }
    html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto !important; }
}
.cursor { position: fixed; left: 0; top: 0; z-index: 300; width: 45px; height: 45px; margin: -22.5px 0 0 -22.5px; pointer-events: none; opacity: 0;
    filter: drop-shadow(0 0 .5px var(--cur)) drop-shadow(0 0 .5px var(--cur)) drop-shadow(0 0 1.5px var(--halo)) drop-shadow(0 0 1.5px var(--halo)); transition: opacity .15s linear; }
.cursor.is-on { opacity: 1; }
.cursor span { display: block; width: 100%; height: 100%; background: var(--cur); transition: transform .15s var(--ease);
    -webkit-mask: url("/images/studiobychar-studio-by-char-logo.svg") center / contain no-repeat; mask: url("/images/studiobychar-studio-by-char-logo.svg") center / contain no-repeat; }
.cursor.is-link span { transform: scale(1.3); }
.cursor.is-light { --cur: var(--paper); --halo: rgba(14, 14, 20, .75); }
.cursor.is-dark { --cur: var(--ink); --halo: rgba(241, 241, 241, .85); }
.cursor.is-mid { --cur: var(--paper); --halo: rgba(14, 14, 20, .95); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
