/* ===========================================
   coffeeprojects — design tokens + base
   Playful Pixel · Dark Roast · Amber Accents
   =========================================== */

:root {
  /* Backgrounds — espresso to cacao */
  --bg-0: #0B0706;        /* void / deepest */
  --bg-1: #120C09;        /* page bg */
  --bg-2: #1A1310;        /* elevated */
  --bg-3: #241812;        /* cards */
  --bg-4: #2E1F16;        /* hover */

  /* Amber / coffee accents */
  --amber:       #F5A742; /* primary */
  --amber-hi:    #FFC165; /* hover */
  --amber-deep:  #C7782A; /* pressed */
  --toast:       #FF6B35; /* hot accent */
  --crema:       #FFE8B5; /* light text accent */
  --latte:       #C7A17A; /* muted warm */

  /* Supporting */
  --mint:   #6EE7B7;      /* success / code green */
  --berry:  #E85D75;      /* error / playful pink */
  --sky:    #7CC5FF;      /* info / link */

  /* Text */
  --ink-0: #FFF7E8;       /* primary */
  --ink-1: #E8DCC8;       /* secondary */
  --ink-2: #A89584;       /* muted */
  --ink-3: #6B5D4F;       /* disabled */

  /* Borders */
  --line:      rgba(255, 232, 181, 0.08);
  --line-hi:   rgba(255, 232, 181, 0.16);
  --line-amber:rgba(245, 167, 66, 0.32);

  /* Fonts */
  --f-display: "Space Grotesk", -apple-system, sans-serif;
  --f-body:    "Space Grotesk", -apple-system, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;
  --f-pixel:   "Press Start 2P", monospace;

  /* Rhythm */
  --px: 4px;              /* pixel grid unit */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  /* Shadows */
  --shadow-amber: 0 0 0 1px rgba(245,167,66,.3), 0 20px 60px -15px rgba(245,167,66,.35);
  --shadow-pixel: 4px 4px 0 var(--bg-0);
  --shadow-pixel-amber: 6px 6px 0 var(--amber-deep);
  --shadow-soft:  0 30px 80px -30px rgba(0,0,0,.6);

  /* Timing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-1);
  color: var(--ink-0);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  /* subtle grain + vignette */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245,167,66,0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255,107,53,0.05), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,232,181,0.012) 3px 4px);
  min-height: 100vh;
}

::selection {
  background: var(--amber);
  color: var(--bg-0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 0;
  border: 2px solid var(--bg-1);
}
::-webkit-scrollbar-thumb:hover { background: var(--amber-deep); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink-0);
}

.eyebrow {
  font-family: var(--f-pixel);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--amber);
}

.mono { font-family: var(--f-mono); }
.pixel { font-family: var(--f-pixel); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

section {
  position: relative;
  padding: 140px 0;
}

.section-head {
  margin-bottom: 80px;
  max-width: 820px;
}
.section-head h2 {
  font-size: clamp(40px, 5.5vw, 72px);
  margin-top: 20px;
  text-wrap: balance;
}
.section-head h2 .accent { color: var(--amber); }
.section-head p {
  margin-top: 24px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 640px;
  text-wrap: pretty;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  transition: transform 200ms var(--ease-out), background 200ms, box-shadow 200ms;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--amber);
  color: var(--bg-0);
  box-shadow: var(--shadow-pixel-amber);
}
.btn--primary:hover {
  background: var(--amber-hi);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--amber-deep);
}
.btn--primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--amber-deep);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-0);
  border-color: var(--line-hi);
}
.btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn svg { width: 16px; height: 16px; }

/* ===== Cards (pixel-border) ===== */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 240ms, transform 240ms var(--ease-out), background 240ms;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--line-amber);
  transform: translateY(-4px);
  background: var(--bg-3);
}

/* ===== Pixel decorations ===== */
.pixel-dot {
  width: 4px;
  height: 4px;
  background: var(--amber);
  display: inline-block;
}
.pixel-divider {
  display: flex;
  gap: 4px;
  margin: 40px 0;
}
.pixel-divider span {
  width: 8px;
  height: 8px;
  background: var(--amber-deep);
}
.pixel-divider span:nth-child(odd) { background: var(--amber); }

/* Util */
.flex { display: flex; }
.grid { display: grid; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.text-amber { color: var(--amber); }
.text-muted { color: var(--ink-2); }

/* Hidden until animated */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Responsive */
@media (max-width: 768px) {
  section { padding: 80px 0; }
  .container { padding: 0 20px; }
  .section-head { margin-bottom: 48px; }
}
