/* ==========================================================================
   Ektocomms Design System — colors & type
   Modern newspace direction: deep navy base, terracotta accent, technical mono.
   Palette sourced from uploads/guia de estilo.pdf.
   ========================================================================== */

/* ---- Webfonts ----------------------------------------------------------- */
/* Brand fonts loaded from local /fonts. Space Mono and Lekton match the
   style guide (sources/guia_de_estilo.pdf) verbatim. Software Tester 7 is
   the third family named in the guide — reserved for decorative moments. */

@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Italic.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-BoldItalic.ttf') format('truetype');
  font-weight: 700; font-style: italic; font-display: swap;
}

@font-face {
  font-family: 'Lekton';
  src: url('fonts/Lekton-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lekton';
  src: url('fonts/Lekton-Italic.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Lekton';
  src: url('fonts/Lekton-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: 'Software Tester 7';
  src: url('fonts/software_tester_7.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* ---- Brand colors (verbatim from style guide) ----------------------- */
  --ek-void:        #16142B;  /* near-black purple — deep background */
  --ek-navy:        #162843;  /* primary navy — main bg */
  --ek-navy-2:      #132C53;  /* slightly brighter navy — card bg */
  --ek-steel:       #3C6C81;  /* blue-grey — secondary, borders */
  --ek-sand:        #AE9D81;  /* warm tan — neutral text on dark */
  --ek-terracotta:  #944135;  /* accent — CTA, highlights, links */
  --ek-signal:      #187A10;  /* live/ok green — status only */

  /* ---- Derived neutrals (for modern, cleaner surfaces) ---------------- */
  --ek-cream:       #F1EADA;  /* lightened sand — bg for inverted surfaces */
  --ek-paper:       #FAF6EC;  /* lightest — light mode bg */
  --ek-ink:         #0C0B1A;  /* almost-black — light mode text */
  --ek-line:        rgba(174, 157, 129, 0.18); /* hairline on dark */
  --ek-line-strong: rgba(174, 157, 129, 0.35);
  --ek-line-light:  rgba(22, 40, 67, 0.12);    /* hairline on light */

  /* ---- Semantic surface tokens ---------------------------------------- */
  /* Void is the default page bg (matches live ektocomms.space).
     Navy is a secondary "moment" surface — hero backdrop, alt sections.
     Navy-2 is raised (cards). */
  --bg:             var(--ek-void);
  --bg-raised:      var(--ek-navy-2);
  --bg-alt:         var(--ek-navy);
  --bg-deep:        var(--ek-void);
  --fg:             var(--ek-cream);
  --fg-muted:       var(--ek-sand);
  --fg-subtle:      rgba(174, 157, 129, 0.55);
  --accent:         var(--ek-terracotta);
  --accent-hover:   #A84B3E;     /* +8% L */
  --accent-press:   #7A362C;     /* -8% L */
  --border:         var(--ek-line);
  --border-strong:  var(--ek-line-strong);

  /* ---- Typography: families ------------------------------------------- */
  /* Space Mono — display, eyebrows, code, tags, numeric data.
     Lekton — body + headings (brand font, replaces the earlier Inter Tight substitute).
     Software Tester 7 — decorative / CRT moments only. */
  --font-mono:      'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-sans:      'Lekton', ui-monospace, Menlo, Consolas, monospace;
  --font-display:   var(--font-mono);
  --font-decorative:'Software Tester 7', 'Space Mono', monospace;

  /* ---- Typography: scale (modular, 1.250 Major Third) ---------------- */
  --fs-xs:    12px;
  --fs-sm:    14px;
  --fs-base:  16px;
  --fs-md:    18px;
  --fs-lg:    22px;
  --fs-xl:    28px;
  --fs-2xl:   36px;
  --fs-3xl:   48px;
  --fs-4xl:   64px;
  --fs-5xl:   88px;   /* hero display */

  /* line-heights */
  --lh-tight:   1.08;
  --lh-snug:    1.22;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  /* tracking */
  --ls-eyebrow: 0.14em;   /* TECHNICAL / MISSION labels */
  --ls-caps:    0.06em;
  --ls-display: -0.015em; /* tighten big mono */

  /* ---- Spacing scale (4px base) ---------------------------------------- */
  --s-0:   0;
  --s-1:   4px;
  --s-2:   8px;
  --s-3:   12px;
  --s-4:   16px;
  --s-5:   24px;
  --s-6:   32px;
  --s-7:   48px;
  --s-8:   64px;
  --s-9:   96px;
  --s-10:  128px;
  --s-11:  192px;

  /* ---- Radii — minimal. newspace tech likes square edges -------------- */
  --r-0:   0;
  --r-1:   2px;
  --r-2:   4px;
  --r-3:   8px;
  --r-full: 999px;

  /* ---- Elevation (inner glows + 1px borders; avoid heavy shadows) ----- */
  --elev-1:  0 1px 0 rgba(255,255,255,0.04) inset,
             0 1px 2px rgba(0,0,0,0.25);
  --elev-2:  0 1px 0 rgba(255,255,255,0.05) inset,
             0 6px 18px rgba(0,0,0,0.35);
  --elev-glow-accent: 0 0 0 1px rgba(148,65,53,0.45),
                      0 0 24px -6px rgba(148,65,53,0.55);

  /* ---- Motion --------------------------------------------------------- */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   120ms;
  --dur-base:   220ms;
  --dur-slow:   420ms;

  /* ---- Layout --------------------------------------------------------- */
  --container:      1240px;
  --container-wide: 1440px;
  --gutter:         clamp(16px, 4vw, 48px);
}

/* =============================================================
   Semantic element styles — apply when these classes are added.
   Base element selectors below are kept scoped via .ek-prose so
   this file never clobbers host pages.
   ============================================================= */

.ek-prose,
.ek-surface {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
}

/* ---- Display / headings -------------------------------------------------- */
.ek-display {                    /* hero 1-liners */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 88px);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--fg);
}

.ek-h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}
.ek-h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
}
.ek-h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}
.ek-h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
}

/* ---- Eyebrow — the defining small-caps mono label ----------------------- */
.ek-eyebrow {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.ek-eyebrow--accent { color: var(--accent); }
.ek-eyebrow--signal { color: var(--ek-signal); }

/* ---- Body --------------------------------------------------------------- */
.ek-lead {                       /* intro paragraphs */
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--fg);
  text-wrap: pretty;
  max-width: 62ch;
}
.ek-p {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg);
  text-wrap: pretty;
  max-width: 68ch;
}
.ek-small {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--fg-muted);
}

/* ---- Mono — specs, tags, numeric data ------------------------------- */
.ek-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0;
}
.ek-code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(174, 157, 129, 0.10);
  padding: 0.12em 0.4em;
  border-radius: var(--r-1);
  border: 1px solid var(--border);
}

/* ---- Links -------------------------------------------------------------- */
.ek-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
.ek-link:hover { color: var(--accent-hover); }

/* ---- Divider — the technical rule --------------------------------------- */
.ek-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s-6) 0;
}
.ek-hr--strong { border-top-color: var(--border-strong); }
