/* Kazım Erol Yegenaga — project design system.
   Warm paper palette, sharp cards, mono labels, serif-italic accents.
   Theme tokens, base typography, focus, CSS-only state (FAQ) and
   scroll-reveal motion. Everything else is Tailwind utilities.

   NOTE ON TOKEN NAMES: they keep their original roles.
   --ink is the page SURFACE, --bone is the PRIMARY TEXT colour. */

:root {
  /* Surfaces */
  --ink: #f2efe6;
  --panel: #e8e3d4;
  --panel-2: #faf8f1;

  /* Text */
  --bone: #141310;
  --muted: #6c6659;
  --muted-dim: #726c5e;

  /* Accent */
  --accent: #d9553b;
  --accent-2: #b4452c;
  --accent-soft: rgba(217, 85, 59, 0.12);

  /* Rules & depth */
  --line: rgba(20, 19, 16, 0.16);
  --line-2: rgba(20, 19, 16, 0.34);
  --glow: rgba(20, 19, 16, 0.05);
  --glow-color: rgba(20, 19, 16, 0.18);

  /* Dark and accent bands */
  --void: #1a1813;
  --on-void: #f2efe6;
  --on-void-muted: #a8a294;
  --line-on-void: rgba(242, 239, 230, 0.24);
  --on-accent: #141310;
  --on-accent-soft: #1c1611;

  /* Type */
  --font-display: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background-color: var(--accent);
  color: var(--ink);
}

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

/* Scroll reveal (JS adds .js and .is-in) */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s var(--ease-out) var(--d, 0ms),
    transform 0.7s var(--ease-out) var(--d, 0ms);
}

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

/* FAQ — native <details>, styled open state */
.faq > summary {
  list-style: none;
  cursor: pointer;
}

.faq > summary::-webkit-details-marker {
  display: none;
}

.faq .faq-plus {
  transition: transform 0.25s var(--ease-out);
}

.faq[open] .faq-plus {
  transform: rotate(45deg);
}

.faq[open] > summary .faq-q {
  color: var(--accent);
}

/* Sticky mobile CTA */
.sticky-cta {
  transform: translateY(115%);
  transition: transform 0.35s var(--ease-out);
}

.sticky-cta[data-visible="true"] {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sticky-cta,
  .faq .faq-plus {
    transition: none;
  }
}
