/* =============================================================================
   GLOBAL DESIGN SYSTEM — style.css  v2.0 (Production)
   Art Portfolio · Elara Voss
   ============================================================================= */

/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens — Dark Theme (default) ─────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Backgrounds */
  --color-bg:           hsl(220, 16%, 7%);
  --color-bg-surface:   hsl(220, 14%, 11%);
  --color-bg-card:      hsl(220, 12%, 15%);
  --color-bg-hover:     hsl(220, 12%, 19%);
  --color-bg-elevated:  hsl(220, 12%, 21%);

  /* Accent — warm amber/gold */
  --color-accent:       hsl(35, 82%, 56%);
  --color-accent-hover: hsl(35, 82%, 48%);
  --color-accent-muted: hsl(35, 40%, 16%);
  --color-accent-glow:  hsla(35, 82%, 56%, 0.25);

  /* Text */
  --color-text-1:       hsl(38, 25%, 93%);
  --color-text-2:       hsl(38, 12%, 66%);
  --color-text-3:       hsl(220,  8%, 44%);

  /* Borders */
  --color-border:       hsl(220, 12%, 19%);
  --color-border-hover: hsl(220, 12%, 30%);

  /* Skeleton / shimmer */
  --color-shimmer-1:    hsl(220, 12%, 14%);
  --color-shimmer-2:    hsl(220, 12%, 22%);

  /* Shadows */
  --shadow-sm:  0 1px  4px hsla(220, 30%, 2%, 0.50);
  --shadow-md:  0 4px 16px hsla(220, 30%, 2%, 0.55);
  --shadow-lg:  0 8px 32px hsla(220, 30%, 2%, 0.65);
  --shadow-xl:  0 20px 60px hsla(220, 30%, 2%, 0.75);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Type scale */
  --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:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.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-14:  3.5rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-28:  7rem;
  --space-36:  9rem;

  /* Layout */
  --container-max: 1280px;
  --nav-height:    72px;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Easing */
  --ease-out:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Transitions */
  --transition-fast:   150ms var(--ease-out);
  --transition-base:   250ms var(--ease-out);
  --transition-slow:   400ms var(--ease-out);
  --transition-spring: 500ms var(--ease-spring);
}

/* ── Design Tokens — Light Theme ──────────────────────────────────────────── */
[data-theme="light"] {
  color-scheme: light;

  --color-bg:           hsl(42, 30%, 97%);
  --color-bg-surface:   hsl(0,   0%, 100%);
  --color-bg-card:      hsl(42, 20%, 94%);
  --color-bg-hover:     hsl(42, 20%, 90%);
  --color-bg-elevated:  hsl(42, 20%, 88%);

  --color-accent:       hsl(35, 82%, 42%);
  --color-accent-hover: hsl(35, 82%, 35%);
  --color-accent-muted: hsl(35, 60%, 93%);
  --color-accent-glow:  hsla(35, 82%, 50%, 0.18);

  --color-text-1:       hsl(220, 20%, 12%);
  --color-text-2:       hsl(220, 10%, 38%);
  --color-text-3:       hsl(220,  8%, 58%);

  --color-border:       hsl(42, 20%, 86%);
  --color-border-hover: hsl(220, 10%, 70%);

  --color-shimmer-1:    hsl(42, 15%, 90%);
  --color-shimmer-2:    hsl(42, 15%, 97%);

  --shadow-sm:  0 1px  4px hsla(220, 20%, 60%, 0.15);
  --shadow-md:  0 4px 16px hsla(220, 20%, 60%, 0.15);
  --shadow-lg:  0 8px 32px hsla(220, 20%, 60%, 0.18);
  --shadow-xl:  0 20px 60px hsla(220, 20%, 60%, 0.22);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark light;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-1);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  transition:
    background-color var(--transition-slow),
    color var(--transition-slow);
}

/* Prevent flash of light theme before JS runs */
html:not([data-theme]) {
  --color-bg: hsl(220, 16%, 7%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

/* ── Accessibility: Focus Ring ─────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove outline on mouse click (keep for keyboard only) */
*:focus:not(:focus-visible) {
  outline: none;
}

/* ── Skip-to-content Link ──────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 9999;
  padding: 0.6rem 1.25rem;
  background: var(--color-accent);
  color: hsl(220, 16%, 7%);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  /* Hidden until focused */
  transform: translateY(-150%);
  opacity: 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  outline: 2px solid hsl(220, 16%, 7%);
  outline-offset: 2px;
}

/* ── Custom Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ── Text Selection ────────────────────────────────────────────────────────── */
::selection {
  background: var(--color-accent);
  color: hsl(220, 16%, 7%);
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 640px)  { .container { padding-inline: var(--space-8);  } }
@media (min-width: 1024px) { .container { padding-inline: var(--space-12); } }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}

.font-display { font-family: var(--font-display); }
.accent-text  { color: var(--color-accent); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97) translateY(0) !important;
}

.btn-primary {
  background: var(--color-accent);
  color: hsl(220, 16%, 7%);
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--color-accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-1);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: hsl(220, 16%, 7%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--color-accent-glow);
}

/* ── Section Headers ───────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 600;
  color: var(--color-text-1);
  line-height: 1.1;
  text-wrap: balance;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-2);
  max-width: 560px;
  margin: var(--space-4) auto 0;
  line-height: 1.7;
  text-wrap: balance;
}

.section-footer {
  text-align: center;
  margin-top: var(--space-12);
}

/* ── Page Hero (inner pages) ───────────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--color-accent-muted) 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.page-hero-eyebrow::before,
.page-hero-eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.6;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.page-hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
  text-wrap: balance;
}

/* ── Scroll-Reveal Animations ──────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── prefers-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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  [data-reveal].revealed {
    opacity: 1;
    transform: none;
  }
}

/* ── Page-load entry animation (opacity-only so body transform doesn't break position:fixed modals) ── */
@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body {
  animation: pageEnter 0.4s var(--ease-out) both;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}

@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2.5fr 1fr 1fr; } }

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.footer-tagline {
  color: var(--color-text-2);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 280px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-2);
  transition: all var(--transition-base);
}

.footer-social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-muted);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-1);
  margin-bottom: var(--space-5);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col ul a {
  color: var(--color-text-2);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-col ul a:hover {
  color: var(--color-accent);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-text-2);
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.footer-contact-item a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  color: var(--color-text-3);
  font-size: var(--text-xs);
}

/* ── Utilities ─────────────────────────────────────────────────────────────── */

/* Screen-reader only text */
.visually-hidden,
.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;
}

/* Scroll anchor offset so sticky nav doesn't cover headings */
.scroll-mt {
  scroll-margin-top: calc(var(--nav-height) + var(--space-4));
}
