/* ============================================================
   Webspt — Light Mode Overrides
   Default site theme is dark (cyan/gold neon). When users opt in
   via the theme toggle, the [data-theme="light"] attribute on
   <html> activates this stylesheet, which rewrites colors
   without touching the original Astro-built stylesheets.
   ============================================================ */

/* Logo: swap between dark-bg variant (white text) and light-bg
   variant (dark text). Two <img> tags live in the markup; only
   the one matching the current theme is shown. */
.logo-img {
  display: block;
}
.logo-light {
  display: none;
}
[data-theme="light"] .logo-dark {
  display: none;
}
[data-theme="light"] .logo-light {
  display: block;
}
/* On the homepage hero, while still scrolled at top, the header
   is transparent over the dark hero — keep the dark-variant logo
   (white text) even in light mode. */
[data-theme="light"].has-hero .header:not(.scrolled) .logo-dark {
  display: block;
}
[data-theme="light"].has-hero .header:not(.scrolled) .logo-light {
  display: none;
}

/* Light theme palette — anchored to brand colors but inverted */
:root[data-theme="light"] {
  --primary: #1a365d;
  --blue:    #2c5282;
  --gold:    #b7791f;
  --neon:    #0f7c8a;            /* darker cyan that reads on white */
  --neon2:   #5a4cd1;
  --text:    #1a202c;
  --gray:    #4a5568;

  --lm-bg:        #f6f4ef;        /* page background */
  --lm-surface:   #ffffff;        /* card / section background */
  --lm-surface-2: #efeae0;        /* alternate panel */
  --lm-border:    #d6d3cc;
  --lm-text:      #1a202c;
  --lm-text-soft: #3c4858;
  --lm-text-mute: #6b7280;
  --lm-header-bg: rgba(246, 244, 239, 0.94);
  --lm-overlay:   rgba(246, 244, 239, 0.6);
}

/* Body + general */
[data-theme="light"] body {
  background: var(--lm-bg);
  color: var(--lm-text);
}

[data-theme="light"] .loader {
  background: var(--lm-bg);
}
[data-theme="light"] .loader-text {
  color: var(--neon);
}
[data-theme="light"] .loader-bar {
  background: rgba(0, 0, 0, 0.08);
}

/* Cursor */
[data-theme="light"] .cursor {
  border-color: var(--neon);
}

/* Header — light mode is *context-aware*:
   • On pages with a .hero section (homepage):
     - At top (not scrolled): transparent background + WHITE text,
       so it sits cleanly on top of the dark hero video.
     - After scroll: cream background + dark text, identical to
       the scrolled state on non-hero pages.
   • On pages without a hero (news/pricing/article/…):
     - The header is always cream + dark text. There's no dark
       video underneath, so transparent + white would be invisible.
   The .has-hero / .no-hero classes are added by theme-toggle.js
   at DOM ready. Until that runs, we default to the "safe" cream
   look so non-hero pages never flash white-on-white.
*/

/* Default (before JS): safe cream look — protects non-hero pages */
[data-theme="light"] .header {
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* Homepage: transparent header over hero, white text */
[data-theme="light"].has-hero .header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
[data-theme="light"].has-hero .header:not(.scrolled) nav a,
[data-theme="light"].has-hero .header:not(.scrolled) .lang-switch,
[data-theme="light"].has-hero .header:not(.scrolled) .header-phone {
  color: rgba(255, 255, 255, 0.85) !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) nav a:hover {
  color: #ffffff !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) .lang-switch {
  border-color: rgba(255, 255, 255, 0.25) !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) .lang-switch:hover {
  border-color: var(--neon) !important;
  color: var(--neon) !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) .menu-btn {
  color: #ffffff !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) .theme-toggle {
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}
[data-theme="light"].has-hero .header:not(.scrolled) .theme-toggle:hover {
  border-color: var(--neon) !important;
  color: var(--neon) !important;
}

/* All scrolled headers (and non-hero pages): cream + dark */
[data-theme="light"] .header.scrolled {
  background: var(--lm-header-bg) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] nav a,
[data-theme="light"] .lang-switch,
[data-theme="light"] .header-phone {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] nav a:hover {
  color: var(--neon) !important;
}
[data-theme="light"] .lang-switch {
  border-color: var(--lm-border) !important;
}
[data-theme="light"] .lang-switch:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 12px rgba(15, 124, 138, 0.18);
}
[data-theme="light"] .menu-btn {
  color: var(--lm-text);
}

/* Hero — keep dark with image overlay for visual punch */
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a365d 100%);
}
[data-theme="light"] .hero h1,
[data-theme="light"] .hero .sub {
  color: #ffffff;
}

/* Trust strip */
[data-theme="light"] .trust {
  background: var(--lm-surface);
  border-top-color: var(--lm-border);
  border-bottom-color: var(--lm-border);
}
[data-theme="light"] .trust p,
[data-theme="light"] .trust-logos span {
  color: var(--lm-text-soft);
}

/* Section dividers */
[data-theme="light"] .section-divider {
  background: linear-gradient(90deg, transparent, var(--lm-border), transparent);
}

/* Services / generic sections */
[data-theme="light"] .services,
[data-theme="light"] .news,
[data-theme="light"] .contact,
[data-theme="light"] section {
  background: var(--lm-bg);
}
[data-theme="light"] .section-title h2 {
  color: var(--lm-text);
}
[data-theme="light"] .section-title p {
  color: var(--lm-text-soft);
}

/* Cards (services, news, portfolio info) */
[data-theme="light"] .service-card,
[data-theme="light"] .news-card,
[data-theme="light"] .ai-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .article-content,
[data-theme="light"] .case-card,
[data-theme="light"] .design-card {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .service-card:hover,
[data-theme="light"] .news-card:hover,
[data-theme="light"] .ai-card:hover,
[data-theme="light"] .pricing-card:hover,
[data-theme="light"] .case-card:hover,
[data-theme="light"] .design-card:hover {
  box-shadow: 0 8px 24px rgba(15, 124, 138, 0.12);
  border-color: rgba(15, 124, 138, 0.3);
}
[data-theme="light"] .service-card h3,
[data-theme="light"] .news-card h3,
[data-theme="light"] .ai-card h3,
[data-theme="light"] .pricing-card h3 {
  color: var(--lm-text);
}
[data-theme="light"] .service-card p,
[data-theme="light"] .news-card p,
[data-theme="light"] .ai-card p,
[data-theme="light"] .pricing-card p {
  color: var(--lm-text-soft);
}
[data-theme="light"] .service-num {
  color: rgba(15, 124, 138, 0.25);
}

/* Portfolio remains image-driven; overlay stays as-is */

/* AI section */
[data-theme="light"] .ai {
  background: var(--lm-surface-2);
}

/* Pricing */
[data-theme="light"] .pricing {
  background: var(--lm-bg);
}
[data-theme="light"] .pricing-card .price,
[data-theme="light"] .pricing-card .price-num {
  color: var(--gold);
}
[data-theme="light"] .pricing-card li {
  color: var(--lm-text-soft);
  border-bottom-color: var(--lm-border);
}

/* News */
[data-theme="light"] .news {
  background: var(--lm-surface-2);
}
[data-theme="light"] .news-card .news-meta,
[data-theme="light"] .news-meta {
  color: var(--lm-text-mute);
}
[data-theme="light"] .news-tag {
  background: rgba(15, 124, 138, 0.1);
  color: var(--neon);
}

/* Contact form */
[data-theme="light"] .contact {
  background: var(--lm-surface-2);
}
[data-theme="light"] .contact-form,
[data-theme="light"] .form-container {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
}
[data-theme="light"] .form-group label {
  color: var(--lm-text-soft);
}
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: var(--lm-bg);
  border: 1px solid var(--lm-border);
  color: var(--lm-text);
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
  color: var(--lm-text-mute);
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  border-color: var(--neon);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 124, 138, 0.12);
}
[data-theme="light"] .captcha-box {
  background: var(--lm-bg);
  color: var(--lm-text);
  border: 1px solid var(--lm-border);
}

/* Footer — kept dark for visual anchor + readability of brand info */
[data-theme="light"] .footer {
  background: #0d1b2a;
}
[data-theme="light"] .footer,
[data-theme="light"] .footer h4,
[data-theme="light"] .footer p,
[data-theme="light"] .footer a {
  color: rgba(255, 255, 255, 0.85);
}
[data-theme="light"] .footer-bottom {
  color: rgba(255, 255, 255, 0.5);
}

/* Article pages (news/article-*) */
[data-theme="light"] .article-hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a365d 100%);
}
[data-theme="light"] .article-body,
[data-theme="light"] .article-container,
[data-theme="light"] article {
  background: var(--lm-bg);
  color: var(--lm-text);
}
[data-theme="light"] .article-body h2,
[data-theme="light"] .article-body h3,
[data-theme="light"] article h2,
[data-theme="light"] article h3 {
  color: var(--lm-text);
}
[data-theme="light"] .article-body p,
[data-theme="light"] .article-body li,
[data-theme="light"] article p,
[data-theme="light"] article li {
  color: var(--lm-text-soft);
}
[data-theme="light"] .article-body a,
[data-theme="light"] article a {
  color: var(--neon);
}
[data-theme="light"] .article-body blockquote,
[data-theme="light"] article blockquote {
  background: var(--lm-surface);
  border-left-color: var(--neon);
  color: var(--lm-text-soft);
}
[data-theme="light"] .article-body code,
[data-theme="light"] article code {
  background: var(--lm-surface-2);
  color: var(--primary);
}

/* Mobile nav drawer */
[data-theme="light"] .mobile-nav {
  background: var(--lm-bg);
}
[data-theme="light"] .mobile-nav-link,
[data-theme="light"] .mobile-nav-close {
  color: var(--lm-text);
}
[data-theme="light"] .mobile-nav-link {
  border-bottom-color: var(--lm-border);
}

/* Back-to-top button */
[data-theme="light"] .back-top {
  background: var(--lm-surface);
  color: var(--neon);
  border: 1px solid var(--lm-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Theme toggle button — always present in both modes
   ============================================================ */
.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
[data-theme="light"] .theme-toggle {
  border-color: var(--lm-border);
  color: var(--lm-text-soft);
}
[data-theme="light"] .theme-toggle:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 12px rgba(15, 124, 138, 0.18);
}
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Floating Line button — keep brand */
/* (no override; LINE green works in both themes) */

/* Scroll indicator + glitch effects look better in dark only */
[data-theme="light"] .scroll-indicator {
  display: none;
}

/* SVGs in light mode — particle canvas opacity reduce */
[data-theme="light"] #particleCanvas {
  opacity: 0.4;
}

/* ============================================================
   Additional fixes — components not covered above
   ============================================================ */

/* Trust strip logos — original uses light-on-dark text */
[data-theme="light"] .trust-logos {
  color: var(--lm-text-soft);
}
[data-theme="light"] .trust-logos span,
[data-theme="light"] .trust-logos a {
  color: var(--lm-text-soft);
  opacity: 0.75;
}

/* Testimonials section */
[data-theme="light"] .testimonials {
  background: var(--lm-bg);
}
[data-theme="light"] .testimonial-card {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(15, 124, 138, 0.12);
}
[data-theme="light"] .testimonial-card blockquote,
[data-theme="light"] .testimonial-card .quote {
  color: var(--lm-text);
}
[data-theme="light"] .testimonial-card .author,
[data-theme="light"] .testimonial-card .name {
  color: var(--lm-text-mute);
}
[data-theme="light"] .testimonial-card .stars {
  color: var(--gold);
}

/* Industry-solutions tabs */
[data-theme="light"] .solutions {
  background: var(--lm-surface-2);
}
[data-theme="light"] .tabs {
  border-bottom-color: var(--lm-border);
}
[data-theme="light"] .tab-btn {
  color: var(--lm-text-soft);
  background: transparent;
}
[data-theme="light"] .tab-btn:hover {
  color: var(--neon);
}
[data-theme="light"] .tab-btn.active {
  color: var(--neon);
  border-bottom-color: var(--neon);
}
[data-theme="light"] .tab-content {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: 8px;
}
[data-theme="light"] .tab-content h3 {
  color: var(--lm-text);
}
[data-theme="light"] .tab-content p,
[data-theme="light"] .tab-content li {
  color: var(--lm-text-soft);
}

/* News card detail */
[data-theme="light"] .news-card {
  background: var(--lm-surface);
}
[data-theme="light"] .news-card .info h4,
[data-theme="light"] .news-card h4 {
  color: var(--lm-text);
}
[data-theme="light"] .news-card .info p,
[data-theme="light"] .news-card p {
  color: var(--lm-text-soft);
}
[data-theme="light"] .news-card .date,
[data-theme="light"] .news-card .info .date {
  color: var(--lm-text-mute);
}

/* News list pages (news/index.html) */
[data-theme="light"] .news-list,
[data-theme="light"] .articles-grid {
  background: var(--lm-bg);
}
[data-theme="light"] .news-list-card,
[data-theme="light"] .article-card {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  color: var(--lm-text);
}
[data-theme="light"] .news-list-card h3,
[data-theme="light"] .article-card h3 {
  color: var(--lm-text);
}
[data-theme="light"] .news-list-card p,
[data-theme="light"] .article-card p {
  color: var(--lm-text-soft);
}

/* Contact section info */
[data-theme="light"] .contact-info h2 {
  color: var(--lm-text);
}
[data-theme="light"] .contact-info p,
[data-theme="light"] .contact-info .item,
[data-theme="light"] .contact-details .item,
[data-theme="light"] .contact-details {
  color: var(--lm-text-soft);
}
[data-theme="light"] .contact-info .item .icon {
  color: var(--neon);
}

/* AI section cards */
[data-theme="light"] .ai-section,
[data-theme="light"] .ai {
  background: var(--lm-bg);
}
[data-theme="light"] .ai-card {
  background: var(--lm-surface);
}
[data-theme="light"] .ai-card .ai-icon,
[data-theme="light"] .ai-icon {
  background: rgba(15, 124, 138, 0.08);
  color: var(--neon);
}

/* Buttons in light mode */
[data-theme="light"] .btn-outline {
  color: var(--lm-text);
  border-color: var(--lm-border);
}
[data-theme="light"] .btn-outline:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 12px rgba(15, 124, 138, 0.15);
}

/* Hero region buttons stay light (white text + white border) because
   the hero background remains dark in light mode. */
[data-theme="light"] .hero .btn-outline {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
[data-theme="light"] .hero .btn-outline:hover {
  color: var(--neon) !important;
  border-color: var(--neon) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.25) !important;
}

/* Pricing card stuff (pricing pages) */
[data-theme="light"] .pricing-page,
[data-theme="light"] .pricing-grid {
  background: var(--lm-bg);
}
[data-theme="light"] .pricing-card ul li,
[data-theme="light"] .pricing-card .feature {
  color: var(--lm-text-soft);
  border-bottom-color: var(--lm-border);
}

/* Design-ex (portfolio) pages */
[data-theme="light"] .design-grid,
[data-theme="light"] .portfolio-page {
  background: var(--lm-bg);
}

/* Catch-all for generic text utility classes used by Astro page sections */
[data-theme="light"] .section-title .accent {
  background: linear-gradient(90deg, var(--neon), var(--gold));
}

/* Stats / numeric blocks (often used in pricing/about) */
[data-theme="light"] .stat-num,
[data-theme="light"] .stat .num {
  color: var(--neon);
}
[data-theme="light"] .stat-label,
[data-theme="light"] .stat .label {
  color: var(--lm-text-mute);
}

/* Subtle gradients used as section dividers */
[data-theme="light"] section + .section-divider,
[data-theme="light"] .section-divider {
  background: linear-gradient(90deg, transparent, var(--lm-border), transparent);
}

/* In case reveal stays at opacity:0 in light, ensure visibility - fallback */
[data-theme="light"] .reveal:not(.visible) {
  /* Keep the animation behavior but ensure no permanent white-on-white */
  color: inherit;
}

/* ============================================================
   News list page (news/index.html, news-th/index.html)

   Note: These pages use Astro <style scoped> with
   [data-astro-cid-xxx] attribute selectors whose specificity
   is higher than plain [data-theme="light"] .foo selectors.
   We use !important to guarantee the light overrides win.
   The Thai page also uses minified class names: .ar (article-row),
   .ad (article-date), .ai (article-info), .aw (arrow).
   ============================================================ */
[data-theme="light"] .news-list,
[data-theme="light"] .articles {
  background: var(--lm-bg) !important;
}
[data-theme="light"] .page-header h1,
[data-theme="light"] .page-header h2 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .page-header p {
  color: var(--lm-text-soft) !important;
}

/* Long-form selectors (ZH news list) */
[data-theme="light"] .article-row {
  background: var(--lm-surface) !important;
  border-bottom-color: var(--lm-border) !important;
  border-top-color: var(--lm-border) !important;
}
[data-theme="light"] .article-row:hover {
  background: rgba(15, 124, 138, 0.04) !important;
}
[data-theme="light"] .article-info h3,
[data-theme="light"] .article-row h2,
[data-theme="light"] .article-row h3 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .article-row:hover .article-info h3,
[data-theme="light"] .article-row:hover h3 {
  color: var(--neon) !important;
}
[data-theme="light"] .article-info p,
[data-theme="light"] .article-row p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-date {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .tag {
  background: rgba(15, 124, 138, 0.1) !important;
  color: var(--neon) !important;
  border-color: transparent !important;
}
[data-theme="light"] .arrow {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .article-row:hover .arrow {
  color: var(--neon) !important;
}

/* Short selectors (TH news list — Astro minified .ar / .ad / .ai / .aw) */
[data-theme="light"] .ar {
  background: var(--lm-surface) !important;
  border-bottom-color: var(--lm-border) !important;
  border-top-color: var(--lm-border) !important;
}
[data-theme="light"] .ar:hover {
  background: rgba(15, 124, 138, 0.04) !important;
}
[data-theme="light"] .ai h3 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .ar:hover .ai h3 {
  color: var(--neon) !important;
}
[data-theme="light"] .ai p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .ad {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .aw {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .ar:hover .aw {
  color: var(--neon) !important;
}

/* News CTA at bottom */
[data-theme="light"] .news-cta {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .news-cta a {
  color: var(--neon) !important;
}

/* page-header lang-switch */
[data-theme="light"] .page-header .lang-switch a {
  color: var(--neon) !important;
  border-color: var(--neon) !important;
}
[data-theme="light"] .page-header .lang-switch a:hover {
  background: var(--neon) !important;
  color: #fff !important;
}

/* Pricing page detail */
[data-theme="light"] .pricing-page {
  background: var(--lm-bg);
}

/* Article detail page */
[data-theme="light"] .article-page,
[data-theme="light"] .article-detail {
  background: var(--lm-bg);
}
[data-theme="light"] .article-meta {
  color: var(--lm-text-mute);
}
[data-theme="light"] .article-tags .tag {
  background: rgba(15, 124, 138, 0.1);
  color: var(--neon);
}

/* Design-ex page items */
[data-theme="light"] .design-grid .design-item,
[data-theme="light"] .design-item {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
}
[data-theme="light"] .design-item h3,
[data-theme="light"] .design-item h4 {
  color: var(--lm-text);
}
[data-theme="light"] .design-item p {
  color: var(--lm-text-soft);
}

/* ============================================================
   Astro scoped style overrides — news list pages
   Inline <style> blocks in /news/ and /news-th/ use selectors
   like `.article-info[data-astro-cid-*] h3[data-astro-cid-*]`
   which have higher specificity than [data-theme="light"] .foo.
   These rules use !important to win against scoped inline styles
   only when the user has chosen light mode.

   /news-th/ also uses minified class names (ar, ad, ai, aw)
   so we cover both naming schemes.
   ============================================================ */
[data-theme="light"] .page-header h1 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .page-header p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-info h3,
[data-theme="light"] .article-info h2,
[data-theme="light"] .article-info h4,
[data-theme="light"] .ai h3,
[data-theme="light"] .ai h2,
[data-theme="light"] .ai h4 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .article-info p,
[data-theme="light"] .ai p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-date,
[data-theme="light"] .ad {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .arrow,
[data-theme="light"] .aw {
  color: rgba(15, 124, 138, 0.45) !important;
}
[data-theme="light"] .article-row,
[data-theme="light"] .ar {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
}
[data-theme="light"] .article-row:hover,
[data-theme="light"] .ar:hover {
  border-color: rgba(15, 124, 138, 0.3) !important;
  box-shadow: 0 4px 16px rgba(15, 124, 138, 0.10);
}
[data-theme="light"] .article-row:hover .article-info h3,
[data-theme="light"] .ar:hover .ai h3 {
  color: var(--neon) !important;
}
[data-theme="light"] .article-row:hover .arrow,
[data-theme="light"] .ar:hover .aw {
  color: var(--neon) !important;
}
[data-theme="light"] .news-cta {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .news-cta a {
  color: var(--neon) !important;
}
[data-theme="light"] .tag {
  background: rgba(15, 124, 138, 0.1) !important;
  color: var(--neon) !important;
  border-color: transparent !important;
}

/* ============================================================
   Article detail pages (news/article-*)
   Each article page has its own data-astro-cid producing scoped
   white-on-dark rules in _astro/article-*.css. Override with
   !important so light mode shows readable text.
   ============================================================ */
[data-theme="light"] .article-body {
  background: var(--lm-bg);
}
[data-theme="light"] .article-body h2 {
  color: var(--lm-text) !important;
  border-left-color: var(--neon) !important;
}
[data-theme="light"] .article-body h3 {
  color: var(--neon) !important;
}
[data-theme="light"] .article-body p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-body ul,
[data-theme="light"] .article-body ol,
[data-theme="light"] .article-body li {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-body strong {
  color: var(--lm-text) !important;
}
[data-theme="light"] .article-body a {
  color: var(--neon) !important;
}
[data-theme="light"] .back-link {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .article-meta {
  color: var(--lm-text-mute) !important;
}

/* Article hero — keep dark for visual contrast with body */
[data-theme="light"] .article-hero h1 {
  color: #ffffff !important;
}

/* Highlight box + CTA box inside article */
[data-theme="light"] .highlight-box {
  background: rgba(15, 124, 138, 0.06) !important;
  border-color: rgba(15, 124, 138, 0.18) !important;
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .highlight-box strong {
  color: var(--neon) !important;
}
[data-theme="light"] .compare-table th {
  color: var(--neon) !important;
}
[data-theme="light"] .compare-table td {
  color: var(--lm-text-soft) !important;
  border-color: var(--lm-border) !important;
}
[data-theme="light"] .more-articles h3 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .more-card {
  background: var(--lm-surface) !important;
  border-color: var(--lm-border) !important;
}
[data-theme="light"] .more-card:hover {
  border-color: rgba(15, 124, 138, 0.3) !important;
}
[data-theme="light"] .more-card h4 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .more-card p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .more-card .date {
  color: var(--neon) !important;
}
[data-theme="light"] .cta-box {
  background: var(--lm-surface) !important;
  border-color: var(--lm-border) !important;
}
[data-theme="light"] .cta-box h3 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .cta-box p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .page-footer {
  background: #0d1b2a !important;
}
[data-theme="light"] .page-footer p {
  color: rgba(255, 255, 255, 0.55) !important;
}
[data-theme="light"] .page-footer a {
  color: var(--neon) !important;
}

/* Article body simplified header (Astro scoped) */
[data-theme="light"] .header[data-astro-cid-duhitvwo],
[data-theme="light"] .header[data-astro-cid-5kj6t6lp],
[data-theme="light"] .header[data-astro-cid-uibychrl] {
  background: var(--lm-header-bg) !important;
  border-bottom-color: var(--lm-border) !important;
}

/* ============================================================
   Design-ex / portfolio gallery page
   ============================================================ */
[data-theme="light"] .page-hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a365d 100%);
}
[data-theme="light"] .page-hero h1,
[data-theme="light"] .page-hero p {
  color: #ffffff !important;
}
[data-theme="light"] .stats-bar {
  background: var(--lm-surface);
  border-top: 1px solid var(--lm-border);
  border-bottom: 1px solid var(--lm-border);
}
[data-theme="light"] .stats-bar .n {
  color: var(--neon) !important;
}
[data-theme="light"] .stats-bar .l {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .filter-btn {
  color: var(--lm-text-soft) !important;
  border: 1px solid var(--lm-border) !important;
}
[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
  color: var(--neon) !important;
  border-color: var(--neon) !important;
  background: rgba(15, 124, 138, 0.06) !important;
}
[data-theme="light"] .gallery-item {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
}
[data-theme="light"] .gallery-item .info {
  background: var(--lm-surface) !important;
}
[data-theme="light"] .gallery-item .info h4 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .gallery-item .info p {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .cta-box p {
  color: var(--lm-text-soft) !important;
}

/* ============================================================
   Pricing calculator page
   ============================================================ */
[data-theme="light"] .calc {
  color: var(--lm-text) !important;
}
[data-theme="light"] .step {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
}
[data-theme="light"] .step-title {
  color: var(--lm-text) !important;
}
[data-theme="light"] .type-card,
[data-theme="light"] .pkg-card {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
}
[data-theme="light"] .type-card:hover,
[data-theme="light"] .pkg-card:hover {
  border-color: rgba(15, 124, 138, 0.3) !important;
  box-shadow: 0 4px 12px rgba(15, 124, 138, 0.08);
}
[data-theme="light"] .type-card.active,
[data-theme="light"] .pkg-card.active {
  border-color: var(--neon) !important;
  background: rgba(15, 124, 138, 0.04) !important;
}
[data-theme="light"] .type-card .name,
[data-theme="light"] .pkg-name {
  color: var(--lm-text) !important;
}
[data-theme="light"] .type-card .desc,
[data-theme="light"] .pkg-price small {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .pkg-features li {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .addon-item {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
}
[data-theme="light"] .addon-name {
  color: var(--lm-text) !important;
}
[data-theme="light"] .addon-price {
  color: var(--gold) !important;
}
[data-theme="light"] .qty-btn {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
  color: var(--lm-text) !important;
}
[data-theme="light"] .qty-btn:hover {
  border-color: var(--neon) !important;
  color: var(--neon) !important;
}
[data-theme="light"] .server-label {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .server-opt {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .server-opt:hover,
[data-theme="light"] .server-opt.active {
  border-color: var(--neon) !important;
  color: var(--neon) !important;
  background: rgba(15, 124, 138, 0.04) !important;
}
[data-theme="light"] .summary {
  background: var(--lm-surface) !important;
  border: 1px solid var(--lm-border) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .summary h3 {
  color: var(--lm-text) !important;
}
[data-theme="light"] .summary-empty {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .summary-item .label {
  color: var(--lm-text-soft) !important;
}
[data-theme="light"] .summary-item {
  border-color: var(--lm-border) !important;
}
[data-theme="light"] .summary-divider {
  background: var(--lm-border) !important;
}
[data-theme="light"] .summary-total .label {
  color: var(--lm-text) !important;
}
[data-theme="light"] .summary-note {
  color: var(--lm-text-mute) !important;
}
[data-theme="light"] .step-num,
[data-theme="light"] .step .num {
  background: rgba(15, 124, 138, 0.1) !important;
  color: var(--neon) !important;
}


/* ============================================================
   "正在製作中 / Work in progress" section
   Visual design works in both dark and light modes.
   Three cards, each with screenshot slot + meta block.
   If the screenshot image is missing or 404s, the onerror
   handler hides it and the gradient placeholder shows behind.
   ============================================================ */
.wip {
  padding: 80px 0 60px;
  position: relative;
}
.wip .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}
.wip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}
@media (max-width: 900px) {
  .wip-grid { grid-template-columns: 1fr; }
}
.wip-item {
  display: block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.wip-item:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 12px 30px rgba(0, 212, 255, 0.12);
}
.wip-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a365d 0%, #0d1b2a 60%, #061e4c 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Placeholder watermark — visible only when no image loaded */
.wip-thumb:before {
  content: "WIP";
  font-family: 'Orbitron', sans-serif;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.08);
  position: absolute;
  z-index: 1;
}
.wip-thumb img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s ease;
}
.wip-item:hover .wip-thumb img {
  transform: scale(1.03);
}
.wip-info {
  padding: 22px 24px 24px;
}
.wip-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(212, 165, 90, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 165, 90, 0.3);
  border-radius: 4px;
  margin-bottom: 10px;
}
.wip-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
}
.wip-info p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 12px 0;
  line-height: 1.5;
}
.wip-url {
  font-size: 11px;
  font-family: 'Consolas', 'Menlo', monospace;
  color: var(--neon);
  letter-spacing: 0.3px;
}

/* Light mode overrides for WIP */
[data-theme="light"] .wip {
  background: var(--lm-surface-2);
}
[data-theme="light"] .wip-item {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .wip-item:hover {
  border-color: rgba(15, 124, 138, 0.3);
  box-shadow: 0 12px 30px rgba(15, 124, 138, 0.10);
}
/* Thumb keeps the dark gradient — gives the cards a consistent visual anchor */
[data-theme="light"] .wip-info h4 {
  color: var(--lm-text);
}
[data-theme="light"] .wip-info p {
  color: var(--lm-text-soft);
}
[data-theme="light"] .wip-badge {
  background: rgba(183, 121, 31, 0.1);
  color: var(--gold);
  border-color: rgba(183, 121, 31, 0.25);
}

/* ============================================================
   Brand lockup — W mark + WEBSPT wordmark
   Two pieces, side by side. W mark (with orange planet) is the
   icon, WEBSPT is the wordmark. Dark / light variants of each
   swap together based on header context.
   ============================================================ */
.brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  line-height: 1 !important;
}

/* W mark */
.brand-mark {
  display: block;
  height: 38px;
  width: auto;
  flex-shrink: 0;
}
.brand-mark-light { display: none; }

/* WEBSPT wordmark */
.brand-wordmark {
  display: block;
  height: 16px;
  width: auto;
}
.brand-wordmark-light { display: none; }

/* Light mode default: use light variants */
[data-theme="light"] .brand-mark-dark      { display: none; }
[data-theme="light"] .brand-mark-light     { display: block; }
[data-theme="light"] .brand-wordmark-dark  { display: none; }
[data-theme="light"] .brand-wordmark-light { display: block; }

/* Homepage hero in light mode (transparent header over dark video):
   keep DARK variants so the lockup stays white */
[data-theme="light"].has-hero .header:not(.scrolled) .brand-mark-dark      { display: block; }
[data-theme="light"].has-hero .header:not(.scrolled) .brand-mark-light     { display: none; }
[data-theme="light"].has-hero .header:not(.scrolled) .brand-wordmark-dark  { display: block; }
[data-theme="light"].has-hero .header:not(.scrolled) .brand-wordmark-light { display: none; }

/* Compact on mobile */
@media (max-width: 700px) {
  .brand-mark { height: 32px; }
  .brand-wordmark { height: 13px; }
  .brand-lockup { gap: 8px !important; }
}

/* ============================================================
   Hero — reduce vertical height (~1/3 shorter) and clean up
   color palette: remove glitch echo on the H1, change the
   "業務增長" highlight from gold→neon gradient to single neon,
   and make stat numbers white so the gold buttons are the
   only gold accent on screen.
   ============================================================ */

/* Make hero shorter — was 100vh, now ~67vh */
.hero {
  min-height: 67vh !important;
}

/* Disable glitch color-echo on H1 (keeps text shape but removes
   the cyan / magenta ghost layers that read as "broken") */
.hero h1 .glitch::before,
.hero h1 .glitch::after {
  content: none !important;
  display: none !important;
}

/* Replace gold→neon shimmer on "業務增長" with a calmer
   single-color neon accent. Keeps the visual emphasis but
   removes the multi-color animation that competes with the
   gold buttons + gold stat numbers. */
.hero h1 .highlight {
  background: none !important;
  -webkit-text-fill-color: var(--neon) !important;
  color: var(--neon) !important;
  animation: none !important;
}

/* Stat numbers — change from gold to white so the only gold
   on screen is the primary CTA button (making it stand out) */
.hero-stat .num {
  color: #ffffff !important;
}

/* Subtle adjustment: tighten vertical spacing inside hero
   since we removed some height */
.hero .sub {
  margin-bottom: 28px !important;
}
.hero-stats {
  margin-bottom: 36px !important;
}
