/* ==========================================================================
   SWARA — base layer (derived from home.css, the approved home)
   Reset · body gradient · typography · layout · reveal · bilingual (.i / .e)
   Values come from tokens.css (assets/tokens/swara-tokens.json).
   ========================================================================== */

:root { --radius: var(--radius-base); }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 110px;
}

/* Lenis (motion.js) writes scrollTop every frame. With native smooth scrolling still on,
   each write restarts the browser's own animation and the page waits ~0.6s, then jumps.
   These are Lenis' required styles (lenis.css), inlined. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-sans);
  background: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The home's fixed gradient, as its own composited layer. `background-attachment: fixed`
   forced a full-viewport repaint on every scroll frame (paint ×4–6 on integrated GPUs). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--gradient-hero);
  pointer-events: none;
  will-change: transform;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }

::selection { background: rgba(255, 122, 69, 0.3); color: var(--color-foreground); }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-background); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-hover); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Bilingual — same mechanism as home (.i = Indonesia, .e = English) ---------- */
html[data-lang="id"] .e { display: none !important; }
html[data-lang="en"] .i { display: none !important; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--layout-container);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}
.container--narrow { max-width: 880px; }

.section { position: relative; padding: var(--spacing-3xl) 0; }
.section--tight { padding: var(--spacing-2xl) 0; }
.section--flush-top { padding-top: 0; }
.section--panel { background: rgba(0, 0, 0, 0.2); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: 1fr; gap: var(--spacing-md); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.split { display: grid; grid-template-columns: 1fr; gap: var(--spacing-2xl); align-items: center; }
@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.2fr 0.8fr; }
  .split--wide-right { grid-template-columns: 0.8fr 1.2fr; }
  .split--top { align-items: start; }
}

.stack > * + * { margin-top: var(--stack, var(--spacing-md)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, var(--spacing-sm)); }

/* ---------- Typography (home scale) ---------- */
.title-hero {                                   /* home .hero-title-main */
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.title-xl {                                     /* home .newsletter-title */
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.title-lg {                                     /* home .career-title */
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}
.title-md { font-size: clamp(1.5rem, 3vw, 2rem); }
.title-sm { font-size: 1.375rem; }              /* home .card-title */
.title-xs { font-size: 1.125rem; }

.text-primary { color: var(--color-primary); }  /* home .newsletter-title-swara */

.subtitle {                                     /* home .hero-subtitle */
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--color-muted-foreground);
  max-width: var(--layout-measure);
}
.lead {                                         /* home .career-description */
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-muted-foreground);
  max-width: var(--layout-measure);
}
.body-text { font-size: 1rem; line-height: 1.75; color: var(--color-muted-foreground); max-width: 44rem; }
.body-text p + p { margin-top: 1em; }
.body-text strong { color: var(--color-foreground); font-weight: 700; }
.small { font-size: 0.875rem; color: var(--color-muted-foreground); }
.tiny { font-size: 0.75rem; color: var(--color-muted-foreground); }

.eyebrow {                                      /* Futur "THE STORY" label */
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.measure { max-width: var(--layout-measure); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Motion (home slideUp, reduced-motion safe) ---------- */
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.8; } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
