/* ============================================================
   Matt Sung Design System
   colors_and_type.css — design tokens + base typography
   Source: moremodern/SITE_V11 src/styles/global.css
   ============================================================ */

/* ---------- @font-face ---------- */

@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Thin.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Light.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Book.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Bold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamNarrow';
  src: url('fonts/GothamNarrow-Bold.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */

:root {
  /* Colors — dark-first achromatic brand */
  --color-bg:              #0A0A0A;
  --color-bg-pure-black:   #000000;
  --color-surface:         #141414;
  --color-surface-hover:   #1A1A1A;
  --color-border:          rgba(255, 255, 255, 0.08);
  --color-text-primary:    #FFFFFF;
  --color-text-secondary:  rgba(255, 255, 255, 0.50);
  --color-text-tertiary:   rgba(255, 255, 255, 0.30);

  /* Secondary — color pops. Use sparingly against the achromatic core. */
  --color-accent-blue:     #007AFF;   /* links, focus, interactive */
  --color-accent-pink:     #F041FF;   /* highlight, emphasis */
  --color-accent-red:      #E63946;   /* alerts, guide lines */

  /* Project accents — use ONLY inside the respective case study */
  --color-accent-amazon:   #FF9900;
  --color-accent-google:   #4285F4;
  --color-accent-ibm:      #4A3AFF;
  --color-accent-samsung:  #1428A0;
  --color-accent-paypal:   #003087;

  /* Font families */
  --font-display: 'GothamNarrow', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'GothamNarrow', 'Arial Narrow', Arial, sans-serif;

  /* Type scale */
  --text-display-xl:  7.5rem;   /* 120px — hero name (home) */
  --text-display-lg:  4.5rem;   /* 72px — case study hero */
  --text-display-md:  3rem;     /* 48px — section headers */
  --text-heading-lg:  2rem;     /* 32px — subsection titles */
  --text-heading-md:  1.5rem;   /* 24px — card titles */
  --text-body-lg:     1.25rem;  /* 20px — lead paragraphs */
  --text-body-md:     1rem;     /* 16px — body copy */
  --text-body-sm:     0.875rem; /* 14px — captions */
  --text-label:       0.75rem;  /* 12px — tags, nav, metadata */

  /* Spacing */
  --space-xs:   0.5rem;   /*   8 */
  --space-sm:   1rem;     /*  16 */
  --space-md:   1.5rem;   /*  24 */
  --space-lg:   2.5rem;   /*  40 */
  --space-xl:   5rem;     /*  80 */
  --space-2xl:  7.5rem;   /* 120 */
  --space-3xl:  10rem;    /* 160 */

  /* Layout */
  --layout-max:          1440px;
  --layout-content:      680px;
  --layout-gutter:       24px;
  --layout-page-margin:  80px;
  --header-height:       64px;
  --section-space:       var(--space-3xl);
  --section-space-tight: var(--space-xl);

  /* Radii */
  --radius-hairline: 4px;
  --radius-card: 24px;

  /* Animation */
  --ease-standard:   cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --duration-fast:   250ms;
  --duration-normal: 500ms;
  --duration-slow:   700ms;
}

/* ---------- Semantic / element-level type ---------- */

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

h1 {                          /* Page title / display */
  font-size: var(--text-display-lg);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.01em;
}
h2 {                          /* Section header */
  font-size: var(--text-display-md);
  font-weight: 400;
  line-height: 1.1;
}
h3 {                          /* Subsection title */
  font-size: var(--text-heading-lg);
  font-weight: 500;
  line-height: 1.2;
}
h4 {                          /* Card title */
  font-size: var(--text-heading-md);
  font-weight: 500;
  line-height: 1.3;
}

p { margin: 0 0 1rem 0; }

/* ---------- Utility classes (mirror the prod site) ---------- */

.text-display-xl {
  font-family: var(--font-display);
  font-size: var(--text-display-xl);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.text-display-lg {
  font-family: var(--font-display);
  font-size: var(--text-display-lg);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.01em;
}
.text-display-md {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  font-weight: 400;
  line-height: 1.1;
}
.text-heading-lg {
  font-family: var(--font-display);
  font-size: var(--text-heading-lg);
  font-weight: 500;
  line-height: 1.2;
}
.text-heading-md {
  font-family: var(--font-display);
  font-size: var(--text-heading-md);
  font-weight: 500;
  line-height: 1.3;
}
.text-body-lg {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-weight: 400;
  line-height: 1.7;
}
.text-body-md {
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: 400;
  line-height: 1.6;
}
.text-body-sm {
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: 1.5;
}
.text-label {
  font-family: var(--font-display);
  font-size: var(--text-label);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Light mode override ---------- */

html[data-theme="light"] {
  --color-bg:             #FAFAFA;
  --color-bg-pure-black:  #FFFFFF;
  --color-surface:        #F0F0F0;
  --color-surface-hover:  #E8E8E8;
  --color-border:         rgba(0, 0, 0, 0.08);
  --color-text-primary:   #111111;
  --color-text-secondary: rgba(0, 0, 0, 0.65);
  --color-text-tertiary:  rgba(0, 0, 0, 0.57);
  color-scheme: light;
}
