/* =========================================================
   MG · The King of Mini Split — MG 12K product page
   Tokens derived from the brand palette
   ========================================================= */
:root {
  --black: #000000;
  --ink: #0c0b0b;          /* card surface */
  --ink-2: #161414;        /* raised surface */
  --charcoal: #413F3F;
  --metal: #8E8585;
  --light: #E3E1E1;
  --white: #FFFFFF;
  --red: #C61617;
  --red-dark: #970707;

  --text: var(--white);
  --text-2: #b9b3b3;       /* metal, lifted for AA on black */
  --line: rgba(227, 225, 225, .12);

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.content { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--text-2); }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 10000;
  background: var(--white); color: var(--black); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Loader ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--black);
  display: grid; place-items: center;
  transition: opacity .35s ease;
}
.page-loader-mark { width: 96px; animation: loaderPulse 1.4s ease-in-out infinite; }
.page-loader.is-hidden { opacity: 0; pointer-events: none; }
@keyframes loaderPulse { 50% { opacity: .35; transform: scale(.96); } }

/* ---------- Type ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--f-body);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-2);
}
.label::before { content: ""; width: 28px; height: 1px; background: var(--red); }
.label:has(.label-dot)::before { display: none; }
.label-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
.label-sm {
  margin: 0 0 6px; font-stretch: 125%; font-weight: 600; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-2);
}

.section-title, .hero-title {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: .98;
  margin: 0;
  text-wrap: balance;
}
.section-title { font-size: clamp(2.6rem, 6.2vw, 5.4rem); max-width: 16ch; }
.section-title em, .hero-title em { font-style: italic; color: var(--red); }
.section-sub {
  margin: 22px 0 0; max-width: 46ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem); color: var(--text-2);
}
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.footnote { margin: 28px 0 0; font-size: 13px; color: var(--metal); max-width: 70ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0;
  font-family: var(--f-body); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-red:active { transform: scale(.97); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 32px; font-size: 16px; }

.glass {
  background: rgba(20, 18, 18, .55);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- Headers ---------- */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-standard { position: absolute; inset: 0 0 auto; z-index: 50; padding-top: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 52px; height: auto; }
.brand-text {
  font-stretch: 125%; font-weight: 600; font-size: 10.5px; line-height: 1.35;
  letter-spacing: .2em; text-transform: uppercase; color: var(--light);
}
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 14px; color: var(--light); opacity: .8; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  height: 38px; min-width: 44px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.22);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em;
}
.lang-toggle:hover { border-color: var(--white); }

.header-fixed {
  position: fixed; inset: 0 0 auto; z-index: 60; padding-block: 10px;
  border-width: 0 0 1px; border-radius: 0;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.header-fixed.is-visible { transform: translateY(0); }
.brand-compact .brand-mark { width: 38px; }
.header-fixed-name { font-weight: 600; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform-origin: 78% 30%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 38%, rgba(0,0,0,.05) 70%),
    linear-gradient(0deg, #000 0%, rgba(0,0,0,0) 38%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%);
}
.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px;
  padding-bottom: clamp(48px, 9vh, 96px); padding-top: 140px;
}
.hero-title { font-size: clamp(3.2rem, 8.4vw, 8rem); max-width: 11ch; }
.hero-sub { margin: 26px 0 0; max-width: 44ch; font-size: clamp(1rem, 1.3vw, 1.18rem); color: var(--light); }
.hero-cta {
  display: flex; align-items: center; gap: 22px;
  padding: 14px 14px 14px 24px; border-radius: 999px;
}
.hero-cta-title { margin: 0; font-weight: 600; font-size: 16px; }
.hero-cta-subtitle { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; z-index: 3; width: 22px; height: 36px; margin-left: -11px;
  border: 1px solid rgba(255,255,255,.35); border-radius: 12px;
}
.hero-scroll span {
  position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px;
  background: var(--white); border-radius: 2px; animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Ribbon ---------- */
.ribbon { border-block: 1px solid var(--line); }
.ribbon-list {
  list-style: none; margin: 0 auto; padding-block: 0;
  display: grid; grid-template-columns: repeat(6, 1fr);
}
.ribbon-list li {
  display: flex; flex-direction: column; gap: 6px;
  padding: 30px 20px; border-left: 1px solid var(--line);
}
.ribbon-list li:first-child { border-left: 0; padding-left: 0; }
.ribbon-num { font-family: var(--f-body); font-stretch: 75%; font-weight: 500; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.01em; }
.ribbon-num small { font-family: var(--f-mono); font-size: 12px; color: var(--text-2); letter-spacing: .04em; }
.ribbon-label { font-stretch: 125%; font-weight: 600; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(96px, 14vw, 180px); }

/* card rows: native scroll-snap */
.card-row {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  padding-bottom: 8px;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }
.card {
  position: relative; flex: 0 0 auto; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden; margin: 0;
  background: var(--ink); border: 1px solid var(--line);
}
.card-feature {
  width: min(78vw, 300px); min-height: 380px; padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(120% 70% at 100% 0%, #1d1a1a 0%, var(--ink) 60%);
}
.card-kicker {
  margin: 0 0 auto; font-family: var(--f-mono); font-size: 13px; color: var(--red);
  letter-spacing: .04em;
}
.card-title { margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; font-size: 2rem; line-height: 1.02; }
.card-text { margin: 0; font-size: 15px; color: var(--text-2); }
.card-studio { width: min(86vw, 520px); background: var(--light); border-color: transparent; }
.card-studio img { width: 100%; height: 380px; object-fit: contain; mix-blend-mode: multiply; padding: 24px 24px 48px; }
.card-caption {
  position: absolute; left: 24px; bottom: 18px; margin: 0;
  font-stretch: 125%; font-weight: 600; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
}
.card-studio .card-caption { color: var(--charcoal); }
.card-image { width: min(86vw, 520px); }
.card-image img { width: 100%; height: 380px; object-fit: cover; }
.card-image .card-caption, .card-photo figcaption { color: var(--white); text-shadow: 0 1px 12px rgba(0,0,0,.6); }

/* ---------- Season ---------- */
.section-season {
  overflow: hidden;
  background: radial-gradient(90% 80% at 80% 100%, #1a1c1f 0%, var(--black) 70%);
  transition: background .8s var(--ease);
}
.section-season::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 90% at 85% 110%, var(--red-dark) 0%, rgba(151,7,7,.35) 35%, rgba(0,0,0,0) 70%);
  opacity: 0; transition: opacity .9s var(--ease);
}
.section-season[data-mode="heat"]::before { opacity: 1; }
.section-season .content { position: relative; }
.season-switch {
  display: inline-flex; padding: 5px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line);
  margin-bottom: 48px;
}
.season-switch button {
  height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-weight: 600; font-size: 15px; color: var(--text-2); transition: background .3s var(--ease), color .3s;
}
.season-switch button[aria-checked="true"] { background: var(--white); color: var(--black); }
.section-season[data-mode="heat"] .season-switch button[aria-checked="true"] { background: var(--red); color: var(--white); }
.season-readout { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 96px); align-items: end; }
.season-value { display: flex; align-items: baseline; gap: 14px; }
.season-num { font-family: var(--f-display); font-size: clamp(5rem, 16vw, 14rem); line-height: .85; font-variant-numeric: tabular-nums; }
.season-unit { font-family: var(--f-mono); font-size: clamp(14px, 1.6vw, 20px); color: var(--text-2); }
.season-meta { margin: 0; display: grid; gap: 0; max-width: 360px; justify-self: end; width: 100%; }
.season-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.season-meta dt { color: var(--text-2); font-size: 14px; }
.season-meta dd { margin: 0; font-family: var(--f-mono); font-size: 14px; }

/* ---------- Sound (signature) ---------- */
.sound-stage { display: grid; gap: 16px; }
.sound-canvas-wrap {
  position: relative; height: clamp(300px, 42vw, 480px);
  border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(70% 90% at 50% 50%, #120f0f 0%, var(--black) 75%);
  border: 1px solid var(--line);
}
.sound-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sound-db { position: absolute; left: 28px; top: 22px; display: flex; align-items: baseline; gap: 8px; }
.sound-db-num { font-family: var(--f-display); font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.sound-db-unit { font-family: var(--f-mono); font-size: 14px; color: var(--text-2); }
.sound-audio {
  position: absolute; right: 18px; top: 18px;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.4); cursor: pointer;
  font-size: 13px; font-weight: 500;
}
.sound-audio svg { width: 20px; height: 20px; }
.sound-audio .wave-on { display: none; }
.sound-audio[aria-pressed="true"] { border-color: var(--red); }
.sound-audio[aria-pressed="true"] .wave-on { display: block; }
.sound-audio[aria-pressed="true"] .wave-off { display: none; }
.sound-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sound-levels button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 20px 22px; border-radius: 18px; cursor: pointer; text-align: left;
  background: var(--ink); border: 1px solid var(--line);
  transition: border-color .25s, background .25s;
}
.sound-levels button:hover { border-color: rgba(255,255,255,.3); }
.sound-levels button[aria-checked="true"] { background: var(--ink-2); border-color: var(--white); }
.sound-levels button.is-mg[aria-checked="true"] { border-color: var(--red); }
.lvl-db { font-family: var(--f-mono); font-size: 14px; }
.is-mg .lvl-db { color: #ff5a5a; }
.lvl-name { font-size: 15px; color: var(--text-2); }
.sound-levels button[aria-checked="true"] .lvl-name { color: var(--white); }

/* ---------- Dimensions ---------- */
.dims-figure { margin: 0; }
.dims-drawing { width: 100%; }
.dims-drawing svg { width: 100%; height: auto; display: block; overflow: visible; }
.dims-drawing .draw { fill: none; stroke: var(--metal); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.dims-drawing .draw.body { fill: url(#bodyFill); stroke: var(--light); stroke-width: 2.4; }
.dims-drawing .draw.slot { fill: #000; }
.dims-drawing .draw.thin { stroke-width: 1.2; opacity: .7; }
.dims-drawing .led { fill: var(--red); filter: drop-shadow(0 0 6px var(--red)); }
.dims-drawing .cota line { stroke: var(--red); stroke-width: 1.6; }
.dims-drawing .cota text { fill: var(--white); font-family: var(--f-display); }
.dims-drawing .dim-name { fill: var(--text-2); font-family: var(--f-body); font-stretch: 125%; font-weight: 600; letter-spacing: .2em; }
.dims-drawing .dim-depth { fill: var(--light); font-family: var(--f-mono); }
.dims-drawing .ground { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 4 8; }
.dims-legend {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px;
}
.dims-legend > div { padding-top: 18px; border-top: 1px solid var(--line); }
.dims-weight { margin: 0; font-family: var(--f-display); font-size: 2.6rem; line-height: 1; }
.dims-weight small { font-family: var(--f-mono); font-size: 13px; color: var(--text-2); }
.dims-pack { margin: 8px 0 0; font-family: var(--f-mono); font-size: 13px; color: var(--text-2); }

/* ---------- Spaces ---------- */
.card-row-tall .card-photo { width: min(78vw, 380px); height: clamp(420px, 56vw, 560px); }
.card-row-tall .card-wide { width: min(86vw, 720px); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card-photo:hover img { transform: scale(1.03); }
.card-photo::after {
  content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,0));
}
.card-photo figcaption {
  position: absolute; left: 24px; bottom: 20px; z-index: 1;
  font-family: var(--f-display); font-size: 2rem; line-height: 1;
}

/* ---------- Install ---------- */
.install-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.install-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.install-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.install-list { list-style: none; margin: 40px 0 0; padding: 0; }
.install-list li {
  display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line);
  font-size: 15px;
}
.install-list li span:first-child { color: var(--text-2); }
.install-list li span:last-child { font-family: var(--f-mono); font-size: 14px; text-align: right; }

/* ---------- Specs ---------- */
.section-specs { background: var(--ink); border-block: 1px solid var(--line); }
.specs-table { border-top: 1px solid var(--line); }
.specs-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.specs-label { color: var(--text-2); font-size: 15px; }
.specs-value { font-family: var(--f-mono); font-size: 15px; }

/* ---------- Quote ---------- */
.quote-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.quote-logo { width: 200px; margin-bottom: 36px; }
.quote-form {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); background: var(--ink); border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  background: var(--black); color: var(--white); border: 1px solid rgba(255,255,255,.16);
  font: inherit; font-size: 16px;
  transition: border-color .2s;
}
.field textarea { resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--light) 50%), linear-gradient(135deg, var(--light) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field input[aria-invalid="true"] { border-color: #ff5a5a; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.form-status { margin: 0; font-size: 14px; color: var(--text-2); }
.form-status.is-error { color: #ff7a7a; }
.form-status.is-ok { color: var(--white); }

/* ---------- Footer ---------- */
.footer { padding-block: 72px 48px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.footer-logo { width: 150px; grid-row: span 2; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { text-decoration: none; font-size: 14px; color: var(--text-2); }
.footer-nav a:hover { color: var(--white); }
.footer-legal { margin: 0; font-size: 13px; color: var(--metal); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ribbon-list { grid-template-columns: repeat(3, 1fr); }
  .ribbon-list li:nth-child(4) { border-left: 0; padding-left: 0; }
  .ribbon-list li:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-cta { justify-self: start; }
  .season-readout { grid-template-columns: 1fr; }
  .season-meta { justify-self: start; }
  .sound-levels { grid-template-columns: repeat(2, 1fr); }
  .install-grid, .quote-grid { grid-template-columns: 1fr; }
  .install-photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-text { display: none; }
  .brand-mark { width: 44px; }
  .header-fixed-name .muted { display: none; }
  .hero-img { object-position: 78% 40%; }
  .hero-shade { background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.15) 80%), linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 25%); }
  .hero-cta { width: 100%; justify-content: space-between; padding-left: 20px; }
  .hero-cta-subtitle { display: none; }
  .ribbon-list { grid-template-columns: repeat(2, 1fr); }
  .ribbon-list li { padding: 22px 0 22px 16px; }
  .ribbon-list li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .ribbon-list li:nth-child(4) { border-left: 1px solid var(--line); padding-left: 16px; }
  .ribbon-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .card-studio img, .card-image img { height: 300px; }
  .card-feature { min-height: 300px; }
  .sound-db { left: 20px; top: 16px; }
  .sound-audio { top: auto; bottom: 14px; right: 14px; }
  .sound-levels { gap: 10px; }
  .sound-levels button { padding: 16px; }
  .specs-row { grid-template-columns: 1fr; gap: 4px; }
  .quote-form { grid-template-columns: 1fr; }
  .dims-legend { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-logo { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
