/* base.css — design tokens, reset, typography, background scene, utilities */
/* ==========================================================================
   Wathek Matmati — index.php
   Sharper, trust-forward design on top of the original cosmic background.
   ========================================================================== */

:root {
  --bg: #050505;
  --ink: #f7f9fc;
  --text: #cfd7e3;
  --muted: #97a0b0;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --gold: #e8c56a;
  --gold-soft: #f3d98f;
  --max: 1200px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1em;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
}

h3 {
  letter-spacing: -0.02em;
}

.container {
  width: min(var(--max), 92%);
  margin: auto;
}

/* ---- Background scene (unchanged structure) ---- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050505;
}

.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Full-page snowfall, reusing the portfolio snow canvases. */
.snow-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 38% at 50% 0%, rgba(34, 48, 74, 0.32), transparent 68%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(24, 32, 50, 0.35), transparent 70%),
    #050505;
}

.pf-snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.pf-snow--front {
  z-index: 0;
  opacity: 1;
}

.snow-scene .pf-snow {
  opacity: 0.55;
}

.snow-scene .pf-snow--front {
  opacity: 0.8;
}

#streaks {
  z-index: 3;
}

.wash, .vignette {
  position: absolute;
  inset: 0;
}

.wash {
  background: radial-gradient(ellipse at 50% 32%, rgba(18, 18, 20, 0.12), rgba(5, 5, 5, 0.55) 72%);
}

.vignette {
  background: radial-gradient(ellipse at 50% 42%, transparent 32%, rgba(0, 0, 0, 0.72));
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  padding-top: 52px;
}

/* ---- Accessibility ---- */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #14120b;
  padding: 10px 16px;
  z-index: 200;
  font-weight: 600;
  border-radius: 0 0 10px 0;
}

.skip:focus {
  left: 0;
  top: 0;
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

