/* ============================================================
   Titan DigiStack — style.css
   Globals: tokens, reset, typography, utilities
   ============================================================ */

:root {
  /* Color tokens (per spec) */
  --color-bg-primary:     #0d1117;
  --color-bg-secondary:   #161b27;
  --color-bg-card:        #1c2333;
  --color-accent-primary: #00c8ff;
  --color-accent-hover:   #0099cc;
  --color-text-primary:   #ffffff;
  --color-text-secondary: #a0aec0;
  --color-text-muted:     #6b7280;
  --color-border:         #2d3748;
  --color-price:          #48bb78;
  --color-badge-new:      #f6ad55;
  --color-badge-sale:     #fc8181;

  /* Typography */
  --font-primary: 'Inter', 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;

  /* Radii / motion / shadow */
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --transition-speed: 0.25s ease;
  --shadow-card:      0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-elev:      0 10px 40px rgba(0, 0, 0, 0.45);

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(16px, 4vw, 32px);
  --header-height: 72px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }

body {
  font-family: var(--font-primary);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography scale */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
p  { color: var(--color-text-secondary); }

/* Focus styles — visible & accessible */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}
.eyebrow--accent { color: var(--color-accent-primary); }

.text-accent { color: var(--color-accent-primary); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Section heads */
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p  { max-width: 60ch; }
.section-head--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.link-arrow {
  color: var(--color-accent-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}
.link-arrow:hover { color: var(--color-accent-hover); }

/* Reveal-on-scroll initial state (JS toggles .is-visible) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
