/* MattMan Solar — shared styles
   Concept: an inverter/VRM display at night. Deep navy panels, electric-cyan readouts,
   amber reserved for discount codes, a faint solar-cell grid behind the big moments. */
:root {
  --bg: #07111d;
  --bg-2: #0b1828;
  --panel: #0f2034;
  --panel-2: #132a43;
  --line: #1c3550;
  --line-2: #2a4b6e;
  --text: #e8f0f7;
  --muted: #94aac0;
  --volt: #38e1ff;          /* display cyan: links, primary actions, readout values */
  --volt-ink: #04202a;
  --volt-soft: rgba(56, 225, 255, .12);
  --sun: #ffb423;           /* solar amber: discount codes + Matt's pick only */
  --sun-ink: #2a1a00;
  --live: #4ade80;
  --tile: #e9eef3;          /* light tile behind cut-out product photos */
  --radius-s: 6px;
  --radius-l: 16px;
  --wrap: 1200px;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--volt); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

h1, h2, h3 { font-family: var(--display); margin: 0 0 .5em; text-wrap: balance; color: #fff; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 800; font-stretch: 118%; line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.4rem); font-weight: 780; font-stretch: 114%; line-height: 1.08; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 66ch; }
.lede { font-size: 1.18rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: 32px; padding-right: 32px; } }
.section { padding-block: 72px; }
.section-tight { padding-block: 40px; }

/* Solar-cell grid texture */
.cells { position: relative; isolation: isolate; }
.cells::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 38px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
  opacity: .55;
}

/* Header */
.site-head { background: rgba(7, 17, 29, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(8px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { height: 40px; width: auto; }
.brand span { white-space: nowrap; font: 800 1.15rem/1 var(--display); font-stretch: 118%; letter-spacing: -.01em; }
.brand span b { color: var(--volt); font-weight: 800; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { white-space: nowrap; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 11px; border-radius: var(--radius-s); }
.nav a:hover { color: #fff; background: var(--panel); }
.nav a[aria-current="page"] { color: var(--volt); }
@media (max-width: 700px) { .nav { flex-wrap: nowrap; } .nav a { padding: 8px 8px; font-size: .9rem; } .nav .hide-s { display: none; } .brand span { font-size: 1rem; } .brand img { height: 34px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--body); text-decoration: none; padding: 14px 20px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: transparent; color: #fff; cursor: pointer; }
.btn:hover { border-color: var(--volt); color: var(--volt); }
.btn-volt { background: var(--volt); border-color: var(--volt); color: var(--volt-ink); }
.btn-volt:hover { background: #8cefff; border-color: #8cefff; color: var(--volt-ink); }
.btn-sm { padding: 10px 14px; font-size: .93rem; }

/* Discount code tag (heat-shrink wire marker) */
.code-tag {
  display: inline-flex; align-items: center; gap: 8px; background: var(--sun); color: var(--sun-ink);
  font: 600 .95rem/1 var(--mono); letter-spacing: .03em; padding: 9px 12px 9px 17px; border: 0; cursor: pointer;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%); border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.code-tag::after { content: "Copy"; font: 600 .72rem/1 var(--body); opacity: .7; }
.code-tag.copied::after { content: "Copied"; opacity: 1; }
.code-tag:hover { background: #ffc85c; }

/* Readout (inverter-display style spec panel) */
.readout { background: #04101b; border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 14px 16px; font-family: var(--mono); }
.readout-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.readout dl { margin: 0; display: grid; gap: 6px; }
.readout .row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px dashed var(--line); padding-top: 6px; }
.readout .row:first-child { border-top: 0; padding-top: 0; }
.readout dt { color: var(--muted); font-size: .82rem; }
.readout dd { margin: 0; color: var(--volt); font-size: .9rem; text-align: right; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font: 600 .78rem var(--mono); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* System cards */
.sys-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); margin-top: 28px; }
@media (max-width: 400px) { .sys-grid { grid-template-columns: 1fr; } }
.sys { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.sys-img { background: var(--bg-2); }
.sys-img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.sys-img.contain { background: var(--tile); }
.sys-img.contain img { object-fit: contain; padding: 18px; }
.sys-body { padding: 20px; display: grid; gap: 12px; align-content: start; flex: 1; }
.sys-body h3 { margin: 0; }
.sys-use { color: var(--volt); font: 600 .82rem var(--mono); }
.sys-body p { margin: 0; color: var(--muted); font-size: .97rem; }
.sys-gear { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sys-gear a { display: inline-block; text-decoration: none; background: var(--panel-2); color: var(--text); padding: 6px 10px; border-radius: var(--radius-s); font-size: .86rem; font-weight: 600; border: 1px solid var(--line); }
.sys-gear a:hover { border-color: var(--volt); color: var(--volt); }
.sys-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.vrm { border-top: 1px solid var(--line); background: #fff; }
.vrm iframe { width: 100%; height: 560px; border: 0; display: block; }

/* Footer */
.site-foot { background: var(--bg-2); border-top: 1px solid var(--line); color: var(--muted); padding-block: 52px 32px; margin-top: 48px; font-size: .95rem; }
.site-foot a { color: var(--text); }
.site-foot a:hover { color: var(--volt); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-foot h3 { font-size: 1rem; }
.disclosure { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: .85rem; max-width: none; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a { display: inline-flex; flex-direction: column; gap: 1px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; min-width: 0; }
.social-links a:hover { border-color: var(--volt); }
.social-links b { color: #fff; font-size: .9rem; }
.social-links span { color: var(--volt); font: 500 .76rem var(--mono); }
.site-foot .social-links { margin-top: 14px; }
.newsletter { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line-2); border-radius: var(--radius-l); padding: clamp(24px, 4vw, 44px); display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .newsletter { grid-template-columns: 1fr 1.1fr; } }
.newsletter h2 { margin-bottom: .3em; }
.newsletter p { margin: 0; color: var(--muted); }
.signup-form { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .signup-form { grid-template-columns: 1fr 1.4fr auto; } }
.signup-form input { width: 100%; min-width: 0; font: 400 1rem var(--body); padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: #04101b; color: var(--text); }
.signup-form input::placeholder { color: var(--muted); }
.signup-form input:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px var(--volt-soft); }
.signup-form button:disabled { opacity: .6; cursor: wait; }
.signup-msg { margin: 10px 0 0; font-size: .95rem; min-height: 1px; }
.signup-msg.ok { color: var(--live); font-weight: 600; }
.signup-msg.warn { color: var(--sun); }
.signup-note { font-size: .85rem; color: var(--muted); margin-top: 10px !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 400px) { .nav a { padding: 8px 6px; font-size: .85rem; } .brand img { height: 30px; } .brand span { font-size: .92rem; } }
@media (max-width: 380px) { .brand span { display: none; } }
/* ---------- Black Friday ---------- */
:root { --bf-ink: #050a12; --bf-amber: #ffb423; --bf-amber-2: #ffc95c; }
.bf { background: var(--bf-ink); color: #fff; position: relative; border-bottom: 1px solid var(--line); }
.bf::before, .bf::after { content: ""; display: block; height: 14px; background: repeating-linear-gradient(-45deg, var(--bf-amber) 0 18px, var(--bf-ink) 18px 36px); }
.bf-inner { padding-block: 40px 48px; display: grid; gap: 32px; }
.bf-head { display: grid; gap: 18px 40px; align-items: end; }
@media (min-width: 900px) { .bf-head { grid-template-columns: auto 1fr; } }
.bf-title { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: -.02em; line-height: .86; font-size: clamp(3.4rem, 11vw, 8.5rem); color: var(--bf-amber); }
.bf-side { display: grid; gap: 10px; max-width: 46ch; padding-bottom: 6px; }
.bf-ends { display: inline-block; justify-self: start; margin: 0; font: 600 .95rem var(--mono); color: var(--bf-ink); background: var(--bf-amber); padding: 7px 12px; border-radius: var(--radius-s); }
.bf-lede { margin: 0; font-size: 1.12rem; color: #d7e1ea; }
.bf-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (min-width: 1100px) { .bf-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 400px) { .bf-grid { grid-template-columns: 1fr; } }
.bf-card { background: var(--panel); border: 2px solid var(--bf-amber); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.bf-img { background: var(--tile); }
.bf-img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.bf-featured, .bf-grid.bf-featured { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 400px) { .bf-featured { grid-template-columns: 1fr; } }
.bf-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bf-body h3 { margin: 0; font-size: 1.25rem; }
.bf-brand { margin: 0; font: 600 .82rem var(--mono); color: var(--bf-amber); }
.bf-note { margin: 0; color: var(--muted); font-size: .97rem; }
.bf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.bf-actions .code-tag { font-size: 1.1rem; padding: 12px 14px 12px 20px; }
.bf-btn { background: var(--volt); border-color: var(--volt); color: var(--volt-ink); }
.bf-btn:hover { background: #8cefff; border-color: #8cefff; color: var(--volt-ink); }
.bf-deal { display: inline-block; font: 700 1.05rem var(--display); color: var(--bf-ink); background: var(--bf-amber); padding: 11px 14px; border-radius: var(--radius-s); }
.bf-until { margin: 0; font: 500 .8rem var(--mono); color: var(--muted); }
.bf-strip { background: var(--bf-amber); color: var(--bf-ink); }
.bf-strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-block: 11px; font-size: .97rem; }
.bf-strip strong { font-family: var(--display); font-stretch: 120%; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.bf-strip-link { color: var(--bf-ink); font-weight: 700; margin-left: auto; }
.bf-strip-link:hover { color: var(--bf-ink); text-decoration-thickness: 2px; }
.hidden { display: none !important; }

/* Spotlight: featured product breakdown on /start */
.spot { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--line); }
.spot-inner { padding-block: 44px 48px; display: grid; gap: 26px; }
.spot-head { display: grid; gap: 10px; max-width: 70ch; }
.spot-eyebrow { margin: 0; font: 600 .82rem var(--mono); color: var(--volt); text-transform: uppercase; letter-spacing: .06em; }
.spot-title { margin: 0; }
.spot-lede { margin: 0; color: var(--muted); font-size: 1.05rem; }
.spot-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 400px) { .spot-grid { grid-template-columns: 1fr; } }
.spot-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.spot-img { position: relative; background: var(--tile); }
.spot-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.spot-tag { position: absolute; left: 12px; top: 12px; font: 600 .75rem var(--mono); background: rgba(7, 17, 29, .85); color: var(--sun); border: 1px solid rgba(255, 180, 35, .5); padding: 5px 9px; border-radius: 999px; }
.spot-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.spot-body h3 { margin: 0; font-size: 1.25rem; }
.spot-brand { margin: 0; font: 600 .8rem var(--mono); color: var(--muted); }
.spot-price { margin: 0; font: 600 1rem var(--mono); color: var(--volt); }
.spot-note { margin: 0; color: var(--muted); font-size: .96rem; }
.spot-actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.spot-stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
@media (min-width: 760px) { .spot-stats { grid-template-columns: repeat(3, 1fr); } }
.spot-stat { background: var(--panel); padding: 18px 20px; display: grid; gap: 4px; }
.spot-stat strong { font: 800 1.7rem var(--display); color: var(--text); }
.spot-stat span { color: var(--muted); font-size: .95rem; }
.spot-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.spot-sub { font: 500 .88rem var(--mono); color: var(--muted); }
.spot-fine { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--muted); }
.spot-strip { background: var(--panel); border-bottom: 1px solid var(--line); }
.spot-strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-block: 10px; font-size: .95rem; }
.spot-strip-link { font-weight: 700; }
/* Four featured deals: show them 2 × 2 instead of 3 + 1 */
@media (min-width: 760px) { .bf-grid.bf-featured:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
