/* ==========================================================================
   Apple Design Base Tokens & Foundations
   Strictly following Apple WWDC Design Guidelines
   ========================================================================== */

:root {
  /* System Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Apple Color System */
  --bg-canvas: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-elevated: #ffffff;
  --bg-subtle: #fbfbfd;
  --bg-translucent: rgba(255, 255, 255, 0.72);

  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #a1a1a6;
  --text-on-accent: #ffffff;

  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --accent-blue-active: #0062c4;
  --accent-blue-subtle: rgba(0, 113, 227, 0.08);

  --status-green: #34c759;
  --status-green-bg: rgba(52, 199, 89, 0.12);
  --status-amber: #ff9500;
  --status-amber-bg: rgba(255, 149, 0, 0.12);
  --status-red: #ff3b30;
  --status-red-bg: rgba(255, 59, 48, 0.12);

  /* Materials & Glass */
  --glass-blur: 24px;
  --glass-saturate: 180%;
  --border-light: rgba(255, 255, 255, 0.8);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 113, 227, 0.4);

  /* Shadows */
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-float: 0 12px 36px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Transitions & Physical Springs */
  --spring-snappy: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --spring-gentle: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-system);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.47059;
  letter-spacing: -0.003em;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  font-weight: 600;
  text-wrap: balance;
}

.display-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.028em;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.45;
  letter-spacing: -0.008em;
  max-width: 680px;
}

/* Links & Interactive Elements */
a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

button:active {
  transform: scale(0.98);
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Translucent Frosted Glass Card */
.apple-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-light);
  border-top: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--spring-snappy), transform var(--spring-snappy);
}

.apple-card:hover {
  box-shadow: var(--shadow-float);
}

/* Sleek Minimalist Scrollbar (Apple HIG Inspired) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.32);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent;
}
