/* ============================================
   BoxVolumeCalculator.com — base styles
   Design tokens, reset, typography
   ============================================ */

:root {
  /* Color palette */
  --bg: #f5f1e8;
  --bg-elevated: #ede5d3;
  --bg-card: #ffffff;
  --bg-inverse: #1a1a1a;
  --text: #1a1a1a;
  --text-inverse: #f5f1e8;
  --text-muted: #555555;
  --text-subtle: #888888;
  --border: #1a1a1a;
  --border-soft: #d4cab2;
  --accent: #a0501f;
  --error: #b3261e;
  --error-bg: #fff5f4;

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 820px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Typography utilities */
.display-font {
  font-family: var(--font-display);
  font-feature-settings: "ss01";
  letter-spacing: -0.02em;
}
.mono { font-family: var(--font-mono); }

.label-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(42px, 6vw, 74px); line-height: 1.02; }
h2 { font-size: clamp(34px, 4vw, 46px); line-height: 1.05; }
h3 { font-size: 24px; line-height: 1.2; }

p { line-height: 1.65; margin: 0 0 var(--space-4); }

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Section */
.section {
  padding: var(--space-9) 0;
}
.section-divided {
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
}
.section-elevated { background: var(--bg-elevated); }
.section-inverse { background: var(--bg-inverse); color: var(--text-inverse); }

/* Accessibility */
.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;
}

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