/* =====================================================================
   Fast Gadget — style.css
   Foundations: design tokens, textures, layout, typography, header,
   hero, catalog shell, features, newsletter, footer.
   Component-level chrome (buttons, cards, cart) lives in components.css
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces — warm workshop leather & linen */
  --leather-900: #1d1611;
  --leather-800: #2a201a;
  --leather-700: #3a2c23;
  --linen-100:   #f6f1e7;
  --linen-200:   #ece4d6;
  --linen-300:   #ddd2be;

  /* Brushed metal */
  --metal-100: #ffffff;
  --metal-200: #eef1f4;
  --metal-300: #dbe0e6;
  --metal-400: #bcc4cd;
  --metal-500: #97a1ab;
  --metal-700: #5d666f;

  /* Accents */
  --amber-300: #ffd76a;
  --amber-400: #ffb020;
  --amber-500: #e78a00;
  --amber-600: #b96a00;
  --teal-400:  #2fd0c5;
  --teal-500:  #12a89e;
  --teal-600:  #0b7d76;
  --led-green: #46e28a;
  --led-red:   #ff5f56;

  /* Ink */
  --ink-900: #191410;
  --ink-700: #40372f;
  --ink-500: #6b5f54;
  --ink-300: #9b8e81;
  --ink-on-dark: #f3ece1;

  /* Elevation recipes (skeuomorphic = light from top-left) */
  --emboss: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 3px rgba(0,0,0,.10);
  --deboss: inset 0 2px 4px rgba(0,0,0,.28), inset 0 -1px 0 rgba(255,255,255,.65);
  --lift-1: 0 1px 2px rgba(30,20,10,.18), 0 3px 8px rgba(30,20,10,.12);
  --lift-2: 0 2px 4px rgba(30,20,10,.20), 0 10px 24px rgba(30,20,10,.18);
  --lift-3: 0 4px 8px rgba(30,20,10,.24), 0 22px 48px rgba(30,20,10,.26);

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shell: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* Fine grain noise, reused by every textured surface */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* ---------- 2. Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must win over any layout rule below. .modal, .admin
   and .checkout all set `display`, which otherwise beats the browser's
   built-in [hidden] and leaves the popups open with a dead close button. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.6 "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color: var(--ink-700);
  background-color: var(--linen-200);
  background-image:
    var(--noise),
    radial-gradient(1200px 600px at 50% -10%, #fffaf0 0%, rgba(255,250,240,0) 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.30) 0 2px, rgba(0,0,0,.015) 2px 4px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--ink-900); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
p  { margin: 0 0 1em; }
a  { color: var(--teal-600); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--amber-400); color: var(--ink-900); font-weight: 700;
  padding: 10px 16px; border-radius: 0 0 var(--radius-s) var(--radius-s);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
section.shell { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section-head { max-width: 46ch; margin-bottom: 1.8rem; }
.section-head p { color: var(--ink-500); margin: 0; }

/* ---------- 2b. Support strip : engraved plate above the header ---------- */
.supportbar {
  background-image: var(--noise), linear-gradient(180deg, #2a201a, #1a130f);
  background-blend-mode: soft-light, normal;
  color: #b9ab9b;
  font-size: .78rem;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.4);
}
.supportbar__inner {
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  align-items: center; justify-content: space-between;
  padding-block: .45rem;
}
.supportbar__note { margin: 0; letter-spacing: .02em; }
.supportbar__links { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.supportbar__links a {
  display: inline-flex; align-items: center; gap: .35rem;
  color: #cbbfb0; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.supportbar__links a:hover { color: var(--amber-300); }
.supportbar__admin {
  padding: .1rem .55rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

/* ---------- 3. Header : brushed aluminium bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background-image:
    var(--noise),
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1px, rgba(0,0,0,.05) 1px 3px),
    linear-gradient(180deg, #fdfdfe 0%, #e7ebef 42%, #cfd6dd 58%, #eef1f4 100%);
  background-blend-mode: soft-light, overlay, normal;
  border-bottom: 1px solid #a9b2bb;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 6px 18px rgba(20,15,10,.22);
}
.topbar__screws { position: absolute; inset: 0; pointer-events: none; }
.screw {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #b9c1c9 55%, #7d868f 100%);
  box-shadow: inset 0 -1px 1px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.7);
}
.screw::after {
  content: ""; position: absolute; inset: 2px 1px; border-top: 1.5px solid rgba(0,0,0,.45);
  transform: rotate(28deg); transform-origin: center;
}
.screw:nth-child(1) { left: 10px;  top: 10px; }
.screw:nth-child(2) { right: 10px; top: 10px; }
.screw:nth-child(3) { left: 10px;  bottom: 10px; }
.screw:nth-child(4) { right: 10px; bottom: 10px; }

.topbar__inner {
  display: flex; align-items: center; gap: 1rem;
  padding-block: .7rem;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand__bolt {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(180deg, #3b3128, #221a13);
  box-shadow: var(--lift-1), inset 0 1px 0 rgba(255,255,255,.18);
}
.brand__bolt svg { filter: drop-shadow(0 0 5px rgba(255,176,32,.75)); }
.brand__text { display: grid; line-height: 1; }
.brand__text strong, .brand__text em {
  font-size: 1.32rem; font-weight: 800; letter-spacing: .04em; font-style: normal;
}
.brand__text strong { color: var(--ink-900); }
.brand__text em {
  color: var(--amber-600);
  background: linear-gradient(180deg, #ffc23c, #b96a00);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand__text > * { display: inline; }
.brand__text small {
  display: block; margin-top: 3px; font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-300);
}

/* Inset search well */
.searchbox {
  flex: 1 1 320px; min-width: 0; position: relative;
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .8rem; border-radius: 999px;
  background: linear-gradient(180deg, #e2e7ec, #fbfcfd);
  border: 1px solid #b4bcc4;
  box-shadow: var(--deboss);
}
.searchbox__icon { color: var(--metal-700); flex: none; }
.searchbox input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: .95rem; color: var(--ink-900);
}
.searchbox input::placeholder { color: #9aa3ac; }
.searchbox:focus-within { border-color: var(--teal-500); box-shadow: var(--deboss), 0 0 0 3px rgba(47,208,197,.28); }
.searchbox__clear {
  border: 0; background: #b9c1c9; color: #fff; cursor: pointer;
  width: 20px; height: 20px; line-height: 18px; border-radius: 50%; font-size: 15px;
}
.searchbox__clear:hover { background: var(--metal-700); }

.topnav { display: flex; gap: .35rem; flex: none; }
.topnav a {
  padding: .45rem .8rem; border-radius: var(--radius-s); text-decoration: none;
  color: var(--ink-700); font-weight: 600; font-size: .92rem;
}
.topnav a:hover { background: rgba(255,255,255,.7); box-shadow: var(--emboss); color: var(--ink-900); }

/* ---------- 4. Hero ---------- */
.hero { padding-top: clamp(1.6rem, 4vw, 3rem); }
.hero__panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  border-radius: var(--radius-l);
  color: var(--ink-on-dark);
  background-image:
    var(--noise),
    radial-gradient(120% 120% at 12% 0%, #4a382b 0%, rgba(74,56,43,0) 55%),
    linear-gradient(160deg, #3a2c23 0%, #241b15 55%, #17110d 100%);
  background-blend-mode: soft-light, normal, normal;
  border: 1px solid #4a3a2d;
  box-shadow: var(--lift-3), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -20px 40px rgba(0,0,0,.35);
}
/* stitched leather edge */
.hero__panel::after {
  content: ""; position: absolute; inset: 12px; border-radius: 14px; pointer-events: none;
  border: 2px dashed rgba(255,215,106,.22);
}
.hero__gloss {
  position: absolute; inset: -40% -10% auto -10%; height: 78%;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0));
  transform: rotate(-6deg); pointer-events: none;
}
.hero__copy { position: relative; z-index: 1; }
.hero__copy h1 { color: #fff8ec; }
.hero__copy p { color: #cdbfae; max-width: 46ch; }
.chrome {
  background: linear-gradient(180deg, #fff8e2 0%, #ffd76a 45%, #d98d05 60%, #ffe9a8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.35));
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.8rem; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.hero__stats li { display: grid; }
.hero__stats b { font-size: 1.25rem; color: var(--amber-300); }
.hero__stats span { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #a8998a; }

.hero__stage { position: relative; display: grid; place-items: center; z-index: 1; }
.hero__device {
  width: min(320px, 78%); aspect-ratio: 1; padding: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.16), rgba(255,255,255,0) 62%),
              linear-gradient(180deg, #2f241c, #191310);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.6), 0 20px 40px rgba(0,0,0,.45);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero__pricetag {
  position: absolute; right: 2%; bottom: 6%;
  display: grid; place-items: center; padding: .7rem 1.1rem; rotate: -8deg;
  background: linear-gradient(180deg, #fff4d3, #ffc93c 55%, #e0930b);
  color: #4a2f00; border-radius: 10px;
  box-shadow: var(--lift-2), inset 0 1px 0 rgba(255,255,255,.9);
}
.hero__pricetag::before { /* punch hole */
  content: ""; position: absolute; left: 10px; top: 50%; translate: 0 -50%;
  width: 9px; height: 9px; border-radius: 50%;
  background: #3a2c23; box-shadow: inset 0 1px 2px rgba(0,0,0,.8);
}
.hero__pricetag span { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; margin-left: 14px; }
.hero__pricetag b { font-size: 1.5rem; margin-left: 14px; line-height: 1; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  color: #efe3d2;
}
.pill--live .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--led-green);
  box-shadow: 0 0 8px var(--led-green); animation: blink 2.4s infinite;
}
@keyframes blink { 0%,88%,100% { opacity: 1; } 92% { opacity: .35; } }

/* ---------- 5. Catalog toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .8rem;
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, #fffdf8, var(--linen-300));
  border: 1px solid #cbbfa9;
  box-shadow: var(--emboss), var(--lift-1);
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.result-count { margin: 1rem 0 1.2rem; font-size: .9rem; color: var(--ink-500); }

.grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}

.empty {
  text-align: center; padding: 3rem 1rem; color: var(--ink-500);
  border: 2px dashed #c9bda8; border-radius: var(--radius-m);
}
.empty strong { color: var(--ink-900); font-size: 1.1rem; }

/* ---------- 6. Features ---------- */
.feature-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.feature {
  padding: 1.4rem;
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, #fffdf9, #efe7d8);
  border: 1px solid #d5c9b3;
  box-shadow: var(--emboss), var(--lift-1);
}
.feature h3 { font-size: 1.03rem; margin-bottom: .3rem; }
.feature p { margin: 0; font-size: .9rem; color: var(--ink-500); }
.feature__badge {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: .9rem;
  border-radius: 14px; color: #23303a;
  background: linear-gradient(180deg, #ffffff, #d7dee5 60%, #b7c1cb);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(0,0,0,.18), var(--lift-1);
}

/* ---------- 7. Newsletter ---------- */
.newsletter {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--radius-l);
  color: var(--ink-on-dark);
  background-image: var(--noise), linear-gradient(150deg, #0e5f5a, #0b3d3a 60%, #08302e);
  background-blend-mode: soft-light, normal;
  border: 1px solid #12706a;
  box-shadow: var(--lift-2), inset 0 1px 0 rgba(255,255,255,.14);
}
.newsletter h2 { color: #eafbf8; margin-bottom: .25rem; }
.newsletter p { margin: 0; color: #a8ccc8; max-width: 46ch; }
.newsletter__form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter__form input {
  min-width: 240px; padding: .8rem 1rem; border-radius: 999px;
  border: 1px solid #0a4a46; background: linear-gradient(180deg, #072a28, #0c3b38);
  color: #eafbf8; box-shadow: var(--deboss);
}
.newsletter__form input::placeholder { color: #6f9b97; }
.newsletter__form input:focus { outline: none; box-shadow: var(--deboss), 0 0 0 3px rgba(47,208,197,.35); }

/* ---------- 8. Footer ---------- */
.footer {
  margin-top: 2rem; color: #cbbfb0;
  background-image: var(--noise), linear-gradient(180deg, #2a201a, #14100c);
  background-blend-mode: soft-light, normal;
  border-top: 3px solid #4a3a2d;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.06);
}
.footer__inner { padding-block: 2.2rem; display: grid; gap: .9rem; justify-items: center; text-align: center; }
.footer__brand { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: .05em; }
.footer__brand strong { color: #fff; }
.footer__brand em { font-style: normal; color: var(--amber-400); }
.footer__pay-label {
  margin: .3rem 0 0; font-size: .68rem; letter-spacing: .22em;
  text-transform: uppercase; color: #7d7266;
}
.paybadges { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.paybadge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .7rem; border-radius: 8px;
  font-size: .74rem; color: #efe6da;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--lift-1);
}
.paybadge b {
  display: grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px;
  border-radius: 4px; font-size: .66rem; color: #fff;
  background: var(--pay, #5d666f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer nav a { color: #cbbfb0; text-decoration: none; font-size: .92rem; }
.footer nav a:hover { color: var(--amber-300); }
.footer__note { margin: 0; font-size: .8rem; color: #857a6e; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 900px) {
  .hero__panel { grid-template-columns: 1fr; }
  .hero__stage { order: -1; }
  .topnav { display: none; }
  .topbar__inner { flex-wrap: wrap; }
  .searchbox { order: 3; flex-basis: 100%; }
}
@media (max-width: 520px) {
  .brand__text small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.1rem; }
}

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