/* ═══════════════════════════════════════════════════════════
   base.css  —  Reset · Variables · Typography · Utilities
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Colours (PaphTech dark theme) ─────────────────────── */
  --bg:         #102030;
  --surface:    #0d1a27;
  --card:       #0f2030;
  --border:     rgba(255,255,255,.07);
  --border-hov: rgba(255,255,255,.14);
  --accent:     #1fe8f7;
  --accent-hov: #00b8c5;
  --accent2:    rgb(0, 174, 255);
  --warn:       #ff5c5c;
  --text:       #eef0f4;
  --muted:      #94afb1;

  /* ── Typography ─────────────────────────────────────────── */
  --font-h: "Montserrat", "Poppins", "Avenir Next", sans-serif;
  --font-b: "Inter", sans-serif;

  /* ── Layout ─────────────────────────────────────────────── */
  --nav-h:       68px;
  --section-pad: 100px;
  --container:   1160px;
  --gutter:      32px;

  /* ── Shape ──────────────────────────────────────────────── */
  --radius:    14px;
  --radius-sm:  8px;

  /* ── Motion ─────────────────────────────────────────────── */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-b);
  font-size:   16px;
  line-height: 1.65;
  overflow-x:  hidden;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; height: auto; }
ul, ol     { list-style: none; }
a          { color: inherit; text-decoration: none; transition: color .2s; }
button     { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Noise texture ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: .35;
}

/* ── Container ──────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin:    0 auto;
  padding:   0 var(--gutter);
  width:     100%;
}

/* ── Section helpers ────────────────────────────────────── */
section { position: relative; z-index: 2; }
.section--bg-surface { background: var(--surface); }

/* ── Section header ─────────────────────────────────────── */
.section-header         { margin-bottom: 56px; }
.section-header--center { text-align: center; }
.section-header--center .section-sub { margin-inline: auto; }

/* ── Typography atoms ───────────────────────────────────── */
.section-tag {
  display:        inline-block;
  font-size:      .68rem;
  font-weight:    700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  12px;
}

.section-h {
  font-family:    var(--font-h);
  font-size:      clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight:    800;
  line-height:    1.1;
  letter-spacing: -.025em;
}

.section-sub {
  font-size:   1rem;
  font-weight: 300;
  color:       var(--muted);
  margin-top:  14px;
  line-height: 1.75;
  max-width:   520px;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }

/* ── Scroll reveal ──────────────────────────────────────── */
.reveal {
  opacity:   0;
  transform: translateY(24px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Custom cursor (hidden) ─────────────────────────────── */
#cursor-dot, #cursor-ring { display: none; }

/* ── Screen-reader helper ───────────────────────────────── */
.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;
}

/* ── Keyframe animations ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%,-50%) scale(1);    opacity: .6; }
  50%       { transform: translate(-50%,-50%) scale(1.12); opacity: 1; }
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Error pages ────────────────────────────────────────── */
.error-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: var(--nav-h) 24px 60px;
}
.error-page__content { position: relative; z-index: 2; }
.error-page__code {
  font-family: var(--font-h); font-size: clamp(5rem,15vw,12rem);
  font-weight: 800; letter-spacing: -.05em;
  color: var(--accent); opacity: .1; line-height: 1;
  margin-bottom: -24px; display: block;
}
.error-page__h   { font-family: var(--font-h); font-size: clamp(1.8rem,4vw,3rem); font-weight:800; letter-spacing:-.025em; }
.error-page__sub { color: var(--muted); margin-top: 14px; font-size: 1rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad: 72px; --gutter: 20px; }
  body  { cursor: auto; }
}
