/* =========================================================================
   Luke Huxley — Design Tokens
   Single source of truth for color, typography, spacing, radius, shadow,
   and motion. Import this file in every surface that uses the brand.
   ========================================================================= */

/* Webfonts — Google Fonts substitutes. Replace with self-hosted .woff2
   under /fonts when real type files are available. See README → Caveats. */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Lato:wght@300;400;700;900&display=swap');

/* Self-hosted Share Tech — title typeface. */
@font-face {
  font-family: 'Share Tech';
  src: url('fonts/ShareTech-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Self-hosted Source Code Pro — variable font, all weights from one file. */
@font-face {
  font-family: 'Source Code Pro';
  src: url('fonts/SourceCodePro-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --------------------------------------------------------------------- */
  /* COLOR — Primary (Teal) ramp                                           */
  /* --------------------------------------------------------------------- */
  --ink-black:        #001824;
  --dark-teal:        #003543;
  --teal:             #007D86;
  --tropical-teal:    #00B5BA;
  --neon-ice:         #00FEF0;
  --azure-mist:       #effdfc;

  /* COLOR — Secondary (Orange) accent                                     */
  --coffee-bean:      #110101;
  --burnt-orange:     #BA4700;
  --cornsilk:         #FFF8DB;

  /* --------------------------------------------------------------------- */
  /* SEMANTIC color roles — use these in components, not the raw ramps     */
  /* --------------------------------------------------------------------- */
  --bg:               var(--azure-mist);          /* page background       */
  --bg-elevated:      #ffffff;                    /* cards, modals         */
  --bg-warm:          var(--cornsilk);            /* warm callout surface  */
  --bg-inverse:       var(--ink-black);           /* dark sections         */

  --fg:               var(--ink-black);           /* primary text          */
  --fg-muted:         color-mix(in oklab, var(--fg) 60%, transparent); /* secondary text        */
  --fg-subtle:        color-mix(in oklab, var(--fg) 40%, transparent); /* tertiary, meta        */
  --fg-inverse:       var(--azure-mist);          /* on dark               */

  --accent:           var(--teal);                /* primary brand accent  */
  --accent-hover:     var(--tropical-teal);
  --accent-press:     var(--dark-teal);
  --accent-fg:        #ffffff;                    /* fg on accent fills    */

  --warm-accent:      var(--burnt-orange);        /* secondary accent      */
  --warm-accent-fg:   #ffffff;

  --border:           color-mix(in oklab, var(--ink-black) 10%, transparent);
  --border-strong:    color-mix(in oklab, var(--ink-black) 18%, transparent);
  --border-accent:    var(--tropical-teal);

  --highlight:        var(--neon-ice);            /* selection, marker     */
  --focus-ring:       color-mix(in oklab, var(--tropical-teal) 60%, transparent);

  --success:          #2f9e6b;
  --warning:          var(--burnt-orange);
  --danger:           #c0392b;

  /* --------------------------------------------------------------------- */
  /* TYPE — families                                                       */
  /* --------------------------------------------------------------------- */
  /* Title — display moments only (hero, marquee). Wide, technologist feel. */
  --font-title:       'Share Tech', 'Iowan Old Style', Georgia, serif;
  /* Headers — h1 through h4 in long-form contexts. */
  --font-display:     'Noto Serif', 'Iowan Old Style', Georgia, serif;
  /* Body — UI and prose. */
  --font-sans:        'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  /* Mono — code and technical primitives. */
  --font-mono:        'Source Code Pro', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* TYPE — sizes (modular, ratio ≈ 1.25)                                  */
  --fs-display:       64px;
  --fs-h1:            44px;
  --fs-h2:            32px;
  --fs-h3:            24px;
  --fs-h4:            20px;
  --fs-body:          17px;
  --fs-small:         14px;
  --fs-mono:          17px;

  /* TYPE — line heights                                                   */
  --lh-display:       1.05;
  --lh-heading:       1.18;
  --lh-body:          1.55;
  --lh-mono:          1.5;

  /* TYPE — letter spacing                                                 */
  --tracking-display: -0.02em;
  --tracking-heading: -0.015em;
  --tracking-body:    -0.005em;
  --tracking-eyebrow: 0.08em;

  /* TYPE — weights                                                        */
  --fw-regular:       400;
  --fw-medium:        500;
  --fw-semibold:      600;
  --fw-bold:          700;

  /* --------------------------------------------------------------------- */
  /* SPACING — 8pt grid with 4px half-step                                 */
  /* --------------------------------------------------------------------- */
  --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;
  --space-10: 128px;

  /* --------------------------------------------------------------------- */
  /* RADIUS                                                                */
  /* --------------------------------------------------------------------- */
  --radius-xs:    4px;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-pill:  999px;

  /* --------------------------------------------------------------------- */
  /* SHADOW — cool-tinted (teal-shifted, not pure black)                   */
  /* --------------------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(0, 24, 36, 0.06);
  --shadow-sm: 0 2px 6px rgba(0, 24, 36, 0.08), 0 1px 2px rgba(0, 24, 36, 0.06);
  --shadow-md: 0 8px 20px rgba(0, 24, 36, 0.10), 0 2px 6px rgba(0, 24, 36, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 24, 36, 0.14), 0 4px 10px rgba(0, 24, 36, 0.08);
  --shadow-glow-teal: 0 0 30px color-mix(in oklab, var(--tropical-teal) 8%, transparent);

  /* --------------------------------------------------------------------- */
  /* MOTION                                                                */
  /* --------------------------------------------------------------------- */
  --ease-out:   cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in:    cubic-bezier(0.6, 0, 0.8, 0.4);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);

  --dur-fast:    120ms;
  --dur-base:    180ms;
  --dur-slow:    320ms;
  --dur-reveal:  480ms;

  /* --------------------------------------------------------------------- */
  /* LAYOUT                                                                */
  /* --------------------------------------------------------------------- */
  --content-prose:   72ch;
  --content-product: 1120px;
  --header-height:   70px;
}

/* ===========================================================================
   ELEMENT-LEVEL DEFAULTS
   Applied to a host page when colors_and_type.css is loaded. UI-kit
   components opt in to these by inheriting from the page.
   =========================================================================== */

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
  font-weight: var(--fw-regular);
}

::selection {
  background: var(--neon-ice);
  color: var(--ink-black);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3);
  color: var(--fg);
  letter-spacing: var(--tracking-heading);
  line-height: var(--lh-heading);
  text-wrap: balance;
}

h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h1);
  letter-spacing: var(--tracking-display);
}

h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h2);
}

h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h3);
}

h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h4);
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
  max-width: var(--content-prose);
}

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--dur-base) var(--ease-out);
}

a:hover {
  background-size: 100% 1px;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
}

code {
  padding: 0.1em 0.35em;
  background: color-mix(in oklab, var(--teal) 8%, transparent);
  color: var(--dark-teal);
  border-radius: var(--radius-xs);
}

pre {
  margin: 0 0 var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--ink-black);
  color: var(--azure-mist);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

small, .text-small {
  font-size: var(--fs-small);
  color: var(--fg-muted);
}

.text-eyebrow {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.text-display, .text-title {
  font-family: var(--font-title);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  font-weight: var(--fw-regular);
  text-transform: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-6) 0;
}

/* Focus ring — applied globally so every interactive element gets the
   same considered, brand-tinted ring. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
