/* ============================================================
   CSR — Brand page stylesheet
   Shared by every page in /brands/. Mirrors the design system
   used inline in index.html / products.html:
   type scale 12 / 16 / 26 only, navy + brass, light/dark toggle.
   ============================================================ */

:root{
  --navy-900:#0a1250;
  --navy-800:#0e1a68;
  --navy-700:#141ee6;
  --paper:#fafaf8;
  --paper-dim:#f0f0ec;
  --ink:#181c24;
  --steel:#5c6572;
  --steel-line: rgba(255,255,255,0.14);
  --blue-line: rgba(20,30,120,0.14);
  --brass:#f7c81f;
  --brass-light:#ffdd57;
  --brass-dim: rgba(247,200,31,0.35);
  --red:#d9291f;
  --red-light:#ff6b5e;
  --green:#146a3e;
  --green-light:#3bb572;
  --radius: 2px;
  --max: 1180px;

  --bg-body: var(--paper);
  --bg-body-dim: var(--paper-dim);
  --bg-surface: #ffffff;
  --bg-surface-dim: var(--paper-dim);
  --bg-header: rgba(255,255,255,0.96);
  --text-heading: var(--navy-900);
  --text-heading-2: var(--navy-800);
  --text-body: var(--ink);
  --text-muted: var(--steel);
  --border-subtle: var(--blue-line);
  --theme-transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
[data-theme="dark"]{
  --bg-body:#11151c;
  --bg-body-dim:#171c25;
  --bg-surface:#1a2029;
  --bg-surface-dim:#20262f;
  --bg-header:rgba(17,21,28,0.94);
  --text-heading:#f2f4f7;
  --text-heading-2:#dbe2e6;
  --text-body:#cdd3da;
  --text-muted:#8b93a1;
  --border-subtle:rgba(255,255,255,0.12);
}
body, header, .range-card, .spec-sheet, .faq-item, .rb-card, footer, section{
  transition:var(--theme-transition);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%; text-size-adjust:100%;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
}
body{
  margin:0;
  background:var(--bg-body);
  color:var(--text-body);
  font-family:'IBM Plex Sans Thai', 'Noto Sans Thai', 'Sukhumvit Set', 'Thonburi', 'Helvetica Neue', sans-serif;
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family:'IBM Plex Sans Thai', 'Noto Sans Thai', 'Sukhumvit Set', 'Thonburi', 'Helvetica Neue', sans-serif;
  font-weight:700;
  margin:0;
  letter-spacing:-0.01em;
}
.label{
  font-family:'Big Shoulders Display', sans-serif;
  text-transform:uppercase;
  letter-spacing:0.14em;
  font-weight:600;
  font-size:12px;
  color:var(--text-heading-2);
}
.page-hero .label{ color:var(--brass); }
.mono{ font-family:'IBM Plex Mono', monospace; }
a{color:inherit;}
.wrap{max-width:var(--max); margin:0 auto; padding:0 24px;}
img{max-width:100%; display:block;}
button{font-family:inherit;}
a:focus-visible, button:focus-visible{ outline:2px solid var(--brass); outline-offset:3px; }

/* ---------- Nav ---------- */
header{
  position:sticky; top:0; z-index:50;
  background:var(--bg-header);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--border-subtle);
}
.nav{ display:flex; align-items:center; justify-content:space-between; min-height:72px; padding:10px 0; gap:12px; }
.brand{ display:flex; align-items:center; gap:10px; color:var(--text-heading); text-decoration:none; flex-shrink:0; min-width:0; }
.brand-mark{ width:38px; height:38px; flex:none; border-radius:50%; object-fit:cover; }
.brand-name{
  font-family:'Big Shoulders Display', sans-serif;
  font-weight:700; font-size:16px; letter-spacing:0.04em;
  color:var(--text-heading); line-height:1.1;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.brand-name small{
  display:block; font-family:'IBM Plex Sans Thai','Noto Sans Thai',sans-serif;
  font-weight:400; font-size:12px; letter-spacing:0.02em; color:var(--text-muted);
  text-transform:none;
}
nav ul{ list-style:none; display:flex; gap:2.1rem; margin:0; padding:0; }
nav a.nav-link{
  color:var(--text-body); text-decoration:none; font-size:16px; font-weight:500;
  padding:6px 2px; border-bottom:2px solid transparent;
  transition:color .15s, border-color .15s;
}
nav a.nav-link.active{ color:var(--text-heading-2); border-color:var(--brass); }
nav a.nav-link:hover, nav a.nav-link:focus-visible{color:var(--text-heading-2); border-color:var(--brass);}
.nav-cta{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--brass); color:#191008; text-decoration:none;
  font-weight:600; font-size:16px; padding:10px 18px;
  border-radius:var(--radius); transition:background .15s;
  white-space:nowrap; flex-shrink:0;
}
.nav-cta:hover, .nav-cta:focus-visible{background:var(--brass-light);}
.nav-cta .cta-short{display:none;}
.theme-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; flex:none;
  border:1px solid var(--border-subtle); border-radius:50%;
  background:var(--bg-surface); color:var(--text-heading-2);
  cursor:pointer; padding:0; transition:var(--theme-transition), transform .15s ease;
}
.theme-toggle:hover{ border-color:var(--brass); color:var(--brass); transform:translateY(-1px); }
.theme-toggle svg{ width:19px; height:19px; }
.theme-toggle .icon-moon{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }

/* ---------- Scroll reveal ---------- */
.reveal{
  opacity:0; transform:translateY(28px);
  transition:opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view{ opacity:1; transform:none; }
.reveal-group .reveal:nth-child(1){transition-delay:0s;}
.reveal-group .reveal:nth-child(2){transition-delay:.08s;}
.reveal-group .reveal:nth-child(3){transition-delay:.16s;}
.reveal-group .reveal:nth-child(4){transition-delay:.24s;}
.reveal-group .reveal:nth-child(5){transition-delay:.32s;}
.reveal-group .reveal:nth-child(6){transition-delay:.4s;}

/* ---------- Page hero (always dark) ---------- */
.page-hero{
  position:relative;
  background-color:var(--navy-900);
  background-image:
    linear-gradient(165deg, rgba(10,18,80,0.94) 0%, rgba(8,12,50,0.97) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 48px);
  color:#fff;
  padding:56px 0 48px;
}
.page-hero h1{ color:#fff; font-size:26px; margin:12px 0 16px; }
.page-hero p{ color:#dbe2e6; max-width:66ch; font-size:16px; margin:0; }
.breadcrumb{ font-size:12px; color:#9fb0bb; margin-bottom:8px; }
.breadcrumb a{ color:#dbe2e6; text-decoration:none; border-bottom:1px solid rgba(255,255,255,0.25); }
.breadcrumb a:hover{ color:var(--brass-light); border-color:var(--brass-light); }
.hero-logo{
  height:34px; width:auto; max-width:170px; object-fit:contain;
  background:#fff; padding:6px 12px; border-radius:3px; margin-bottom:18px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:13px 24px; border-radius:var(--radius);
  text-decoration:none; font-weight:600; font-size:16px;
  border:1px solid transparent; transition:all .15s;
}
.btn-brass{background:var(--brass); color:#191008;}
.btn-brass:hover, .btn-brass:focus-visible{background:var(--brass-light); transform:translateY(-1px);}
.btn-ghost{border-color:rgba(255,255,255,0.4); color:#fff;}
.btn-ghost:hover, .btn-ghost:focus-visible{border-color:#fff; background:rgba(255,255,255,0.08);}
.hero-ctas{display:flex; gap:14px; flex-wrap:wrap;}

/* ---------- Section shell ---------- */
section{padding:72px 0;}
.sec-head{ margin-bottom:36px; max-width:72ch; }
.sec-head h2{ font-size:26px; color:var(--text-heading); margin-top:10px; }
.sec-head p{ color:var(--text-muted); font-size:16px; margin:14px 0 0; }

/* ---------- Intro (text + photo) ---------- */
.bp-intro{ background:var(--bg-body); }
.bp-grid{ display:grid; grid-template-columns:1.15fr 0.85fr; gap:48px; align-items:start; }
.bp-copy p{ color:var(--text-muted); font-size:16px; margin:0 0 18px; }
.bp-copy p strong{ color:var(--text-heading-2); font-weight:600; }
.bp-photo{ border:1px solid var(--border-subtle); background:var(--bg-surface-dim); overflow:hidden; }
.bp-photo img{ width:100%; height:100%; object-fit:cover; min-height:240px; }
.bp-aside{ display:flex; flex-direction:column; gap:20px; }

.spec-sheet{ border:1px solid var(--border-subtle); background:var(--bg-surface); padding:24px 26px; }
.spec-sheet h3{
  font-family:'Big Shoulders Display', sans-serif; text-transform:uppercase;
  letter-spacing:0.1em; font-size:12px; color:var(--text-heading-2); margin:0 0 14px; font-weight:700;
}
.spec-row{ display:flex; justify-content:space-between; gap:20px; padding:11px 0; border-bottom:1px solid var(--border-subtle); font-size:16px; }
.spec-row:last-child{border-bottom:none;}
.spec-row dt{color:var(--text-muted); flex:none;}
.spec-row dd{margin:0; font-weight:600; text-align:right; color:var(--text-heading-2);}

/* ---------- Product range cards ---------- */
.bp-range{ background:var(--bg-body-dim); border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle); }
.range-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.range-card{
  background:var(--bg-surface); border:1px solid var(--border-subtle); border-top:3px solid var(--brass);
  padding:26px 26px 24px; display:flex; flex-direction:column; gap:12px;
}
.range-card h3{ font-size:26px; color:var(--text-heading); font-weight:600; line-height:1.25; }
.range-card .rc-en{
  font-family:'Big Shoulders Display', sans-serif; letter-spacing:0.08em;
  font-size:12px; color:var(--brass); text-transform:uppercase; font-weight:600;
}
.range-card p{ color:var(--text-muted); font-size:16px; margin:0; }
.model-chips{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; margin-top:auto; padding-top:6px; }
.model-chips li{
  font-size:12px; padding:6px 12px; border-radius:14px;
  border:1px solid var(--border-subtle); color:var(--text-heading-2); background:var(--bg-surface-dim);
  font-family:'IBM Plex Mono', monospace;
}

/* ---------- Spec table ---------- */
.bp-spec{ background:var(--bg-body); }
.table-scroll{ overflow-x:auto; border:1px solid var(--border-subtle); background:var(--bg-surface); }
table.spec-table{ width:100%; border-collapse:collapse; font-size:16px; min-width:620px; }
table.spec-table th, table.spec-table td{
  text-align:left; padding:13px 18px; border-bottom:1px solid var(--border-subtle); vertical-align:top;
}
table.spec-table thead th{
  font-family:'Big Shoulders Display', sans-serif; text-transform:uppercase; letter-spacing:0.08em;
  font-size:12px; font-weight:700; color:var(--text-heading); background:var(--bg-surface-dim);
  border-bottom:2px solid var(--text-heading);
}
table.spec-table tbody tr:last-child td{ border-bottom:none; }
table.spec-table td:first-child{ color:var(--text-heading-2); font-weight:600; }
table.spec-table td.mono{ font-family:'IBM Plex Mono', monospace; font-size:12px; }
.table-note{ font-size:12px; color:var(--text-muted); margin-top:14px; }

/* ---------- Size reference block (sits under the spec table) ---------- */
.size-block{ margin-top:44px; padding-top:32px; border-top:1px solid var(--border-subtle); }
.size-block h3{
  font-family:'Big Shoulders Display', sans-serif; text-transform:uppercase;
  letter-spacing:0.1em; font-size:12px; color:var(--text-heading-2); margin:0 0 12px; font-weight:700;
}
.size-block > p{ color:var(--text-muted); font-size:16px; margin:0 0 20px; max-width:76ch; }
.size-chips{ display:flex; flex-wrap:wrap; gap:10px; }
.size-chip{
  background:var(--bg-surface); border:1px solid var(--border-subtle);
  border-radius:var(--radius); padding:10px 14px; min-width:104px;
  display:flex; flex-direction:column; gap:2px;
}
.size-chip b{
  font-family:'IBM Plex Mono', monospace; font-size:16px; font-weight:600;
  color:var(--text-heading); line-height:1.3;
}
.size-chip span{ font-size:12px; color:var(--text-muted); line-height:1.4; }

/* ---------- Applications ---------- */
.bp-apps{ background:var(--bg-body-dim); border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle); }
.app-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.app-card{
  background:var(--bg-surface); border:1px solid var(--border-subtle); padding:22px 22px;
}
.app-card h3{ font-size:16px; color:var(--text-heading); font-weight:600; margin-bottom:6px; }
.app-card p{ margin:0; font-size:12px; color:var(--text-muted); line-height:1.8; }

/* ---------- FAQ ---------- */
.bp-faq{ background:var(--bg-body); }
.faq-list{ display:flex; flex-direction:column; gap:14px; }
.faq-item{
  border:1px solid var(--border-subtle); background:var(--bg-surface);
  padding:22px 26px;
}
.faq-item h3{ font-size:16px; color:var(--text-heading); font-weight:600; margin-bottom:8px; }
.faq-item p{ margin:0; font-size:16px; color:var(--text-muted); }

/* ---------- CTA strip (always dark) ---------- */
.cta-strip{
  background:var(--navy-900); color:#fff; text-align:center; padding:64px 24px;
}
.cta-strip h2{ color:#fff; font-size:26px; margin-bottom:16px; }
.cta-strip p{ color:#c4cfd6; margin-bottom:28px; font-size:16px; }
.cta-strip .hero-ctas{ justify-content:center; }
.cta-phones{
  margin-top:26px; font-size:16px; color:#dfe6ea;
  display:flex; gap:10px 28px; justify-content:center; flex-wrap:wrap;
}
.cta-phones a{ color:#dfe6ea; text-decoration:none; border-bottom:1px solid rgba(255,255,255,0.28); }
.cta-phones a:hover{ color:var(--brass-light); border-color:var(--brass-light); }

/* ---------- Related brands ---------- */
.bp-related{ background:var(--bg-body-dim); border-top:1px solid var(--border-subtle); }
.rb-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.rb-card{
  display:flex; flex-direction:column; gap:10px; text-decoration:none;
  background:var(--bg-surface); border:1px solid var(--border-subtle); padding:18px 18px;
  transition:transform .2s ease, border-color .15s;
}
.rb-card:hover{ transform:translateY(-3px); border-color:var(--brass); }
.rb-card img{ height:22px; width:auto; max-width:110px; object-fit:contain; background:#fff; padding:4px 8px; border-radius:3px; }
.rb-card .rb-name{ font-size:16px; font-weight:600; color:var(--text-heading); }
.rb-card .rb-desc{ font-size:12px; color:var(--text-muted); line-height:1.7; }

/* ---------- Download links ---------- */
.dl-row{ display:flex; gap:12px; flex-wrap:wrap; margin-top:4px; }
.datasheet-link{
  display:inline-flex; align-items:center; gap:8px;
  font-size:16px; font-weight:600; color:var(--text-heading-2); text-decoration:none;
  border:1px solid var(--border-subtle); padding:9px 14px; border-radius:var(--radius);
  background:var(--bg-surface);
  transition:border-color .15s, color .15s, background .15s;
}
.datasheet-link:hover{ border-color:var(--brass); background:var(--bg-surface-dim); color:var(--text-heading); }
.datasheet-link svg{ width:16px; height:16px; flex:none; }

/* ---------- Footer ---------- */
footer{
  position:relative;
  background:var(--bg-body); border-top:1px solid var(--border-subtle);
  color:var(--text-muted); font-size:12px; padding:26px 0;
}
footer .wrap{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; width:100%; }
footer a{ color:var(--text-muted); text-decoration:none; border-bottom:1px solid var(--border-subtle); }
footer a:hover{ color:var(--text-heading-2); border-color:var(--brass); }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  nav ul{display:none;}
  .bp-grid{ grid-template-columns:1fr; gap:32px; }
  .range-grid{ grid-template-columns:1fr; }
  .app-grid{ grid-template-columns:repeat(2,1fr); }
  .rb-grid{ grid-template-columns:repeat(2,1fr); }
  section{ padding:56px 0; }
}
@media (max-width: 560px){
  .nav{gap:8px;}
  .brand{gap:8px;}
  .brand-mark{width:30px; height:30px; margin-left:6px;}
  .brand-name{font-size:11px; max-width:32vw; line-height:1.15;}
  .brand-name small{font-size:9px;}
  .theme-toggle{width:32px; height:32px;}
  .theme-toggle svg{width:16px; height:16px;}
  .nav-cta{padding:7px 10px; font-size:12px; margin-right:8px;}
  .app-grid{ grid-template-columns:1fr; }
  .rb-grid{ grid-template-columns:1fr; }
  .faq-item, .range-card{ padding:20px 18px; }
}
