/*
Theme Name: Phanhin Law & Accounting
Theme URI: https://phanhin.com
Author: P.H. Law and Accounting
Author URI: https://phanhin.com
Description: Bright, dynamic, luxurious editorial theme for P.H. Law and Accounting (Phanhin). Confident, exciting and energetic.
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: phanhin
Tags: law, accounting, editorial, bright, luxurious
*/

/* ==============================
   CSS VARIABLES — BRIGHT & LUXE
============================== */
:root {
  --gold:        #C9A227;
  --gold-soft:   #E2C56A;
  --gold-light:  #F4E6B8;
  --gold-deep:   #A8821A;
  --champagne:   #FBF6E9;
  --ivory:       #FFFDF7;
  --cream:       #FAF4E6;
  --charcoal:    #3A3A3D;
  --ink:         #1F1F22;
  --white:       #FFFFFF;
  --text:        #2A2A2D;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 1440px;
  --gutter: clamp(24px, 5vw, 80px);
  --sidebar-w: 72px;

  --shadow-soft: 0 20px 60px rgba(201, 162, 39, 0.12);
  --shadow-lift: 0 30px 80px rgba(31, 31, 34, 0.12);
}

/* ==============================
   RESET & BASE
============================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--ivory);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle grain texture overlay for luxe feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9995;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { background: none; border: none; cursor: pointer; font: inherit; }

/* ==============================
   TYPOGRAPHY
============================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.display-xl {
  font-size: clamp(64px, 10vw, 168px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.display-lg {
  font-size: clamp(48px, 7.5vw, 120px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.display-md {
  font-size: clamp(36px, 5vw, 76px);
  font-weight: 600;
  line-height: 1.04;
}

.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Gold gradient text — luxurious shimmer */
.gold-text {
  background: linear-gradient(120deg, var(--gold-deep) 0%, var(--gold) 35%, var(--gold-soft) 55%, var(--gold) 75%, var(--gold-deep) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.italic { font-style: italic; }

/* ==============================
   LAYOUT UTILITIES
============================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-pad { padding: clamp(80px, 12vw, 180px) 0; }

.gold { color: var(--gold); }
.charcoal { color: var(--charcoal); }

.bg-ivory { background: var(--ivory); }
.bg-cream { background: var(--cream); }
.bg-champagne { background: var(--champagne); }
.bg-gold { background: var(--gold); color: var(--ink); }
.bg-ink { background: var(--ink); color: var(--ivory); }

/* Content shifts right to clear the sidebar on desktop */
.has-sidebar #page-wrap { padding-left: var(--sidebar-w); }

/* ==============================
   ANIMATED GRADIENT BLOBS (movement)
============================== */
.blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}

.blob-1 {
  width: 45vw; height: 45vw;
  background: radial-gradient(circle, var(--gold-light), transparent 70%);
  top: -10%; left: -5%;
  animation: float1 18s ease-in-out infinite;
}

.blob-2 {
  width: 38vw; height: 38vw;
  background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  bottom: -15%; right: -8%;
  animation: float2 22s ease-in-out infinite;
}

.blob-3 {
  width: 30vw; height: 30vw;
  background: radial-gradient(circle, rgba(244,230,184,0.8), transparent 70%);
  top: 40%; left: 50%;
  animation: float3 26s ease-in-out infinite;
}

@keyframes float1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes float2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-7vw, -5vh) scale(1.2); }
}
@keyframes float3 {
  0%,100% { transform: translate(-50%,0) scale(1); }
  50% { transform: translate(-40%, -8vh) scale(0.9); }
}

/* ==============================
   CUSTOM CURSOR
============================== */
.cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out), width 0.3s, height 0.3s;
}
.cursor-ring {
  position: fixed; width: 38px; height: 38px;
  border: 1.5px solid var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease-out), width 0.3s, height 0.3s, opacity 0.3s;
  opacity: 0.5;
}
.cursor.hovering { width: 5px; height: 5px; }
.cursor-ring.hovering { width: 58px; height: 58px; opacity: 1; background: rgba(201,162,39,0.08); }
@media (max-width: 768px) { .cursor, .cursor-ring { display: none; } }

/* ==============================
   SIDEBAR RAIL (fixed left)
============================== */
#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--ink);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-right: 1px solid rgba(201,162,39,0.2);
}

.sidebar-logo {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ivory);
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.4s var(--ease-back);
}
.sidebar-logo:hover { transform: scale(1.08) rotate(-6deg); }
.sidebar-logo img { width: 80%; height: 80%; object-fit: contain; }

/* Vertical brand text */
.sidebar-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.sidebar-vertical .gold { color: var(--gold-soft); }

/* Sidebar socials */
.sidebar-socials { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.sidebar-socials a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  transition: all 0.3s var(--ease-out);
}
.sidebar-socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-3px);
}

/* Scroll progress on sidebar */
.sidebar-progress {
  position: absolute;
  right: -1px; top: 0;
  width: 2px; height: 0%;
  background: linear-gradient(var(--gold-soft), var(--gold));
  transition: height 0.1s linear;
}

@media (max-width: 900px) {
  #sidebar { display: none; }
  .has-sidebar #page-wrap { padding-left: 0; }
}

/* ==============================
   SITE HEADER / NAV
============================== */
#site-header {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  z-index: 999;
  padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}

#site-header.scrolled {
  background: rgba(255,253,247,0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  padding: 14px var(--gutter);
  box-shadow: 0 4px 30px rgba(201,162,39,0.08);
}

.site-logo { display: flex; align-items: center; gap: 12px; color: inherit; }
.site-logo img { height: 46px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text .name { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.logo-text .tagline { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  position: relative; color: var(--ink); transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gold);
  transition: width 0.35s var(--ease-out);
}
.nav-links a:hover { color: var(--gold-deep); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  position: relative; overflow: hidden;
  background: var(--gold); color: var(--ink) !important;
  padding: 12px 26px; border-radius: 100px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform 0.3s var(--ease-back), box-shadow 0.3s;
  box-shadow: 0 8px 24px rgba(201,162,39,0.3);
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px rgba(201,162,39,0.45); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; width: 28px; z-index: 1001; }
.hamburger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; transform-origin: center; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--ink); color: var(--ivory);
  z-index: 998; display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease-out);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 18px; margin-bottom: 48px; }
.mobile-nav-links a {
  font-family: var(--font-display); font-size: clamp(36px, 9vw, 64px);
  font-weight: 600; color: var(--ivory); line-height: 1; transition: color 0.3s, padding-left 0.3s;
}
.mobile-nav-links a:hover { color: var(--gold-soft); padding-left: 12px; }
.mobile-menu-footer { font-size: 14px; color: rgba(255,255,255,0.5); }
.mobile-menu-footer .gold { color: var(--gold-soft); }

/* ==============================
   HERO — BRIGHT & DYNAMIC
============================== */
.hero {
  min-height: 100svh;
  background: linear-gradient(160deg, var(--ivory) 0%, var(--champagne) 55%, var(--cream) 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(120px,16vw,180px) var(--gutter) clamp(60px,8vw,100px);
  position: relative; overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 28px; z-index: 2;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  padding: 10px 20px; border-radius: 100px;
  border: 1px solid rgba(201,162,39,0.25);
  width: fit-content;
  box-shadow: 0 4px 20px rgba(201,162,39,0.08);
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px; background: var(--gold); border-radius: 50%;
  position: relative;
}
.hero-eyebrow .pulse::after {
  content:''; position:absolute; inset:-4px; border-radius:50%;
  border:1px solid var(--gold); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0%{transform:scale(1);opacity:1;} 100%{transform:scale(2.5);opacity:0;} }
.hero-eyebrow span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(54px, 9vw, 150px);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.03em;
  z-index: 2; position: relative; color: var(--ink); max-width: 14ch;
}
.hero-title .gold-text { font-style: italic; }

.hero-bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 44px; z-index: 2; gap: 40px; flex-wrap: wrap;
}
.hero-desc { max-width: 420px; font-size: clamp(15px,1.25vw,18px); line-height: 1.7; color: var(--charcoal); }

.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Floating logo mark in hero */
.hero-logo-float {
  position: absolute;
  top: 50%; right: clamp(20px, 8vw, 140px);
  transform: translateY(-50%);
  width: clamp(180px, 24vw, 380px);
  z-index: 1; opacity: 0.95;
  animation: floatLogo 6s ease-in-out infinite;
  filter: drop-shadow(0 30px 50px rgba(201,162,39,0.2));
}
@keyframes floatLogo {
  0%,100% { transform: translateY(-50%) rotate(0deg); }
  50% { transform: translateY(-56%) rotate(2deg); }
}

/* Hero word reveal */
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: top; }
.hero-title .word-inner { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.hero-title .word-inner.revealed { transform: translateY(0); }

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep);
  z-index: 2;
}
.scroll-hint .mouse {
  width: 22px; height: 34px; border: 1.5px solid var(--gold); border-radius: 12px; position: relative;
}
.scroll-hint .mouse::after {
  content:''; position:absolute; top:6px; left:50%; transform:translateX(-50%);
  width:3px; height:7px; background:var(--gold); border-radius:2px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0%{opacity:0;transform:translate(-50%,0);} 40%{opacity:1;} 80%{opacity:0;transform:translate(-50%,10px);} }

/* ==============================
   MARQUEE TICKER
============================== */
.ticker {
  background: var(--champagne);
  border-top: 1px solid rgba(201,162,39,0.18);
  border-bottom: 1px solid rgba(201,162,39,0.18);
  padding: 10px 0; overflow: hidden; white-space: nowrap;
  position: relative; z-index: 2;
}
.ticker-inner { display: inline-flex; animation: ticker 22s linear infinite; }
.ticker:hover .ticker-inner { animation-play-state: paused; }
.ticker-inner span {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-deep);
  padding: 0 18px;
}
.ticker-inner .dot { color: rgba(201,162,39,0.4); padding: 0; letter-spacing: 0; font-size: 9px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-33.33%); } }

/* ==============================
   BUTTONS
============================== */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 34px; border-radius: 100px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.3s var(--ease-back), box-shadow 0.3s, background 0.3s, color 0.3s;
  will-change: transform;
}
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 10px 30px rgba(201,162,39,0.3); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(201,162,39,0.45); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--ivory); transform: translateY(-3px); }
.btn-arrow { font-size: 18px; transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translateX(5px); }

/* ==============================
   SECTION HEADER
============================== */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: clamp(48px,7vw,90px); gap: 40px; flex-wrap: wrap; }
.section-number { font-family: var(--font-mono); font-size: 12px; color: var(--gold-deep); letter-spacing: 0.1em; margin-bottom: 14px; font-weight: 500; }
.section-desc { max-width: 380px; font-size: 16px; line-height: 1.7; color: var(--charcoal); }

/* ==============================
   SERVICES
============================== */
.services-section { position: relative; overflow: hidden; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.service-card {
  background: var(--white);
  padding: 40px 32px; border-radius: 18px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(201,162,39,0.12);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s, border-color 0.3s;
  will-change: transform;
}
.service-card::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(145deg, var(--gold-light), var(--cream));
  opacity: 0; transition: opacity 0.5s; z-index: 0;
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-soft); border-color: var(--gold-soft); }
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }

.service-icon {
  width: 60px; height: 60px; border-radius: 14px;
  background: var(--ivory);
  border: 1px solid rgba(201,162,39,0.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: var(--gold-deep);
  transition: transform 0.4s var(--ease-back), background 0.4s, border-color 0.4s;
}
.service-icon svg {
  width: 28px; height: 28px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card:hover .service-icon { transform: rotate(-4deg) scale(1.05); background: var(--champagne); border-color: var(--gold); }

/* Inline icon — used in services highlight strip */
.inline-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.inline-icon svg {
  width: 20px; height: 20px;
  stroke: currentColor; stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Reason / why-us icon (services page) */
.reason-icon {
  width: 44px; height: 44px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-deep);
}
.reason-icon svg {
  width: 32px; height: 32px;
  stroke: currentColor; stroke-width: 1.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Contact icon (contact page contact-item rows) */
.contact-icon {
  width: 50px; height: 50px; border-radius: 12px;
  background: var(--ivory);
  border: 1px solid rgba(201,162,39,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gold-deep);
  transition: background 0.3s, border-color 0.3s;
}
.contact-icon svg {
  width: 22px; height: 22px;
  stroke: currentColor; stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ==============================
   LANGUAGE TOGGLE (in header nav)
============================== */
.lang-toggle {
  display: inline-flex;
  gap: 2px;
  background: rgba(255,253,247,0.6);
  padding: 3px;
  border-radius: 100px;
  border: 1px solid rgba(201,162,39,0.25);
}
.lang-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  min-width: 32px;
  border-radius: 100px;
  color: var(--charcoal);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  line-height: 1;
}
.lang-btn.active {
  background: var(--gold);
  color: var(--ink);
}
.lang-btn:not(.active):hover { color: var(--gold-deep); }

/* Mobile menu copy — bigger / darker theme */
.lang-toggle-mobile {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.lang-toggle-mobile .lang-btn { color: rgba(255,255,255,0.7); font-size: 12px; padding: 7px 14px; }
.lang-toggle-mobile .lang-btn.active { background: var(--gold); color: var(--ink); }

/* Chinese font swap */
body.lang-zh,
body.lang-zh h1, body.lang-zh h2, body.lang-zh h3, body.lang-zh h4, body.lang-zh h5, body.lang-zh h6,
body.lang-zh .display-xl, body.lang-zh .display-lg, body.lang-zh .display-md {
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', var(--font-display);
  letter-spacing: 0;
}
body.lang-zh, body.lang-zh p, body.lang-zh a, body.lang-zh span, body.lang-zh li, body.lang-zh button, body.lang-zh input, body.lang-zh textarea, body.lang-zh select, body.lang-zh label {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', var(--font-body);
}
body.lang-zh .display-xl, body.lang-zh .display-lg, body.lang-zh .display-md, body.lang-zh .hero-title {
  font-weight: 700;
  line-height: 1.15;
}
body.lang-zh .italic { font-style: normal; }

/* Thai font swap */
body.lang-th,
body.lang-th h1, body.lang-th h2, body.lang-th h3, body.lang-th h4, body.lang-th h5, body.lang-th h6,
body.lang-th .display-xl, body.lang-th .display-lg, body.lang-th .display-md {
  font-family: 'Bai Jamjuree', 'Sarabun', var(--font-display);
  letter-spacing: 0;
}
body.lang-th, body.lang-th p, body.lang-th a, body.lang-th span, body.lang-th li, body.lang-th button, body.lang-th input, body.lang-th textarea, body.lang-th select, body.lang-th label {
  font-family: 'Sarabun', 'IBM Plex Sans Thai', var(--font-body);
}
body.lang-th .display-xl, body.lang-th .display-lg, body.lang-th .display-md, body.lang-th .hero-title {
  font-weight: 700;
  line-height: 1.2;
}
body.lang-th .italic { font-style: normal; }

@media (max-width: 768px) {
  /* In-header desktop toggle hides; mobile-menu copy takes over */
  .main-nav .lang-toggle { display: none; }
}
.service-card h3 { font-size: clamp(22px,2vw,30px); font-weight: 600; margin-bottom: 14px; line-height: 1.1; }
.service-card p { font-size: 14px; line-height: 1.7; color: var(--charcoal); }
.service-num { position: absolute; top: 28px; right: 30px; font-family: var(--font-mono); font-size: 12px; color: var(--gold-deep); opacity: 0.4; z-index: 1; }

/* ==============================
   ABOUT / STORY
============================== */
.about-section { background: var(--cream); position: relative; overflow: hidden; }
.about-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px,6vw,100px); align-items: center; position: relative; z-index: 1; }
.about-text .display-lg { margin-bottom: 30px; }
.about-body { font-size: clamp(16px,1.2vw,18px); line-height: 1.75; color: var(--charcoal); margin-bottom: 40px; }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.stat-item { border-top: 2px solid var(--gold); padding-top: 18px; }
.stat-number { font-family: var(--font-display); font-size: clamp(40px,4.5vw,68px); font-weight: 700; color: var(--gold-deep); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--charcoal); font-weight: 500; }

.about-visual { position: relative; height: clamp(420px,55vw,640px); }
.about-img-main {
  position: absolute; inset: 0; border-radius: 20px; overflow: hidden;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-soft));
  box-shadow: var(--shadow-lift);
}
.about-img-main img { width: 100%; height: 100%; object-fit: cover; }
.about-img-overlay {
  position: absolute; bottom: -20px; left: -20px; width: 62%;
  background: var(--white); padding: 28px; border-radius: 16px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(201,162,39,0.15);
}
.about-img-overlay p { font-family: var(--font-display); font-size: clamp(18px,1.8vw,26px); font-weight: 600; color: var(--ink); line-height: 1.25; }
.about-years-badge {
  position: absolute; top: -24px; right: -24px;
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--ink); color: var(--ivory);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  box-shadow: var(--shadow-lift);
  animation: floatBadge 5s ease-in-out infinite;
}
@keyframes floatBadge { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-10px);} }
.about-years-badge .yr-num { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1; color: var(--gold-soft); }
.about-years-badge .yr-text { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); }

/* ==============================
   TEAM
============================== */
.team-section { position: relative; overflow: hidden; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.team-card {
  background: var(--white); border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(201,162,39,0.12);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
  will-change: transform;
}
.team-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.team-card-img { aspect-ratio: 3/4; overflow: hidden; position: relative; }
.team-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(150deg, var(--gold-light) 0%, var(--gold-soft) 100%);
  display: flex; align-items: center; justify-content: center;
}
.team-initials { font-family: var(--font-display); font-size: clamp(48px,5vw,76px); font-weight: 700; color: rgba(255,255,255,0.85); letter-spacing: -0.02em; }
.team-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.team-card:hover .team-card-img img { transform: scale(1.06); }
.team-card-body { padding: 24px; }
.team-card-body h3 { font-size: clamp(20px,1.8vw,26px); font-weight: 600; margin-bottom: 4px; }
.team-role { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin-bottom: 12px; }
.team-bio { font-size: 13px; line-height: 1.65; color: var(--charcoal); }

/* ==============================
   QUOTE / STATEMENT
============================== */
.quote-section {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  padding: clamp(80px,10vw,150px) var(--gutter); text-align: center; overflow: hidden; position: relative;
}
.quote-section::before {
  content:'\201C'; position:absolute; top:-20px; left:50%; transform:translateX(-50%);
  font-family: var(--font-display); font-size: clamp(200px,30vw,400px); color: rgba(255,255,255,0.18); line-height:1; pointer-events:none;
}
.quote-text { font-family: var(--font-display); font-size: clamp(28px,4.5vw,68px); font-weight: 600; line-height: 1.15; color: var(--ink); max-width: 1000px; margin: 0 auto 24px; letter-spacing: -0.02em; position: relative; }
.quote-attr { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(31,31,34,0.55); font-weight: 600; position: relative; }

/* ==============================
   CONTACT
============================== */
.contact-section { background: var(--cream); position: relative; overflow: hidden; }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px,6vw,90px); position: relative; z-index: 1; }
.contact-left .display-md { margin-bottom: 24px; }
.contact-tagline { font-size: clamp(16px,1.3vw,20px); line-height: 1.65; color: var(--charcoal); margin-bottom: 48px; }
.contact-details { display: flex; flex-direction: column; gap: 28px; }
.contact-item .c-label { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin-bottom: 6px; }
.contact-item a, .contact-item p { font-size: clamp(16px,1.5vw,22px); color: var(--ink); transition: color 0.3s; }
.contact-item a:hover { color: var(--gold-deep); }

/* Form */
.contact-card { background: var(--white); padding: clamp(32px,4vw,56px); border-radius: 24px; box-shadow: var(--shadow-soft); border: 1px solid rgba(201,162,39,0.12); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--charcoal); font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--champagne); border: 1.5px solid transparent;
  color: var(--ink); padding: 15px 18px; font-family: var(--font-body); font-size: 15px;
  border-radius: 12px; transition: border-color 0.3s, background 0.3s; width: 100%; appearance: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(58,58,61,0.4); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); background: var(--white); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  background: var(--gold); color: var(--ink); padding: 17px 40px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 100px; cursor: pointer; align-self: flex-start;
  box-shadow: 0 10px 30px rgba(201,162,39,0.3);
  transition: transform 0.3s var(--ease-back), box-shadow 0.3s;
}
.form-submit:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(201,162,39,0.45); }
.form-submit:disabled { opacity: 0.6; cursor: wait; }

/* ==============================
   FOOTER
============================== */
#site-footer { background: var(--ink); color: var(--ivory); padding: clamp(60px,8vw,100px) var(--gutter) 36px; position: relative; overflow: hidden; }
#site-footer .blob { opacity: 0.15; }
.footer-cta { text-align: center; padding-bottom: clamp(48px,7vw,80px); border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 48px; position: relative; z-index: 1; }
.footer-cta h2 { color: var(--ivory); margin-bottom: 28px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 32px; position: relative; z-index: 1; }
.footer-brand .site-logo { margin-bottom: 20px; }
.footer-brand .footer-desc { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 300px; }
.footer-col h4 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color 0.3s, padding-left 0.3s; }
.footer-col ul li a:hover { color: var(--gold-soft); padding-left: 5px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.3); flex-wrap: wrap; gap: 16px; position: relative; z-index: 1; }

/* ==============================
   INNER PAGE HERO
============================== */
.page-hero {
  background: linear-gradient(160deg, var(--ivory) 0%, var(--champagne) 60%, var(--cream) 100%);
  padding: clamp(140px,18vw,220px) var(--gutter) clamp(60px,8vw,110px);
  position: relative; overflow: hidden;
}
.page-hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px; position: relative; z-index: 2; }
.page-hero-eyebrow .line { width: 36px; height: 2px; background: var(--gold); }
.page-hero-eyebrow span { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.page-hero h1 { position: relative; z-index: 2; }

/* ==============================
   TIMELINE
============================== */
.timeline { margin-top: 60px; }
.timeline-item { display: grid; grid-template-columns: 110px 40px 1fr; gap: 0 24px; padding-bottom: 56px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--gold-deep); padding-top: 2px; text-align: right; }
.timeline-line { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 14px; height: 14px; background: var(--gold); border-radius: 50%; flex-shrink: 0; margin-top: 6px; box-shadow: 0 0 0 5px rgba(201,162,39,0.15); }
.timeline-connector { width: 2px; flex: 1; background: linear-gradient(var(--gold), rgba(201,162,39,0.15)); margin-top: 8px; }
.timeline-item:last-child .timeline-connector { display: none; }
.timeline-content h3 { font-size: clamp(22px,2.5vw,32px); font-weight: 600; margin-bottom: 12px; }
.timeline-content p { font-size: 15px; line-height: 1.7; color: var(--charcoal); }

/* ==============================
   SCROLL REVEAL
============================== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ==============================
   ENTRY CONTENT (editable pages)
============================== */
.entry-content { font-size: clamp(16px,1.2vw,18px); line-height: 1.8; color: var(--charcoal); }
.entry-content h2 { font-size: clamp(28px,3vw,44px); margin: 48px 0 20px; color: var(--ink); }
.entry-content h3 { font-size: clamp(22px,2.2vw,32px); margin: 36px 0 16px; color: var(--ink); }
.entry-content p { margin-bottom: 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 24px; }
.entry-content li { margin-bottom: 10px; }
.entry-content a { color: var(--gold-deep); text-decoration: underline; }
.entry-content img { border-radius: 14px; margin: 24px 0; }
.entry-content blockquote { border-left: 4px solid var(--gold); padding-left: 24px; margin: 28px 0; font-family: var(--font-display); font-size: 24px; font-style: italic; color: var(--ink); }

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #site-header { left: 0; }
  .section-header { align-items: flex-start; }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { height: 420px; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-logo-float { opacity: 0.25; right: 0; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 70px 30px 1fr; }
  .timeline-year { font-size: 18px; }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ==============================
   MOBILE RESPONSIVE OVERRIDES
   (override inline grid styles + tighten layout)
============================== */
@media (max-width: 900px) {
  /* Collapse every inline 2-col / 3-col / multi-col grid */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1.1fr"],
  [style*="grid-template-columns:1fr 1.3fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  /* Reset alternating-row order on services page so headings come first */
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr"] > [style*="order:1"],
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr"] > [style*="order:2"] {
    order: 0 !important;
  }
  /* Team featured (homepage and team page) — stack image above text */
  .team-featured,
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:320px 1fr"],
  [style*="grid-template-columns:300px 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .team-featured > div:first-child,
  [style*="grid-template-columns:1fr 1.4fr"] > div:first-child {
    min-height: 360px !important;
    aspect-ratio: 4/3;
  }
  /* Hide floating logo on tablet+ – it competes with text */
  .hero-logo-float { display: none; }
  /* Tighten page-hero padding */
  .page-hero { padding-top: clamp(110px, 22vw, 150px); padding-bottom: clamp(40px, 8vw, 70px); }
  /* Section padding shrinks */
  .section-pad { padding: clamp(56px, 10vw, 90px) 0; }
}

@media (max-width: 768px) {
  /* Process steps grid (services page) */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
  }
  /* About-stats and team-page stats — 1 col on small phones */
  .about-stats { gap: 18px; }
  /* Hero typography — cap better on narrow screens */
  .hero-title { font-size: clamp(38px, 11vw, 64px) !important; line-height: 1; max-width: 100%; }
  .hero { padding-top: clamp(100px, 22vw, 140px); padding-bottom: clamp(40px, 8vw, 70px); min-height: auto; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-desc { max-width: 100%; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .scroll-hint { display: none; }
  /* Display headings */
  .display-xl { font-size: clamp(40px, 12vw, 72px) !important; line-height: 1.05; }
  .display-lg { font-size: clamp(36px, 10vw, 60px) !important; }
  .display-md { font-size: clamp(28px, 8vw, 44px) !important; }
  /* Section header — stack title + desc */
  .section-header { flex-direction: column; gap: 18px; }
  .section-desc { max-width: 100%; }
  /* Quote section */
  .quote-section { padding: clamp(60px, 12vw, 100px) var(--gutter); }
  .quote-section::before { font-size: clamp(160px, 50vw, 280px); top: -8px; }
  .quote-text { font-size: clamp(24px, 6.5vw, 40px) !important; line-height: 1.25; }
  /* Footer bottom — stack */
  .footer-bottom { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 8px; }
  /* About visual height shrinks */
  .about-visual { height: 360px; }
  /* Ticker even more subtle */
  .ticker { padding: 8px 0; }
  .ticker-inner span { font-size: 10px; padding: 0 14px; }
  /* Team-page intro band — stack stats */
  [style*="display:flex"][style*="justify-content:space-between"][style*="align-items:center"] {
    align-items: flex-start !important;
  }
  /* Contact-item rows — keep horizontal but ensure no overflow */
  .contact-item a, .contact-item p { font-size: 17px !important; word-break: break-word; }
  /* Lang toggle in mobile menu — re-show */
  .main-nav .lang-toggle { display: none; }
  .lang-toggle-mobile { display: inline-flex !important; }
  /* Form padding shrinks */
  .contact-card { padding: 24px !important; }
  /* Logo text — shrink the name part */
  .site-logo img { height: 38px; }
  .logo-text .name { font-size: 15px; }
  .logo-text .tagline { font-size: 8.5px; }
}

@media (max-width: 600px) {
  /* Form submit button full width on small screens */
  .form-submit { width: 100%; text-align: center; align-self: stretch; }

  /* All multi-col grids → single column */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(4, 1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  /* About stats → 1 col so numbers don't crush */
  .about-stats { grid-template-columns: 1fr 1fr !important; gap: 16px; }
  /* Page hero eyebrow + body adjustments */
  .page-hero { padding-left: 20px; padding-right: 20px; }
  /* Container gutter shrinks */
  :root { --gutter: 20px; }
  /* Section number */
  .section-number { font-size: 11px; }
  /* Timeline gets even tighter */
  .timeline-item { grid-template-columns: 60px 26px 1fr !important; gap: 0 14px; padding-bottom: 36px; }
  .timeline-year { font-size: 15px !important; }
  .timeline-content h3 { font-size: 19px !important; }
  /* Quote */
  .quote-text { font-size: clamp(22px, 7vw, 32px) !important; }
  /* Form input padding */
  .form-group input, .form-group select, .form-group textarea { padding: 13px 15px; font-size: 14px; }
  /* Site header padding */
  #site-header { padding-left: 16px; padding-right: 16px; }
  #site-header.scrolled { padding-left: 16px; padding-right: 16px; }
  /* Footer cta heading */
  .footer-cta h2 { font-size: clamp(26px, 7vw, 38px) !important; }
  /* Hero eyebrow */
  .hero-eyebrow { padding: 8px 14px; }
  .hero-eyebrow span:last-child { font-size: 10px; }
  /* Mobile menu typography */
  .mobile-nav-links a { font-size: clamp(32px, 8vw, 48px); }
}

@media (max-width: 380px) {
  /* Ultra-narrow: hero buttons stack vertically */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 0 auto 20px; }

/* ==============================
   INTRO / PRELOADER (unseen-style flow)
============================== */
#intro {
  position: fixed; inset: 0; z-index: 10000;
  background: linear-gradient(160deg, var(--ivory) 0%, var(--champagne) 55%, var(--cream) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  will-change: transform;
  /* SAFETY: if JS never runs, auto-dismiss after 6s so the site is never blocked */
  animation: introSafetyHide 0s linear 6s forwards;
}
@keyframes introSafetyHide { to { transform: translateY(-100%); visibility: hidden; } }
/* When JS is present it adds .js-active to <html> and takes over the timing */
html.js-active #intro { animation: none; }

/* Lock scroll only while intro is active AND JS is running it */
body.intro-active { overflow: hidden; }

/* IMPORTANT: the page underneath is fully rendered and visible.
   The intro simply covers it, then slides away. We do NOT hide the
   site chrome with opacity, so a JS failure can never blank the site. */

/* floating blobs inside intro */
#intro .blobs { z-index: 0; }

/* logo mark */
.intro-logo {
  width: clamp(70px, 9vw, 110px);
  margin-bottom: 36px;
  opacity: 0; transform: translateY(20px) scale(0.9);
  animation: introLogo 1s var(--ease-out) 0.2s forwards;
  filter: drop-shadow(0 16px 30px rgba(201,162,39,0.25));
  z-index: 2;
}
@keyframes introLogo { to { opacity: 1; transform: translateY(0) scale(1); } }

/* animated letters */
.intro-word {
  display: flex; z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(52px, 11vw, 150px);
  font-weight: 700; letter-spacing: 0.02em; line-height: 1;
}
.intro-word .ltr { display: inline-block; overflow: hidden; }
.intro-word .ltr span {
  display: inline-block; transform: translateY(110%);
  animation: introLetter 0.9s var(--ease-out) forwards;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold) 40%, var(--gold-soft) 60%, var(--gold) 80%, var(--gold-deep));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
@keyframes introLetter { to { transform: translateY(0); } }

.intro-tagline {
  margin-top: 18px; z-index: 2;
  font-size: clamp(11px, 1.4vw, 14px); letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--charcoal); font-weight: 500;
  opacity: 0; animation: introFade 0.8s ease 1s forwards;
}
@keyframes introFade { to { opacity: 1; } }

/* counter + progress bar bottom */
.intro-counter {
  position: absolute; bottom: clamp(28px, 5vw, 56px); left: var(--gutter); z-index: 2;
  font-family: var(--font-display); font-size: clamp(48px, 9vw, 130px); font-weight: 700;
  color: var(--ink); line-height: 1; letter-spacing: -0.02em;
}
.intro-counter sup { font-size: 0.3em; color: var(--gold-deep); vertical-align: super; margin-left: 4px; }
.intro-bar {
  position: absolute; bottom: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold)); z-index: 2;
  transition: width 0.2s linear;
}

/* enter button */
.intro-enter {
  position: absolute; bottom: clamp(28px, 5vw, 56px); right: var(--gutter); z-index: 3;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 40px; border-radius: 100px;
  background: var(--gold); color: var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 12px 36px rgba(201,162,39,0.35);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), box-shadow 0.3s;
}
.intro-enter.ready { opacity: 1; transform: translateY(0); pointer-events: auto; }
.intro-enter:hover { box-shadow: 0 18px 48px rgba(201,162,39,0.5); }
.intro-enter .ring {
  width: 10px; height: 10px; border-radius: 50%; background: var(--ink); position: relative;
}
.intro-enter .ring::after { content:''; position:absolute; inset:-5px; border:1px solid var(--ink); border-radius:50%; animation: pulse 2s ease-out infinite; }

/* exit: curtain flows up */
#intro.exiting { transform: translateY(-100%); transition: transform 1.1s cubic-bezier(0.85, 0, 0.15, 1); }

@media (max-width: 600px) {
  .intro-enter { right: 50%; transform: translateX(50%) translateY(20px); bottom: 90px; }
  .intro-enter.ready { transform: translateX(50%) translateY(0); }
  .intro-counter { left: 50%; transform: translateX(-50%); text-align:center; }
}

@media (prefers-reduced-motion: reduce) {
  #intro { display: none; }
  body.intro-active { overflow: auto; }
}
