/* ===========================================================
   WorkStay — design tokens & base
   Dark cinematic luxury OS for remote living
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* surfaces — soft black → charcoal */
  --bg:        #0a0a0c;
  --bg-2:      #0d0d11;
  --surface:   #131318;
  --surface-2: #18181f;
  --surface-3: #1e1e26;
  --charcoal:  #232330;

  /* lines / glass */
  --line:       rgba(255,255,255,0.07);
  --line-2:     rgba(255,255,255,0.12);
  --glass:      rgba(22,22,28,0.55);
  --glass-2:    rgba(30,30,40,0.5);

  /* text — warm whites */
  --text:      #f4f2ec;
  --text-dim:  rgba(244,242,236,0.62);
  --text-faint:rgba(244,242,236,0.40);
  --text-ghost:rgba(244,242,236,0.22);

  /* warm neutrals */
  --beige:     #c9bda8;
  --beige-dim: rgba(201,189,168,0.5);

  /* accents — violet primary, warm amber light */
  --violet:      #7c6cf0;
  --violet-soft: #9d90f6;
  --violet-deep: #5b4cd0;
  --violet-glow: rgba(124,108,240,0.40);
  --amber:       #e7a373;
  --amber-glow:  rgba(231,163,115,0.30);

  /* state */
  --good: #6fcf97;
  --warn: #e7c873;

  /* radii / shadow */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --shadow-soft: 0 30px 80px -30px rgba(0,0,0,0.8);
  --shadow-glow: 0 0 60px -10px var(--violet-glow);

  /* type */
  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, sans-serif;

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

#root { min-height: 100vh; }

::selection { background: var(--violet); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--charcoal); }

/* ---------- type helpers ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.italic { font-style: italic; }

/* display scale — cinematic */
.d1 { font-family: var(--serif); font-size: clamp(48px, 8.5vw, 132px); line-height: 0.95; letter-spacing: -0.02em; }
.d2 { font-family: var(--serif); font-size: clamp(38px, 5.5vw, 78px);  line-height: 1.0;  letter-spacing: -0.02em; }
.d3 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 50px);  line-height: 1.05; letter-spacing: -0.01em; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); width: 100%; }
.section { padding-block: clamp(80px, 12vw, 160px); }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--line-2);
}

/* ---------- grain overlay ---------- */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---------- focus ring ---------- */
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 2px; }

/* ---------- entrance animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes glowPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 0.9; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drawBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.rise { animation: rise 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.fade { animation: fade 1.2s ease both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
