/* PIKKUPAI DESIGN SYSTEM — Single source of truth for tokens, reset, and typography */

/* === 1. TOKENS === */

:root {
  /* Backgrounds */
  --bg-page: #0F1116;
  --bg-surface: #151821;
  --bg-elevated: #1C1F2A;
  --bg-overlay: rgba(15,17,22,0.82);
  --bg-deep: #0B0D11;

  /* Text */
  --text-pri: #F5F6F8;
  --text-sec: #B6BCC8;
  --text-mut: #7D8597;
  --text-inv: #0F1116;

  /* Gold / Brand */
  --gold: #D6A84A;
  --gold-h: #E7B95C;
  --gold-hover: var(--gold-h);  /* alias — requirements spec uses --gold-hover */
  --gold-s: rgba(214,168,74,0.10);
  --gold-b: rgba(214,168,74,0.28);
  --gold-g: rgba(214,168,74,0.18);

  /* Borders */
  --border: #262A36;
  --border-s: #1E2230;

  /* Status */
  --ok: #2ECC71;
  --err: #E5484D;

  /* Typography */
  --f-d: 'Sora', sans-serif;
  --f-b: 'Plus Jakarta Sans', sans-serif;
  --f-m: 'JetBrains Mono', monospace;

  /* Radius */
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 20px;
}

/* === 2. BASE RESET === */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--f-b);
  background: var(--bg-page);
  color: var(--text-pri);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* === 3. LAYOUT UTILITIES === */

.ctr { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .ctr { padding: 0 20px; } }

/* === 4. TYPOGRAPHY SCALE === */

.t-display { font-family: var(--f-d); font-size: clamp(2.5rem, 5.2vw, 4rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; }
.t-h2 { font-family: var(--f-d); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; line-height: 1.1; }
.t-h3 { font-family: var(--f-d); font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.25; }
.t-label { font-family: var(--f-m); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.t-body { font-size: 1rem; line-height: 1.7; }
.t-small { font-size: 0.84rem; line-height: 1.6; }

/* === 5. SECTION LABEL === */

.slbl { font-family: var(--f-m); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 14px; }

/* === 6. BUTTONS === */
.bg, .bo, .bgh {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-s);
  font-weight: 600; font-size: 0.85rem; font-family: var(--f-b);
  border: none; cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
/* Primary gold */
.bg { background: var(--gold); color: var(--text-inv); }
.bg:hover { background: var(--gold-h); transform: translateY(-1px); }
/* Outline */
.bo { background: transparent; color: var(--gold); border: 1px solid var(--gold-b); }
.bo:hover { background: var(--gold-s); border-color: var(--gold); }
/* Ghost (NEW — does not exist in current codebase) */
.bgh { background: transparent; color: var(--text-sec); border: 1px solid var(--border); font-weight: 500; }
.bgh:hover { color: var(--text-pri); border-color: var(--text-mut); background: rgba(255,255,255,0.03); }
.bg:focus-visible, .bo:focus-visible, .bgh:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

/* === 7. CARDS === */
.card-s, .card-e {
  border-radius: var(--r-m);
  padding: 28px 32px;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card-s { background: var(--bg-surface); }
.card-e { background: var(--bg-elevated); }
.card-s:hover, .card-e:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.card-gold-top::before {
  content: '';
  position: absolute; top: -1px; left: 24px; right: 24px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* === 8. FORM ELEMENTS === */
.fg { margin-bottom: 18px; }
.fl {
  display: block;
  font-family: var(--f-m); font-size: 0.68rem; font-weight: 600;
  color: var(--text-mut); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.fi {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border);
  border-radius: var(--r-m);
  color: var(--text-pri);
  font-size: 0.92rem; font-family: var(--f-b);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.fi:focus {
  border-color: var(--gold);
  background: var(--gold-s);
  box-shadow: 0 0 0 3px rgba(214,168,74,0.1);
}
.fi::placeholder { color: var(--text-mut); }

/* === 9. SECTION CONTAINERS === */
.sec { padding: 100px 0; }
.sec-sm { padding: 60px 0; }
.sec-lg { padding: 120px 0; }
.sec-surface { background: var(--bg-surface); border-top: 1px solid var(--border-s); border-bottom: 1px solid var(--border-s); }
@media (max-width: 768px) { .sec { padding: 64px 0; } .sec-sm { padding: 40px 0; } .sec-lg { padding: 80px 0; } }

/* === 10. REVEAL ANIMATION === */
.rv { opacity: 1; transform: none; transition: opacity 0.65s ease, transform 0.65s ease; }
.js-ready .rv { opacity: 0; transform: translateY(18px); }
.js-ready .rv.vis { opacity: 1; transform: none; }

/* === 11. KEYFRAME ANIMATIONS === */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes bwave { 0%, 100% { height: 6px; opacity: 0.3; } 50% { height: 100%; opacity: 0.8; } }

/* === 12. ACCESSIBILITY — REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .rv, .js-ready .rv, .js-ready .rv.vis {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* === 13. ACCESSIBILITY — FOCUS, SKIP LINK, GLOBAL INTERACTIVE === */

/* Skip-to-content link */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--gold); color: var(--text-inv);
  padding: 8px 16px; border-radius: var(--r-s);
  font-weight: 600; font-size: 0.85rem;
  z-index: 200; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Global focus-visible for all links */
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Select elements */
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* === 14. NAVIGATION === */
:root { --nav-clearance: calc(64px + 16px + 24px); }
.nav {
  position: fixed; top: 16px; left: 16px; right: 16px; z-index: 100;
  height: 64px;
  background: var(--bg-overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--r-m);
}
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 100%;
          display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--f-d); font-weight: 800; font-size: 1.3rem;
        letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px;
        text-decoration: none; }
.logo b { color: var(--gold); }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.nav-lk { display: flex; align-items: center; gap: 28px; }
.nav-lk a { font-size: 0.88rem; color: var(--text-mut); font-weight: 500;
            transition: color 0.2s; text-decoration: none; }
.nav-lk a:hover, .nav-lk a.active { color: var(--text-pri); }
.nav-lk a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.mt { display: none; background: none; border: none; color: var(--text-pri);
      cursor: pointer; padding: 8px; border-radius: var(--r-s);
      min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.mt:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 768px) {
  .nav { top: 8px; left: 8px; right: 8px; }
  .nav-in { padding: 0 16px; }
  .nav-lk { display: none; }
  .nav-lk.open {
    display: flex; flex-direction: column;
    position: absolute; top: calc(64px + 8px); left: 0; right: 0;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--r-m); padding: 20px; gap: 16px;
  }
  .mt { display: inline-flex; }
}

/* === 16. RESPONSIVE — SMALL MOBILE (480px) === */
@media (max-width: 480px) {
  .ctr { padding: 0 16px; }
  .sec { padding: 52px 0; }
  .sec-lg { padding: 64px 0; }
  .t-display { font-size: 2rem; }
  .t-h2 { font-size: 1.5rem; }
}

/* === 15. FOOTER === */
.footer { background: var(--bg-deep); border-top: 1px solid var(--border-s); padding: 52px 0 32px; }
.ft-g { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 36px; }
.ft-brand .logo { margin-bottom: 12px; }
.ft-brand p { font-size: 0.8rem; color: var(--text-mut); max-width: 250px; line-height: 1.6;
              margin-bottom: 16px; }
.ft-contact { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ft-contact a { font-size: 0.82rem; color: var(--text-mut); transition: color 0.2s; text-decoration: none; }
.ft-contact a:hover { color: var(--gold); }
.ft-contact a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.ft-social { display: flex; gap: 12px; }
.ft-social a { display: flex; align-items: center; justify-content: center;
               width: 36px; height: 36px; border-radius: var(--r-s);
               border: 1px solid var(--border); color: var(--text-mut);
               transition: color 0.2s, border-color 0.2s, background-color 0.2s;
               text-decoration: none; }
.ft-social a:hover { color: var(--gold); border-color: var(--gold-b); background: var(--gold-s); }
.ft-social a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ft-col h4 { font-size: 0.76rem; font-weight: 600; text-transform: uppercase;
             letter-spacing: 0.08em; color: var(--text-sec); margin-bottom: 12px; }
.ft-col a { display: block; font-size: 0.84rem; color: var(--text-mut);
            padding: 3px 0; transition: color 0.2s; text-decoration: none; }
.ft-col a:hover { color: var(--gold); }
.ft-col a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.ft-bot { padding-top: 24px; border-top: 1px solid var(--border-s); text-align: center; }
.ft-bot p { font-size: 0.72rem; color: var(--text-sec); }
@media (max-width: 768px) { .ft-g { grid-template-columns: 1fr; gap: 24px; } }
