/* =========================================
   ILLANES DESIGN SYSTEM v4.0.0 - Tokens
   ========================================= */

:root {
  /* === Colors: Base === */
  --bg: #f6f7f8;
  --paper: #ffffff;
  --ink: #0f1113;
  --muted: #4b5563;

  /* === Colors: Borders === */
  --line: #d5dbe3;
  --line-strong: #a9b3c2;

  /* === Colors: Grays === */
  --c-grey: #616e7c;
  --c-grey-dark: #3a424d;
  --c-charcoal: #111314;
  --c-silver: #cfd6de;

  /* === Colors: Semantic === */
  --c-green: #0b7e59;
  --c-blue: #3763e0;
  --c-amber: #d97706;
  --c-red: #c0352b;

  /* === Typography === */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Literata", Georgia, "Times New Roman", Times, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
               Consolas, "Liberation Mono", "Courier New", monospace;

  /* === Typography: Scale === */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;

  /* === Typography: Responsive === */
  --fs-h1: clamp(1.75rem, 3.2vw, 2.25rem);
  --fs-h2: clamp(1.5rem, 2.8vw, 1.875rem);
  --fs-h3: clamp(1.25rem, 2.4vw, 1.5rem);

  /* === Spacing === */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* === Layout === */
  --container: 1160px;
  --container-sm: 720px;
  --container-lg: 1440px;

  /* === Visual === */
  --radius: 0;
  --shadow: none;

  /* === Transitions === */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* === Dark Mode: System Preference === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;
    --paper: #111316;
    --ink: #e9eef2;
    --muted: #9aa4b2;
    --line: #2a2f37;
    --line-strong: #3a414c;
    --c-silver: #555e6b;
  }
}

/* === Dark Mode: Manual Override === */
html[data-theme="dark"] {
  --bg: #0c0d0f;
  --paper: #111316;
  --ink: #e9eef2;
  --muted: #9aa4b2;
  --line: #2a2f37;
  --line-strong: #3a414c;
  --c-silver: #555e6b;
}

html[data-theme="light"] {
  --bg: #f6f7f8;
  --paper: #ffffff;
  --ink: #0f1113;
  --muted: #4b5563;
  --line: #d5dbe3;
  --line-strong: #a9b3c2;
  --c-silver: #cfd6de;
}
/* =========================================
   ILLANES DESIGN SYSTEM v4.0.0 - Reset
   ========================================= */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--space-16);
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}
/* =========================================
   ILLANES DESIGN SYSTEM v4.0.0 - Typography
   ========================================= */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

h1 {
  font-size: var(--fs-h1);
  margin: var(--space-12) 0 var(--space-5);
}

h1:first-child {
  margin-top: 0;
}

h2 {
  font-size: var(--fs-h2);
  margin: var(--space-10) 0 var(--space-4);
}

h3 {
  font-size: var(--fs-h3);
  margin: var(--space-6) 0 var(--space-3);
  font-weight: 700;
}

h4 {
  font-size: var(--fs-xl);
  margin: var(--space-4) 0 var(--space-2);
  font-weight: 700;
}

h5 {
  font-size: var(--fs-lg);
  margin: var(--space-4) 0 var(--space-2);
  font-weight: 600;
}

h6 {
  font-size: var(--fs-base);
  margin: var(--space-3) 0 var(--space-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Paragraph */
p {
  margin: var(--space-3) 0;
}

/* Links */
a {
  color: var(--c-blue);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--ink);
}

a:visited {
  color: var(--c-blue);
}

/* Text modifiers */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

small, .small {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.text-sm {
  font-size: var(--fs-sm);
}

.text-lg {
  font-size: var(--fs-lg);
}

.text-xl {
  font-size: var(--fs-xl);
}

/* Code */
code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-4);
  overflow-x: auto;
  border-radius: 3px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* Lists */
ul, ol {
  padding-left: var(--space-6);
  margin: var(--space-3) 0;
}

li {
  margin: var(--space-2) 0;
}

/* Quotes */
blockquote {
  border-left: 4px solid var(--line-strong);
  padding-left: var(--space-4);
  margin: var(--space-5) 0;
  color: var(--muted);
  font-style: italic;
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-8) 0;
}
