/* =========================================================================
   Lake Erie Computers - dark, minimal, developer-shop theme.
   Near-black canvas, off-white type, mono labels, numbered sections,
   one restrained indigo accent, thin hairline borders. Tasteful motion.
   ========================================================================= */

:root {
  --bg: #08080a;
  --bg-2: #0e0e11;
  --bg-3: #131317;
  --panel: #101014;

  --text: #f5f5f6;
  --text-soft: #a6a6ae;
  --text-mute: #6a6a74;

  --line: #1c1c22;
  --line-2: #2a2a32;

  --accent: #8b8bf7;        /* restrained indigo - links, numbers, focus */
  --accent-soft: #6d6de0;
  --accent-tint: rgba(139, 139, 247, 0.12);

  --ok: #59c08a;
  --ok-tint: rgba(89, 192, 138, 0.12);
  --warn: #e0b25a;
  --warn-tint: rgba(224, 178, 90, 0.12);
  --danger: #e5776b;
  --danger-tint: rgba(229, 119, 107, 0.12);

  --radius: 8px;
  --radius-sm: 6px;

  --sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { line-height: 1.1; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }

::selection { background: var(--accent); color: #0b0b12; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #0b0b12; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 0; }

/* mono eyebrow / label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.eyebrow::before { content: ""; width: 14px; height: 1px; background: var(--accent); display: inline-block; }
.eyebrow .dot { display: none; }

/* ------------------------------- Buttons -------------------------------- */
.btn {
  --pad-y: 11px; --pad-x: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--sans); font-weight: 550; font-size: 0.94rem; line-height: 1.2;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: inherit; }
.btn-primary { background: #fafafa; color: #0a0a0c; border-color: #fafafa; }
.btn-primary:hover { background: #fff; color: #0a0a0c; }
.btn-outline, .btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-outline:hover, .btn-ghost:hover { border-color: #4a4a55; color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(229,119,107,0.4); }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); }
.btn-sm { --pad-y: 8px; --pad-x: 14px; font-size: 0.86rem; }
.btn-xs { --pad-y: 5px; --pad-x: 11px; font-size: 0.8rem; }
.btn-lg { --pad-y: 13px; --pad-x: 24px; font-size: 0.98rem; }
.btn-block { width: 100%; }
/* arrow that nudges on hover */
.btn .arw { transition: transform 0.2s ease; }
.btn:hover .arw { transform: translateX(3px); }

/* -------------------------------- Header -------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 8, 10, 0.72); backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { flex: none; }
.brand-text { font-weight: 700; font-size: 1.06rem; line-height: 1; color: var(--text); display: inline-flex; flex-direction: column; letter-spacing: -0.01em; }
.brand-sub { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-mute); font-weight: 500; margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { position: relative; padding: 8px 13px; font-weight: 450; font-size: 0.92rem; color: var(--text-soft); }
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; }
.site-nav a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease; }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--text); transition: 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --------------------------------- Hero --------------------------------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
/* subtle dotted grid, fades toward bottom */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 54px; align-items: center; padding: 72px 24px 64px; }
.hero-copy h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 18px; letter-spacing: -0.03em; }
.lede { font-size: 1.1rem; color: var(--text-soft); max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-contactline { font-size: 0.92rem; color: var(--text-mute); margin: 0; font-family: var(--mono); }
.hero-contactline a { color: var(--text-soft); }
.hero-contactline a:hover { color: var(--accent); }

/* Directory panel */
.directory { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.directory h2 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.directory a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 500; font-size: 0.95rem; }
.directory a:last-child { border-bottom: 0; }
.directory a span { font-family: var(--mono); font-weight: 400; font-size: 0.76rem; color: var(--text-mute); text-align: right; }
.directory a:hover { background: var(--bg-3); color: #fff; }
.directory a:hover span { color: var(--accent); }

/* --------------------------- Numbered sections -------------------------- */
.section { padding: 68px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: 34px; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sec-num { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.06em; display: block; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 6px; letter-spacing: -0.02em; }
.section-head p { color: var(--text-soft); margin: 0; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.card:hover { border-color: var(--line-2); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg-3); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-mute); }
.card-tag { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.03em; padding: 3px 8px; background: rgba(8,8,10,0.8); border: 1px solid var(--line-2); color: var(--text-soft); border-radius: 4px; backdrop-filter: blur(4px); }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 6px; }
.card-title { font-size: 1rem; margin: 0 0 10px; line-height: 1.35; font-weight: 550; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-price { font-family: var(--mono); font-size: 1.1rem; font-weight: 500; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-link { color: var(--accent); font-weight: 500; font-size: 0.88rem; margin-top: auto; }
.card-link:hover { color: #fff; }

.pill { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; padding: 2px 7px; border-radius: 4px; border: 1px solid transparent; }
.pill-out { background: var(--danger-tint); color: var(--danger); border-color: rgba(229,119,107,0.3); }
.pill-low { background: var(--warn-tint); color: var(--warn); border-color: rgba(224,178,90,0.3); }

.empty-state { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 44px 24px; text-align: center; color: var(--text-soft); background: var(--bg-2); }
.empty-state a { color: var(--accent); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { border-top: 1px solid var(--line-2); padding-top: 16px; }
.step-n { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); display: block; margin-bottom: 12px; }
.steps h3 { font-size: 1.02rem; margin-bottom: 5px; font-weight: 550; }
.steps p { color: var(--text-soft); font-size: 0.92rem; margin: 0; }

/* CTA band */
.cta-band { border-top: 1px solid var(--line); background: var(--bg-2); }
.cta-band h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 6px; letter-spacing: -0.02em; }
.cta-band p { color: var(--text-soft); margin: 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------ Page heads ------------------------------ */
.page-head { border-bottom: 1px solid var(--line); padding: 52px 0 40px; position: relative; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -0.03em; }
.page-sub { color: var(--text-soft); font-size: 1.04rem; max-width: 64ch; margin: 8px 0 0; }
.page-sub a { color: var(--accent); }

/* --------------------------------- Shop --------------------------------- */
.shop-layout { padding: 32px 24px 76px; }
.shop-filters { margin-bottom: 26px; }
.search-box { display: flex; max-width: 440px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--radius-sm); overflow: hidden; }
.search-box input { flex: 1; background: none; border: 0; color: var(--text); padding: 11px 14px; font-size: 0.94rem; outline: none; font-family: var(--sans); }
.search-box input::placeholder { color: var(--text-mute); }
.search-box button { background: var(--bg-3); border: 0; border-left: 1px solid var(--line); color: var(--text-soft); padding: 0 14px; cursor: pointer; }
.search-box button:hover { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); padding: 6px 13px; border: 1px solid var(--line-2); font-size: 0.82rem; color: var(--text-soft); background: var(--panel); border-radius: 999px; }
.chip:hover { border-color: #47475a; color: #fff; }
.chip-on { background: var(--text); color: #0a0a0c; border-color: var(--text); }
.chip-on:hover { color: #0a0a0c; }
.shop-cards { grid-template-columns: repeat(3, 1fr); }

/* Breadcrumb */
.breadcrumb { padding: 22px 24px 0; font-family: var(--mono); font-size: 0.8rem; color: var(--text-mute); }
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--text-soft); }

/* ------------------------------- Product -------------------------------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 26px 24px 76px; align-items: start; }
.gallery-main { border: 1px solid var(--line); background: var(--bg-3); aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { display: grid; place-items: center; color: var(--text-mute); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 68px; height: 68px; overflow: hidden; border: 1px solid var(--line-2); background: none; cursor: pointer; padding: 0; border-radius: var(--radius-sm); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-on { outline: 2px solid var(--accent); outline-offset: -1px; }

.product-cat { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.product-price { font-family: var(--mono); font-size: 1.7rem; font-weight: 500; margin: 4px 0 14px; }
.product-stock { font-size: 0.93rem; color: var(--text-soft); margin: 0 0 20px; }
.stock-in { color: var(--ok); font-weight: 500; }
.stock-out { color: var(--danger); font-weight: 500; }
.product-desc { color: var(--text-soft); margin-bottom: 22px; white-space: pre-line; }
.spec-block { margin-bottom: 22px; }
.spec-block h2 { font-size: 1.1rem; }
.spec-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.spec-list li { padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--text-soft); font-family: var(--mono); }
.spec-list li:last-child { border-bottom: 0; }
.spec-list li:nth-child(odd) { background: var(--bg-2); }

.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.meta-grid div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; background: var(--panel); }
.meta-grid span { display: block; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mute); margin-bottom: 4px; }
.meta-grid strong { font-size: 0.9rem; font-weight: 500; }

.buy-box { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.buy-note { font-size: 0.88rem; color: var(--text-mute); }
.buy-note a { color: var(--accent); }

/* ---------------------------- Documentation ----------------------------- */
.docs-wrap { max-width: 860px; padding: 34px 24px 76px; margin: 0 auto; }
.docs-toc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0 48px; }
.docs-toc a { display: block; padding: 15px 16px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 550; font-size: 0.94rem; border-radius: var(--radius); }
.docs-toc a small { display: block; font-weight: 400; color: var(--text-mute); font-size: 0.82rem; margin-top: 3px; font-family: var(--mono); }
.docs-toc a:hover { border-color: var(--line-2); color: #fff; background: var(--bg-3); }
.doc-block { padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-block h2 { font-size: 1.5rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.doc-block p, .doc-block li { color: var(--text-soft); }
.doc-block p { margin: 0 0 12px; }
.doc-ul, .doc-ol { padding-left: 22px; margin: 0 0 12px; }
.doc-ul li, .doc-ol li { margin-bottom: 9px; }
.doc-ol li strong, .doc-ul li strong { color: var(--text); }
.doc-note { font-size: 0.92rem; color: var(--text-soft); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 12px 16px; margin: 16px 0 0; background: var(--bg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.doc-note a { color: var(--accent); }
.doc-table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 0.92rem; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc-table th { background: var(--bg-2); font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); font-weight: 500; }
.doc-table td { color: var(--text-soft); }
.doc-block a { color: var(--accent); }
code { background: var(--bg-3); border: 1px solid var(--line); padding: 1px 6px; font-size: 0.85em; color: var(--accent); border-radius: 4px; font-family: var(--mono); }
.faq { border: 1px solid var(--line); background: var(--panel); padding: 2px 16px; margin-bottom: 10px; border-radius: var(--radius-sm); }
.faq summary { cursor: pointer; font-weight: 550; padding: 12px 0; color: var(--text); list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 10px; color: var(--accent); font-family: var(--mono); }
.faq[open] summary::after { content: "-"; }
.faq p { margin: 0 0 12px; }
.doc-backtop { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }

/* ------------------------------- Services ------------------------------- */
.service-list { display: flex; flex-direction: column; gap: 0; }
.service-row { display: grid; grid-template-columns: 60px 1fr; gap: 24px; align-items: start; padding: 30px 0; border-top: 1px solid var(--line); }
.service-tag { font-family: var(--mono); font-size: 0.9rem; color: var(--accent); padding-top: 4px; }
.service-body h2 { font-size: 1.35rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.service-body > p { color: var(--text-soft); margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; color: var(--text-soft); font-size: 0.93rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 5px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }

/* -------------------------------- Contact ------------------------------- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; padding: 40px 24px 76px; align-items: start; }
.contact-form { background: var(--panel); border: 1px solid var(--line); padding: 26px; border-radius: var(--radius); }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 0.86rem; font-weight: 500; margin-bottom: 6px; }
.field em { color: var(--text-mute); font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--text); font-family: var(--sans); font-size: 0.95rem; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-mute); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-fineprint { font-size: 0.82rem; color: var(--text-mute); margin: 12px 0 0; }
.form-fineprint a { color: var(--accent); }
.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-card { border: 1px solid var(--line); padding: 20px 22px; background: var(--panel); border-radius: var(--radius); }
.contact-card h2 { font-size: 1.1rem; }
.contact-line { display: flex; flex-direction: column; gap: 2px; margin: 0 0 13px; }
.contact-line:last-child { margin-bottom: 0; }
.contact-line span:first-child { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); }
.contact-line a { color: var(--accent); font-weight: 500; }
.contact-note { font-size: 0.92rem; color: var(--text-soft); margin: 0; }

/* -------------------------------- Legal --------------------------------- */
.legal-wrap { max-width: 780px; padding-top: 46px; padding-bottom: 72px; }
.legal-wrap h1 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); letter-spacing: -0.02em; }
.legal-updated { font-family: var(--mono); color: var(--text-mute); font-size: 0.86rem; margin: 0 0 28px; }
.legal-wrap h2 { font-size: 1.2rem; margin-top: 32px; }
.legal-wrap p, .legal-wrap li { color: var(--text-soft); }
.legal-wrap ul, .legal-wrap ol { padding-left: 22px; }
.legal-wrap li { margin-bottom: 8px; }
.legal-wrap a { color: var(--accent); }
.legal-crosslinks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.legal-crosslinks a { font-family: var(--mono); padding: 8px 14px; border: 1px solid var(--line-2); font-size: 0.82rem; color: var(--text-soft); border-radius: var(--radius-sm); }
.legal-crosslinks a:hover, .legal-crosslinks a.active { border-color: var(--accent); color: var(--accent); }

/* -------------------------------- Alerts -------------------------------- */
.alert { border-radius: var(--radius-sm); padding: 12px 15px; margin: 18px 0; font-size: 0.92rem; border: 1px solid; }
.alert-success { background: var(--ok-tint); border-color: rgba(89,192,138,0.35); color: #8fe0b4; }
.alert-error { background: var(--danger-tint); border-color: rgba(229,119,107,0.35); color: #f0a89f; }

/* -------------------------------- Footer -------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 50px 24px 34px; }
.footer-brandline { margin-bottom: 14px; }
.footer-blurb { color: var(--text-soft); font-size: 0.92rem; max-width: 34ch; margin: 0 0 14px; }
.footer-contact { font-size: 0.9rem; color: var(--text-soft); line-height: 1.9; font-family: var(--mono); }
.footer-contact a { color: var(--accent); }
.footer-col h4 { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); margin-bottom: 14px; font-weight: 500; }
.footer-col a { display: block; padding: 5px 0; color: var(--text-soft); font-size: 0.91rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: 0.84rem; color: var(--text-mute); font-family: var(--mono); }

/* -------------------------------- 404 ----------------------------------- */
.notfound { min-height: 54vh; display: grid; place-items: center; text-align: center; }
.nf-code { font-family: var(--mono); font-size: 3.6rem; font-weight: 500; margin: 0; color: var(--accent); }
.notfound h1 { font-size: 1.5rem; }
.notfound p { color: var(--text-soft); }
.notfound-inner { padding: 56px 24px; }

/* ===================== PORTAL (auth + admin) ============================= */
.portal-auth { display: grid; place-items: center; padding: 56px 20px; min-height: 100vh; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); padding: 34px 30px; border-radius: var(--radius); }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.02rem; color: var(--text); margin-bottom: 22px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-sub { color: var(--text-soft); font-size: 0.93rem; margin: 0 0 22px; }
.auth-sub a { color: var(--accent); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-mute); font-size: 0.8rem; cursor: pointer; font-weight: 500; font-family: var(--mono); }
.pw-toggle:hover { color: var(--accent); }
.auth-secure { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 0.78rem; color: var(--text-mute); font-family: var(--mono); }
.auth-secure svg { color: var(--ok); flex: none; }
.auth-back { display: inline-block; margin-top: 14px; font-size: 0.86rem; color: var(--text-soft); }
.auth-back:hover { color: var(--accent); }

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.portal-bar { background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.portal-bar-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 22px; }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 1rem; }
.portal-links { display: flex; gap: 2px; margin-right: auto; }
.portal-links a { font-size: 0.9rem; color: var(--text-soft); font-weight: 450; padding: 7px 12px; border-radius: var(--radius-sm); }
.portal-links a:hover { color: #fff; background: var(--bg-3); }
.portal-links a.on { color: #fff; background: var(--accent-tint); }
.portal-user { display: flex; align-items: center; gap: 14px; }
.portal-who { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.portal-who strong { font-size: 0.88rem; color: var(--text); font-weight: 550; }
.portal-who em { font-family: var(--mono); font-style: normal; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }

.portal-main { flex: 1; padding: 30px 0 64px; }
.portal-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.portal-narrow { max-width: 780px; }
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.portal-head h1 { font-size: 1.7rem; margin: 0; letter-spacing: -0.02em; }
.portal-head p { color: var(--text-soft); margin: 5px 0 0; }
.back-link { font-family: var(--mono); font-size: 0.84rem; color: var(--text-soft); display: inline-block; margin-bottom: 8px; }
.back-link:hover { color: var(--accent); }

.portal-help { border: 1px solid var(--line); background: var(--bg-2); border-left: 2px solid var(--accent); padding: 13px 16px; font-size: 0.91rem; color: var(--text-soft); margin-bottom: 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.portal-help strong { color: var(--text); }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { border: 1px solid var(--line); padding: 16px 18px; background: var(--panel); border-radius: var(--radius); }
.stat-n { display: block; font-family: var(--mono); font-size: 1.7rem; font-weight: 500; }
.stat-l { font-size: 0.82rem; color: var(--text-mute); }
.stat-warn .stat-n { color: var(--warn); }

.table-wrap { border: 1px solid var(--line); overflow: hidden; overflow-x: auto; background: var(--panel); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table thead th { text-align: left; padding: 11px 16px; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); background: var(--bg-2); border-bottom: 1px solid var(--line); font-weight: 500; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--bg-3); }
.ta-right { text-align: right; }
.cell-item { display: flex; align-items: center; gap: 12px; }
.cell-thumb { width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--line); flex: none; background: var(--bg-3); display: grid; place-items: center; border-radius: var(--radius-sm); }
.cell-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { color: var(--text-mute); }
.cell-title { display: block; font-weight: 550; color: var(--text); }
.cell-title:hover { color: var(--accent); }
.cell-sku { display: block; font-family: var(--mono); font-size: 0.76rem; color: var(--text-mute); }
.badge { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; padding: 3px 9px; border-radius: 4px; border: 1px solid transparent; }
.badge-live { background: var(--ok-tint); color: var(--ok); border-color: rgba(89,192,138,0.3); }
.badge-draft { background: var(--bg-3); color: var(--text-mute); border-color: var(--line-2); }
.inline-form { display: inline; }
.portal-empty { background: var(--panel); }
.portal-empty .btn { margin-top: 14px; }

/* Admin form */
.form-section { border: 1px solid var(--line); padding: 20px 22px; margin-bottom: 16px; background: var(--panel); border-radius: var(--radius); }
.form-section h2 { font-size: 1.02rem; margin-bottom: 4px; font-weight: 550; }
.form-section h2 .fnum { font-family: var(--mono); color: var(--accent); font-weight: 500; margin-right: 8px; font-size: 0.9em; }
.form-section .section-help { color: var(--text-mute); font-size: 0.87rem; margin: 0 0 16px; }
.form-section .field-row { grid-template-columns: repeat(3, 1fr); }
.req { color: var(--danger); }
.hint { color: var(--text-mute); font-style: normal; font-weight: 400; font-size: 0.84em; }
.field-label { font-size: 0.86rem; font-weight: 500; margin: 0 0 12px; }
.img-manage { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.img-keep { width: 116px; border: 1px solid var(--line-2); background: var(--bg-3); border-radius: var(--radius-sm); overflow: hidden; }
.img-keep img { width: 100%; height: 84px; object-fit: cover; }
.img-keep-check { display: flex; align-items: center; gap: 6px; padding: 6px 9px; font-size: 0.8rem; color: var(--text-soft); }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill { flex: 1; min-width: 220px; border: 1px solid var(--line-2); padding: 12px 14px; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; background: var(--bg-3); border-radius: var(--radius-sm); }
.radio-pill:hover { border-color: #47475a; }
.radio-pill span { font-weight: 550; font-size: 0.93rem; }
.radio-pill em { display: block; font-style: normal; font-weight: 400; color: var(--text-mute); font-size: 0.84rem; }
.radio-pill input { accent-color: var(--accent); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
input[type="file"] { padding: 9px; color: var(--text-soft); }
input[type="file"]::file-selector-button { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text); padding: 8px 14px; margin-right: 12px; cursor: pointer; font-family: var(--sans); border-radius: var(--radius-sm); }

/* ============================== MOTION =================================== */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-copy h1 { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) both; }
.hero-copy .lede { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) 0.08s both; }
.hero-copy .hero-actions { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) 0.16s both; }
.hero-copy .hero-contactline { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) 0.24s both; }
.hero .directory { animation: rise 0.7s cubic-bezier(0.2,0.7,0.2,1) 0.2s both; }
.page-head h1 { animation: rise 0.5s ease both; }
.page-head .page-sub { animation: rise 0.5s ease 0.08s both; }
.auth-card { animation: rise 0.5s ease both; }

.will-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s cubic-bezier(0.2,0.7,0.2,1), transform 0.6s cubic-bezier(0.2,0.7,0.2,1); }
.will-reveal.revealed { opacity: 1; transform: none; }

.btn { transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.card { transition: border-color 0.2s ease, transform 0.24s cubic-bezier(0.2,0.7,0.2,1); }
.card:hover { transform: translateY(-4px); }
.card-media img { transition: transform 0.5s cubic-bezier(0.2,0.7,0.2,1); }
.card:hover .card-media img { transform: scale(1.05); }

.directory a { transition: background 0.16s ease, color 0.16s ease, padding-left 0.16s ease; }
.directory a:hover { padding-left: 24px; }
.docs-toc a { transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease; }
.docs-toc a:hover { transform: translateY(-2px); }
.chip { transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease; }
.thumb { transition: outline-color 0.15s ease, transform 0.15s ease; }
.thumb:hover { transform: translateY(-2px); }
.stat { transition: border-color 0.18s ease, transform 0.18s ease; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.gallery-main img { transition: opacity 0.25s ease; }
.gallery-main img.fading { opacity: 0; }
.admin-table tbody tr { transition: background 0.15s ease; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.alert { animation: slideDown 0.35s ease both; }
details.faq[open] > p { animation: rise 0.3s ease both; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards, .shop-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; }
  .docs-toc { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .form-section .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-toggle { display: flex; }
  .site-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; background: rgba(8,8,10,0.98); border-bottom: 1px solid var(--line); padding: 10px 24px 20px; gap: 0; transform: translateY(-140%); transition: transform 0.22s ease; }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 13px 10px; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .cards, .shop-cards, .steps, .footer-grid, .meta-grid { grid-template-columns: 1fr; }
  .docs-toc { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section-head.row { flex-direction: column; align-items: flex-start; }
  .portal-links { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .will-reveal { opacity: 1 !important; transform: none !important; }
}
