/* ==========================================================================
   Source-From-Foshan — light / dark theme layer
   Loaded after site.css. Dark is the default brand theme; light is a warm
   paper-and-ink editorial mode. Toggle uses View Transitions when available.
   ========================================================================== */

/* ---------- theme toggle ---------- */
.theme-toggle{
  position:relative;width:36px;height:36px;min-width:36px;border:1px solid var(--line);
  border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.025);
  color:var(--text-soft);transition:border-color .45s var(--ease),color .45s,background .6s var(--ease),transform .5s var(--ease);
}
.theme-toggle:hover{border-color:var(--line-warm);color:var(--gold-strong);transform:rotate(8deg)}
.theme-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.theme-toggle svg{position:absolute;width:15px;height:15px;transition:opacity .6s cubic-bezier(.22,1,.36,1),transform .85s cubic-bezier(.22,1,.36,1)}
.theme-toggle .icon-sun{opacity:1;transform:rotate(0) scale(1)}
.theme-toggle .icon-moon{opacity:0;transform:rotate(-42deg) scale(.72)}
html[data-theme="light"] .theme-toggle .icon-sun{opacity:0;transform:rotate(42deg) scale(.72)}
html[data-theme="light"] .theme-toggle .icon-moon{opacity:1;transform:rotate(0) scale(1)}

/* ---------- light palette ---------- */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#f5f2e9;
  --bg-deep:#ece8de;
  --bg-home:#f7f4ed;
  --bg-section:#efebe1;
  --bg-section-2:#f9f7f1;
  --panel:#fffdf8;
  --panel-2:#f3efe6;
  --ink:#191a14;
  --text:#2a2b23;
  --text-soft:#56564b;
  --muted:#706d61;
  --muted-2:#969184;
  --gold:#a8864f;
  --gold-strong:#765a2d;
  --gold-bright:#8f5e0e;
  --gold-soft:#8d6c3c;
  --line:rgba(25,26,20,.13);
  --line-strong:rgba(25,26,20,.22);
  --line-warm:rgba(118,90,45,.28);
  --shadow:0 30px 80px rgba(33,29,20,.14);
}
html[data-theme="light"] body{background:var(--bg);color:var(--text)}
html[data-theme="light"] ::selection{background:var(--gold);color:#fffdf8}
html[data-theme="light"] .site-header{background:rgba(247,244,237,.8);border-bottom-color:rgba(25,26,20,.1)}
html[data-theme="light"] .site-header.is-scrolled{background:rgba(247,244,237,.96);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .header-nav a{color:var(--muted)}
html[data-theme="light"] .header-nav a:hover{color:var(--gold-strong)}
html[data-theme="light"] .header-nav a.is-active{color:var(--gold-bright)}
html[data-theme="light"] .brand-word .accent{color:var(--gold-strong)}
html[data-theme="light"] .brand-sub{color:var(--muted-2)}
html[data-theme="light"] .nav-toggle{border-color:var(--line)}
html[data-theme="light"] .nav-toggle span{background:var(--ink)}
html[data-theme="light"] .mobile-nav{background:radial-gradient(600px 420px at 80% -10%,rgba(168,134,79,.10),transparent 60%),#f7f4ed}
html[data-theme="light"] .mobile-nav a{border-bottom-color:rgba(25,26,20,.12)}
html[data-theme="light"] .mobile-nav a span{color:var(--gold-soft)}
html[data-theme="light"] .mobile-nav .mobile-contact{color:var(--muted)}

/* hero */
html[data-theme="light"] .hero{background:radial-gradient(1100px 600px at 78% -10%,rgba(168,134,79,.14),transparent 60%),radial-gradient(900px 700px at 8% 18%,rgba(168,134,79,.08),transparent 65%),linear-gradient(180deg,#f7f4ed,var(--bg) 60%)}
html[data-theme="light"] .hero-grid-bg{background-image:linear-gradient(rgba(25,26,20,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(25,26,20,.05) 1px,transparent 1px)}
html[data-theme="light"] .hero-orb--1{background:rgba(168,134,79,.12)}
html[data-theme="light"] .hero-orb--2{background:rgba(168,134,79,.07)}
html[data-theme="light"] .hero h1,html[data-theme="light"] .service-hero h1,html[data-theme="light"] .subpage-hero h1,html[data-theme="light"] .blog-hero h1,html[data-theme="light"] .article-head h1{color:var(--ink)}
html[data-theme="light"] .hero-tags{color:var(--muted)}
html[data-theme="light"] .hero-tags span+span::before{color:var(--muted-2)}
html[data-theme="light"] .chip{background:rgba(255,255,255,.42);color:var(--text-soft)}
html[data-theme="light"] .chip:hover{background:rgba(168,134,79,.1);color:var(--ink)}
html[data-theme="light"] .hero-photo,html[data-theme="light"] .hero-secondary{border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .hero-float-stat{background:rgba(255,253,248,.92);border-color:var(--line-warm);box-shadow:var(--shadow);backdrop-filter:blur(12px)}
html[data-theme="light"] .stats-band{border-color:rgba(25,26,20,.12);background:rgba(255,255,255,.28)}
html[data-theme="light"] .stat{border-left-color:rgba(25,26,20,.1)}
html[data-theme="light"] .stat>span{color:var(--gold-strong)}
html[data-theme="light"] .cat-strip{background:rgba(255,255,255,.26);border-bottom-color:rgba(25,26,20,.1)}
html[data-theme="light"] .cat-strip a{color:var(--muted)}
html[data-theme="light"] .cat-strip a::before{background:var(--gold-soft)}

/* buttons */
html[data-theme="light"] .btn--primary{background:var(--gold);border-color:var(--gold);color:#fffdf8}
html[data-theme="light"] .btn--primary:hover{background:var(--gold-strong);border-color:var(--gold-strong);box-shadow:0 14px 34px rgba(118,90,45,.18)}
html[data-theme="light"] .btn--ghost{background:rgba(255,255,255,.38);border-color:var(--line-strong);color:var(--text)}
html[data-theme="light"] .btn--ghost:hover{background:rgba(168,134,79,.1);border-color:var(--gold);color:var(--gold-strong)}
html[data-theme="light"] .btn--outline{border-color:var(--line-warm);color:var(--gold-strong)}
html[data-theme="light"] .btn--outline:hover{background:rgba(168,134,79,.08)}
html[data-theme="light"] .link-arrow{color:var(--gold-strong);border-bottom-color:rgba(118,90,45,.32)}
html[data-theme="light"] .link-arrow:hover{color:var(--gold-bright);border-color:var(--gold-bright)}

/* generic surfaces */
html[data-theme="light"] .section + .section{border-top-color:rgba(25,26,20,.09)}
html[data-theme="light"] .team-card{background:linear-gradient(165deg,rgba(255,255,255,.9),rgba(255,253,248,.68));border-color:rgba(25,26,20,.13)}
html[data-theme="light"] .team-card:hover{border-color:var(--line-warm)}
html[data-theme="light"] .tour-card{background:linear-gradient(170deg,rgba(255,255,255,.8),rgba(255,253,248,.62));border-color:rgba(25,26,20,.13)}
html[data-theme="light"] .tour-card:hover{border-color:var(--line-warm)}
html[data-theme="light"] .service-card{background:linear-gradient(180deg,rgba(255,255,255,.75),rgba(255,253,248,.5));border-color:rgba(25,26,20,.13)}
html[data-theme="light"] .service-card:hover{background:linear-gradient(180deg,rgba(168,134,79,.08),rgba(255,255,255,.6));border-color:var(--line-warm)}
html[data-theme="light"] .service-num{color:var(--gold-strong)}
html[data-theme="light"] .service-card .link-arrow{color:var(--text-soft)}
html[data-theme="light"] .case-card{background:rgba(255,255,255,.52);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .case-card:hover{border-color:var(--line-warm)}
html[data-theme="light"] .guide-card{border-top-color:rgba(25,26,20,.14)}
html[data-theme="light"] .interior-card{border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .material-chips a{border-color:rgba(25,26,20,.15);color:var(--text-soft)}
html[data-theme="light"] .material-chips a:hover{border-color:var(--gold-soft);color:var(--gold-strong);background:rgba(168,134,79,.08)}
html[data-theme="light"] .qc-media-main,html[data-theme="light"] .qc-media-sub{border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .qc-step{border-top-color:rgba(25,26,20,.11)}
html[data-theme="light"] .qc-badge{border-color:var(--line-warm);background:rgba(168,134,79,.06)}
html[data-theme="light"] .form-card{background:linear-gradient(170deg,rgba(255,255,255,.96),rgba(255,253,248,.9));border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] .field textarea{background:rgba(255,255,255,.7);border-color:rgba(25,26,20,.16)}
html[data-theme="light"] .field select option{background:#fffdf8;color:var(--ink)}
html[data-theme="light"] .field input::placeholder,html[data-theme="light"] .field textarea::placeholder{color:var(--muted-2)}
html[data-theme="light"] .contact-row{border-top-color:rgba(25,26,20,.12)}
html[data-theme="light"] .contact-row dd{color:var(--text-soft)}
html[data-theme="light"] .faq-list,html[data-theme="light"] .faq-item{border-color:rgba(25,26,20,.13)}
html[data-theme="light"] .faq-q .pm{border-color:var(--line-warm)}
html[data-theme="light"] .faq-item.is-open .faq-q .pm{background:rgba(168,134,79,.12)}

/* page heroes + page-specific cards */
html[data-theme="light"] .subpage-hero,html[data-theme="light"] .service-hero{background:radial-gradient(900px 520px at 82% -10%,rgba(168,134,79,.14),transparent 62%),linear-gradient(180deg,#f7f4ed,var(--bg) 70%)}
html[data-theme="light"] .subpage-proof{border-color:rgba(25,26,20,.12);background:rgba(255,255,255,.32)}
html[data-theme="light"] .subpage-proof div{border-left-color:rgba(25,26,20,.1)}
html[data-theme="light"] .subpage-proof span{color:var(--gold-strong)}
html[data-theme="light"] .category-card{background:rgba(255,255,255,.5);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .price-card{background:linear-gradient(170deg,rgba(255,255,255,.9),rgba(255,253,248,.7));border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .subpage-cta-inner{background:linear-gradient(140deg,rgba(168,134,79,.12),rgba(255,255,255,.5) 55%);border-color:rgba(118,90,45,.28)}
html[data-theme="light"] .price-note{border-color:rgba(25,26,20,.12);border-left-color:var(--gold-strong);background:rgba(255,255,255,.35)}
html[data-theme="light"] .price-table-wrap{border-color:rgba(25,26,20,.14);background:rgba(255,255,255,.42)}
html[data-theme="light"] .price-table th{border-bottom-color:rgba(25,26,20,.14);background:rgba(255,255,255,.55)}
html[data-theme="light"] .price-table td{border-bottom-color:rgba(25,26,20,.09)}
html[data-theme="light"] .price-table tbody tr:hover{background:rgba(168,134,79,.07)}
html[data-theme="light"] .price-table td.price:last-child{color:var(--gold-strong)}
html[data-theme="light"] .service-detail{border-top-color:rgba(25,26,20,.12)}
html[data-theme="light"] .service-deliverable{background:linear-gradient(160deg,rgba(255,255,255,.9),rgba(255,253,248,.68));border-color:rgba(25,26,20,.14);box-shadow:0 18px 50px rgba(33,29,20,.08)}
html[data-theme="light"] .deliverable-list li,html[data-theme="light"] .service-stats div{border-color:rgba(25,26,20,.11);background:rgba(255,255,255,.45)}
html[data-theme="light"] .service-support-card{background:rgba(255,255,255,.48);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .service-support-card:hover{border-color:var(--line-warm)}
html[data-theme="light"] .svc-price-card{background:linear-gradient(165deg,rgba(255,255,255,.92),rgba(255,253,248,.75));border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .svc-price-card.is-featured{border-color:rgba(118,90,45,.5);background:linear-gradient(165deg,rgba(255,253,248,.98),rgba(246,240,227,.9));box-shadow:0 24px 60px rgba(33,29,20,.09)}
html[data-theme="light"] .svc-price b{color:var(--ink)}
html[data-theme="light"] .plan-card{background:rgba(255,255,255,.48);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .plan-card:hover{background:rgba(168,134,79,.07);border-color:var(--line-warm)}

/* blog / article */
html[data-theme="light"] .blog-hero{background:radial-gradient(760px 400px at 50% -10%,rgba(168,134,79,.14),transparent 65%),var(--bg);border-bottom-color:rgba(25,26,20,.1)}
html[data-theme="light"] .blog-featured{background:rgba(255,255,255,.48);border-color:rgba(25,26,20,.13)}
html[data-theme="light"] .blog-featured-media .blog-cat{background:rgba(255,253,248,.82);border-color:var(--line-warm);color:var(--gold-strong)}
html[data-theme="light"] .blog-card{background:rgba(255,255,255,.5);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .blog-card-tag{background:rgba(255,253,248,.82);border-color:rgba(25,26,20,.14);color:var(--muted)}
html[data-theme="light"] .article-hero{border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .article-body p{color:var(--text-soft)}
html[data-theme="light"] .article-body ul li{color:var(--text-soft)}
html[data-theme="light"] .article-note{border-color:rgba(118,90,45,.25);background:rgba(168,134,79,.07)}
html[data-theme="light"] .article-table-wrap{border-color:rgba(25,26,20,.14)}
html[data-theme="light"] .article-table th{background:rgba(255,255,255,.55);border-bottom-color:rgba(25,26,20,.14)}
html[data-theme="light"] .article-table td{border-bottom-color:rgba(25,26,20,.09);color:var(--text-soft)}
html[data-theme="light"] .article-steps li{background:rgba(255,255,255,.45);border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .article-next{background:linear-gradient(145deg,rgba(168,134,79,.1),rgba(255,255,255,.5));border-color:rgba(118,90,45,.3)}

/* footer + floating UI */
html[data-theme="light"] .site-footer{background:#ece8de;border-top-color:rgba(25,26,20,.1)}
html[data-theme="light"] .footer-col a,html[data-theme="light"] .footer-office address{color:var(--text-soft)}
html[data-theme="light"] .footer-bottom{border-top-color:rgba(25,26,20,.1);color:var(--muted-2)}
html[data-theme="light"] .footer-socials a{border-color:rgba(25,26,20,.15)}
html[data-theme="light"] .lang-switch{background:rgba(247,244,237,.82);border-color:rgba(25,26,20,.15);box-shadow:0 10px 30px rgba(33,29,20,.15)}
html[data-theme="light"] .lang-switch button{color:var(--muted)}
html[data-theme="light"] .lang-switch button.is-active{background:var(--gold);color:#fffdf8}
html[data-theme="light"] .lang-switch a{color:var(--muted)}
html[data-theme="light"] .lang-switch a.is-active{background:var(--gold);color:#fffdf8}
html[data-theme="light"] .to-top{background:rgba(255,253,248,.9);border-color:rgba(25,26,20,.16);color:var(--muted)}
html[data-theme="light"] .toast{background:#fffdf8;border-color:var(--line-warm);color:var(--ink)}
html[data-theme="light"] .lightbox{background:rgba(247,244,237,.94)}
html[data-theme="light"] .lightbox .lb-cap{color:var(--gold-strong)}
html[data-theme="light"] .lightbox .lb-close,html[data-theme="light"] .lightbox .lb-nav{border-color:rgba(25,26,20,.22);color:var(--ink)}
html[data-theme="light"] .img-missing{background:linear-gradient(135deg,#efe9dc,#e4ddd0)}
html[data-theme="light"] .cta-band-overlay{background:linear-gradient(90deg,rgba(245,242,233,.94) 0%,rgba(245,242,233,.8) 45%,rgba(245,242,233,.45) 100%)}
html[data-theme="light"] .cta-band h2,html[data-theme="light"] .cta-band p{color:var(--ink)}
html[data-theme="light"] .cta-band .btn--ghost{background:rgba(255,255,255,.5);color:var(--ink);border-color:var(--line-strong)}
html[data-theme="light"] .pg-item,html[data-theme="light"] .collection-img{border-color:rgba(25,26,20,.12)}
html[data-theme="light"] .pg-item{background:rgba(255,255,255,.4)}

/* ---------- slow, tactile transition ---------- */
body,.site-header,.mobile-nav,.hero,.hero-photo,.hero-secondary,.hero-float-stat,.stats-band,.cat-strip,.team-card,.tour-card,.service-card,.case-card,.guide-card,.interior-card,.form-card,.field input,.field select,.field textarea,.contact-row,.faq-list,.faq-item,.subpage-hero,.service-hero,.service-deliverable,.service-support-card,.svc-price-card,.plan-card,.price-table-wrap,.price-table th,.price-table td,.subpage-cta-inner,.blog-hero,.blog-featured,.blog-card,.article-hero,.article-note,.article-table-wrap,.article-table th,.article-table td,.article-steps li,.article-next,.site-footer,.footer-col a,.footer-office address,.lang-switch,.lang-switch button,.lang-switch a,.theme-toggle,.to-top,.toast{
  transition:background-color .78s cubic-bezier(.22,1,.36,1),color .62s cubic-bezier(.22,1,.36,1),border-color .78s cubic-bezier(.22,1,.36,1),box-shadow .78s cubic-bezier(.22,1,.36,1);
}

/* circular reveal for theme switching */
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){animation:sff-theme-reveal .9s cubic-bezier(.65,0,.35,1)}
::view-transition-old(root){animation:sff-theme-veil .9s cubic-bezier(.65,0,.35,1)}
@keyframes sff-theme-reveal{from{clip-path:circle(0 at var(--theme-x,50%) var(--theme-y,50%))}to{clip-path:circle(160% at var(--theme-x,50%) var(--theme-y,50%))}}
@keyframes sff-theme-veil{to{opacity:.55}}

@media (prefers-reduced-motion:reduce){
  ::view-transition-old(root),::view-transition-new(root){animation:none}
  body,.site-header,.mobile-nav,.hero,.team-card,.tour-card,.service-card,.case-card,.form-card,.field input,.faq-list,.faq-item,.subpage-hero,.service-hero,.service-deliverable,.service-support-card,.svc-price-card,.plan-card,.price-table-wrap,.price-table th,.price-table td,.subpage-cta-inner,.blog-hero,.blog-featured,.blog-card,.article-hero,.article-note,.article-table-wrap,.article-table th,.article-table td,.article-steps li,.article-next,.site-footer,.lang-switch,.theme-toggle,.to-top,.toast{transition:none!important}
}

@media (max-width:1024px){
  .theme-toggle{width:34px;height:34px;min-width:34px}
}
@media (max-width:620px){
  .header-actions{gap:8px}
  .theme-toggle{width:32px;height:32px;min-width:32px}
}

/* text and controls that were hard-coded for the dark palette */
html[data-theme="light"] .brand-word{color:var(--ink)}
html[data-theme="light"] .brand-word .accent{color:var(--gold-strong)}
html[data-theme="light"] .brand-name{color:var(--ink)}
html[data-theme="light"] .brand-sub{color:var(--muted-2)}
html[data-theme="light"] .filter-btn,html[data-theme="light"] .pg-tab{border-color:var(--line-strong);color:var(--text-soft)}
html[data-theme="light"] .filter-btn:hover,html[data-theme="light"] .pg-tab:hover{border-color:var(--gold-soft);color:var(--gold-strong)}
html[data-theme="light"] .filter-btn.is-active,html[data-theme="light"] .pg-tab.is-active{background:var(--gold);border-color:var(--gold);color:#181b16}
html[data-theme="light"] .pg-item{background:rgba(255,255,255,.5)}
html[data-theme="light"] .pg-item figcaption{color:var(--text-soft)}
html[data-theme="light"] .service-card .link-arrow,html[data-theme="light"] .tour-card .link-arrow,html[data-theme="light"] .case-body .link-arrow{color:var(--text-soft)}
html[data-theme="light"] .footer-col h4,html[data-theme="light"] .footer-brand p{color:var(--muted-2)}
html[data-theme="light"] .footer-col a,html[data-theme="light"] .footer-office address{color:var(--text-soft)}
html[data-theme="light"] .hero-badge,html[data-theme="light"] .qc-stamp{background:rgba(255,253,248,.94);color:#1a1c16}
html[data-theme="light"] .stat > span,html[data-theme="light"] .subpage-proof span{color:var(--gold-strong)}

/* dark feature panel on the homepage */
html[data-theme="light"] .help-panel{background:radial-gradient(900px 420px at 12% 0%,rgba(168,134,79,.12),transparent 62%),linear-gradient(150deg,#fffdf8,#f0ebe0);border-color:rgba(25,26,20,.14);box-shadow:0 20px 50px rgba(33,29,20,.08)}
html[data-theme="light"] .help-panel::before{background-image:linear-gradient(rgba(25,26,20,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(25,26,20,.045) 1px,transparent 1px)}
html[data-theme="light"] .help-links a{border-top-color:rgba(25,26,20,.12);color:var(--text-soft)}
html[data-theme="light"] .help-item{border-top-color:rgba(25,26,20,.12)}
html[data-theme="light"] .help-ic{border-color:var(--line-warm);background:rgba(168,134,79,.08)}
