/* CustomPC.tech design system
   One stylesheet for every public page. Light surfaces, dark hero bands,
   one accent. Navbar and footer chrome live in navbar.css. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #e3e3e8;
  --accent: #0b63e5;
  --accent-hover: #0852c4;
  --accent-soft: #e8f0fd;
  --ok: #1a7f37;
  --err: #c9322b;

  --dark: #0a0a0c;
  --dark-2: #161618;
  --dark-ink: #f5f5f7;
  --dark-ink-2: #a1a1a6;
  --dark-line: rgba(255, 255, 255, .12);

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
  --max: 1120px;
  --gutter: 22px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Aliases read by older scripts (review-system.js, admin panels) */
  --panel: var(--surface);
  --panel2: var(--bg);
  --border: var(--line);
  --muted: var(--ink-2);
  --accent1: var(--accent);
  --accent2: var(--accent);
  --space: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.022em; line-height: 1.1; font-weight: 700; }
p { margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 760px; }

/* Type */
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: 0; margin-bottom: 12px; }
.display { font-size: clamp(44px, 7.2vw, 84px); letter-spacing: -0.035em; line-height: 1.02; }
.title { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; }
.subtitle { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.lead { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.45; color: var(--ink-2); letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 30px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .1s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #e8e8ed; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn--outline-light:hover { background: #fff; color: var(--ink); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-row--center { justify-content: center; }

.link-arrow { font-weight: 500; white-space: nowrap; }
.link-arrow::after { content: " \203A"; font-size: 1.15em; line-height: 0; }

/* Sections */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--tight { padding: clamp(48px, 7vw, 80px) 0; }
.section--white { background: var(--surface); }
.section--dark { background: var(--dark); color: var(--dark-ink); }
.section--dark .lead, .section--dark .muted { color: var(--dark-ink-2); }
.section--dark .eyebrow { color: #6aa8ff; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 18px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: var(--dark-ink); background: var(--dark);
  padding: clamp(96px, 14vw, 168px) 0 clamp(72px, 10vw, 120px);
}
.hero__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 40%;
  opacity: .9;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 35%, rgba(10, 10, 12, .2), rgba(10, 10, 12, .75) 75%),
    linear-gradient(to bottom, rgba(10, 10, 12, .35), rgba(10, 10, 12, .1) 40%, var(--dark) 100%);
}
.hero__inner { position: relative; text-align: center; }
.hero .display { max-width: 15ch; margin: 0 auto; }
.hero .lead { color: #c7c7cc; max-width: 34ch; margin: 22px auto 0; }
.hero .btn-row { justify-content: center; margin-top: 36px; }
.hero-facts {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin: clamp(56px, 8vw, 88px) auto 0; max-width: 820px;
  background: var(--dark-line); border: 1px solid var(--dark-line); border-radius: var(--r-md); overflow: hidden;
}
.hero-facts div { background: rgba(22, 22, 24, .72); backdrop-filter: blur(12px); padding: 20px 18px; text-align: center; }
.hero-facts b { display: block; font-size: 28px; letter-spacing: -0.02em; color: #fff; }
.hero-facts span { font-size: 14px; color: var(--dark-ink-2); }
@media (max-width: 640px) {
  .hero-facts div { padding: 16px 8px; }
  .hero-facts b { font-size: 21px; white-space: nowrap; }
  .hero-facts span { font-size: 12px; display: block; line-height: 1.3; }
}

/* Page head for inner pages */
.page-head { padding: clamp(64px, 9vw, 104px) 0 clamp(36px, 5vw, 56px); text-align: center; }
.page-head .lead { max-width: 40ch; margin: 18px auto 0; }

/* Grids */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); }
.section--white .card { background: var(--bg); }
.card--shadow { box-shadow: var(--shadow); }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--ink-2); }

/* Steps */
.step__num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 16px; margin-bottom: 20px;
}
.section--dark .card { background: var(--dark-2); }
.section--dark .card p { color: var(--dark-ink-2); }
.section--dark .step__num { background: rgba(106, 168, 255, .14); color: #6aa8ff; }

/* Build tiles */
.tile {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg);
  overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .3s, transform .3s;
}
.tile:hover { text-decoration: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .1); transform: translateY(-2px); }
.tile__media { background: #fff; height: 260px; display: grid; place-items: center; padding: 28px 28px 8px; }
.tile__media img { max-height: 100%; width: auto; object-fit: contain; transition: transform .5s ease; }
.tile:hover .tile__media img { transform: scale(1.04); }
.tile__body { padding: 8px 28px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile__kicker { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: none; }
.tile__title { font-size: 22px; letter-spacing: -0.02em; }
.tile__desc { color: var(--ink-2); font-size: 16px; }
.tile__foot { margin-top: auto; padding-top: 14px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 16px; }
.section--white .tile { background: var(--bg); }
.section--white .tile__media { background: #fff; margin: 10px 10px 0; border-radius: calc(var(--r-lg) - 8px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split--form { grid-template-columns: .8fr 1.35fr; gap: clamp(32px, 5vw, 64px); }
@media (max-width: 900px) { .split, .split--form { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.checklist li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b63e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checklist b { color: var(--ink); font-weight: 600; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; gap: 20px; } }
.field label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: var(--surface);
  border: 1.5px solid #d2d2d7; border-radius: 14px; padding: 18px 18px; min-height: 64px;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
.form .btn { min-height: 64px; font-size: 19px; font-weight: 600; }
.field select {
  padding-right: 42px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 99, 229, .14); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.card .field input, .card .field select, .card .field textarea { background-color: var(--surface); }
.check { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.form-note { font-size: 15px; color: var(--ink-3); text-align: center; }
.form-card { padding: clamp(28px, 4.5vw, 56px); }
.alert { display: none; padding: 14px 16px; border-radius: var(--r-sm); font-size: 15px; }
.alert.ok { background: #e9f6ec; color: var(--ok); }
.alert.err { background: #fdeceb; color: var(--err); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-2); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .lead { max-width: 36ch; margin: 18px auto 0; }
.cta-band .btn-row { justify-content: center; margin-top: 32px; }

/* Spec table (build pages) */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; }
.spec-table th { width: 34%; font-weight: 600; color: var(--ink); padding-right: 16px; }
.spec-table td { color: var(--ink-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } }
.product__media { background: #fff; border-radius: var(--r-lg); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10%; }
.product__media img { max-height: 100%; width: auto; object-fit: contain; }
.product .lead { margin-top: 16px; }
.product .chips { margin-top: 24px; }
.product .btn-row { margin-top: 32px; }
.crumb { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.stat b { display: block; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 4px; }
.stat span { color: var(--ink-2); font-size: 15px; }

/* Prose (legal, story) */
.prose { font-size: 17px; line-height: 1.65; color: #333336; }
.prose h2 { font-size: 26px; margin: 48px 0 14px; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }

/* Reviews (markup from review-system.js) */
.reviews .review-card { background: var(--bg) !important; border: 0 !important; border-radius: var(--r-md) !important; padding: 18px !important; }
.star-rating .star { font-size: 26px; color: #c7c7cc; cursor: pointer; }
.star.filled, .star-rating .star.filled { color: #f5a623; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tile, .tile__media img { transition: none; }
}

/* Auth pages */
.auth-shell { min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 56px var(--gutter); }
.auth-card { width: 100%; max-width: 520px; background: var(--surface); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 44px); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 32px; text-align: center; }
.auth-card .lead { font-size: 17px; text-align: center; margin: 10px 0 28px; }
.auth-card .form { grid-template-columns: 1fr; gap: 16px; }
.auth-switch { text-align: center; font-size: 15px; color: var(--ink-2); margin-top: 22px; }
.field-validation { font-size: 13px; margin-top: 6px; }
.field-validation.hidden { display: none; }
.field-validation.error { color: var(--err); }
.field-validation.success { color: var(--ok); }
.field input.error { border-color: var(--err); }
.field input.valid { border-color: var(--ok); }
.password-strength { font-size: 13px; margin-top: 6px; color: var(--ink-2); }
.password-strength.weak { color: var(--err); }
.password-strength.medium { color: #b26a00; }
.password-strength.strong { color: var(--ok); }
.error-message, .success-message { display: none; font-size: 15px; padding: 12px 14px; border-radius: var(--r-sm); }
.error-message.show { display: block; background: #fdeceb; color: var(--err); }
.success-message.show { display: block; background: #e9f6ec; color: var(--ok); }
.btn.loading { opacity: .6; pointer-events: none; }
.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; }
.err-text { color: var(--err); font-size: 15px; min-height: 20px; }

/* Build requests: My builds + admin */
.auth-link { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--accent); cursor: pointer; justify-self: center; }
.auth-link:hover { text-decoration: underline; }
.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--r-md); padding: 20px 24px; margin-bottom: 24px;
}
.notice b { display: block; margin-bottom: 2px; }
.notice p { color: var(--ink-2); font-size: 15px; }
.req-list { display: grid; gap: 24px; }
.empty { text-align: center; padding: clamp(40px, 6vw, 72px) 24px; }
.empty h3 { font-size: 24px; }
.req-card { padding: clamp(24px, 3.5vw, 40px); }
.req-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.req-card__head h3 { font-size: 26px; margin-bottom: 6px; }
.req-card__body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; margin-top: 8px; }
.req-card__body h4 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; letter-spacing: 0; }
.req-card__msg { color: var(--ink-2); font-size: 16px; background: var(--bg); border-radius: var(--r-sm); padding: 16px 18px; }
@media (max-width: 760px) { .req-card__body { grid-template-columns: 1fr; gap: 28px; } }

.status-pill { flex-shrink: 0; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status-pill--new { background: #f0f0f3; color: var(--ink-2); }
.status-pill--shipped, .status-pill--delivered { background: #e9f6ec; color: var(--ok); }
.status-pill--closed { background: #f0f0f3; color: var(--ink-3); }

.track { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.track li { position: relative; padding-top: 18px; font-size: 13px; color: var(--ink-3); }
.track li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: #e3e3e8; }
.track li.is-done::before { background: var(--accent); }
.track li.is-current::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(11, 99, 229, .18); }
.track li.is-done, .track li.is-current { color: var(--ink); }
.track li.is-current { font-weight: 600; }
@media (max-width: 760px) {
  .track { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
}

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 22px 22px; border-left: 2px solid #e3e3e8; margin-left: 5px; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.timeline__meta { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.timeline p { color: var(--ink); font-size: 16px; }

/* Admin */
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.admin-bar .field { margin: 0; }
.admin-bar select, .admin-bar input { min-height: 48px; padding: 10px 14px; font-size: 16px; }
.admin-bar select { padding-right: 40px; }
.admin-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.admin-post { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: start; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.admin-post textarea { min-height: 64px !important; }
.admin-post .btn { min-height: 64px; }
@media (max-width: 760px) { .admin-post { grid-template-columns: 1fr; } }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f0f0f3; color: var(--ink-2); }
.tag--unread { background: #fff4e5; color: #b26a00; }
