/* Shreyank Nanjappa - Design tokens & base (original site look & feel) */

:root {
  color-scheme: dark;

  /* Typography - matches original shreyank.com */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Quicksand", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: clamp(2.25rem, 5vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 6vw, 4.25rem);
  --text-hero: clamp(2.5rem, 8vw, 4.5rem);
  --text-section: clamp(2rem, 5vw, 3rem);

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.14em;

  /* 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;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --layout-max-width: 68rem;
  --container-narrow: 40rem;
  --container-default: 68rem;
  --container-wide: 80rem;
  --header-height: 4.5rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Borders */
  --border-width: 1px;
  --border-style: solid;
}

/* Dark theme - cinematic default (original site) */
html {
  --color-bg: #000000;
  --color-bg-elevated: #0a0a0a;
  --color-bg-subtle: #111111;
  --color-surface: #141414;
  --color-text: #cccccc;
  --color-text-muted: #b3b3b3;
  --color-text-subtle: #999999;
  --color-border: #2a2a2a;
  --color-border-strong: #444444;
  --color-accent: #c24517;
  --color-accent-hover: #e05a2a;
  --color-accent-muted: rgba(194, 69, 23, 0.15);
  --color-focus: #c24517;
  --color-hero-overlay: rgba(0, 0, 0, 0.52);
  --color-header-bg: rgba(0, 0, 0, 0.95);
  --color-panel-overlay: rgba(0, 0, 0, 0.81);
  /* Typography on dark / image-backed sections */
  --color-on-image-heading: var(--color-text);
  --color-on-image-lead: rgba(204, 204, 204, 0.85);
  --color-on-image-body: rgba(204, 204, 204, 0.88);
  --color-on-image-muted: rgba(204, 204, 204, 0.65);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --wave-opacity: 0;
}

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

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

@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;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease-out);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-hero);
  font-weight: 400;
}

h2 {
  font-size: var(--text-section);
  font-weight: 400;
}

h3 {
  font-size: var(--text-2xl);
}

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

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
  color: var(--color-text-muted);
}

main {
  display: block;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container-default));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - var(--gutter) * 2, var(--container-narrow));
  margin-inline: auto;
}

/* Body only - header/footer stay at fixed site width */
main .container {
  width: min(100% - var(--gutter) * 2, var(--layout-max-width));
}

main .container--narrow {
  width: min(100% - var(--gutter) * 2, calc(var(--layout-max-width) * 40 / 68));
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-3);
}

.section {
  padding-block: var(--space-16);
}

.section--tight {
  padding-block: var(--space-12);
}

.section__header {
  margin-bottom: var(--space-10);
  max-width: 42rem;
}

.section__header p {
  margin-bottom: 0;
}

.divider {
  border: none;
  border-top: var(--border-width) var(--border-style) var(--color-border);
  margin: var(--space-12) 0;
}

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

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--color-bg);
}

/* Sonic texture - restrained */
.hero__texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--wave-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='120' viewBox='0 0 1200 120'%3E%3Cpath fill='none' stroke='%23888' stroke-width='0.5' d='M0 60 Q150 20 300 60 T600 60 T900 60 T1200 60'/%3E%3Cpath fill='none' stroke='%23888' stroke-width='0.5' d='M0 70 Q150 100 300 70 T600 70 T900 70 T1200 70'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: 600px 60px;
}
