/* ============================================================
   PC TECH — Άγγελος Γκάντζος, Θεσσαλονίκη
   base.css — design tokens, reset, typography, buttons
   Palette: deep blue field · red for action only · white · near-black
   ============================================================ */

:root {
  /* ---------- Blue: the brand field ---------- */
  --blue-950: #050D1F;
  --blue-900: #0A1B3D;
  --blue-850: #0C2149;
  --blue-800: #0F2650;
  --blue-700: #143163;
  --blue-600: #1B4FA8;
  --blue-500: #2563C9;
  --blue-400: #3B82F6;
  --blue-300: #7FB0FF;
  --blue-200: #B8D2FF;
  --blue-100: #DCE8FB;
  --blue-50:  #F1F6FE;

  /* ---------- Red: action only, used sparingly ---------- */
  --red-800: #8E0E18;
  --red-700: #B3121F;
  --red-600: #D81E2C;
  --red-500: #E63946;
  --red-300: #F6929A;
  --red-100: #FDE3E5;

  /* ---------- Neutrals ---------- */
  --ink:      #0B0F1A;
  --ink-soft: #47536B;
  --ink-mute: #78859C;
  --paper:    #FFFFFF;
  --paper-2:  #F5F8FD;
  --paper-3:  #E9F0FA;
  --line:     rgba(11, 15, 26, 0.10);
  --line-2:   rgba(11, 15, 26, 0.17);

  /* ---------- On dark surfaces ---------- */
  --on-dark:      #EEF4FF;
  --on-dark-soft: #AAC0E0;
  --on-dark-mute: #7089B0;
  --on-dark-line: rgba(255, 255, 255, 0.14);

  /* ---------- Semantic ---------- */
  --ok:   #16A34A;
  --ok-dark: #4ADE80;
  --warn: #D97706;

  /* ---------- Shape ---------- */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(11, 15, 26, 0.06);
  --shadow:    0 14px 40px -16px rgba(11, 15, 26, 0.28);
  --shadow-lg: 0 40px 80px -32px rgba(10, 27, 61, 0.45);
  --shadow-red: 0 14px 30px -12px rgba(216, 30, 44, 0.55);

  /* ---------- Layout ---------- */
  --maxw: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --nav-h: 72px;

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- Type ---------- */
  --display: "Commissioner", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ============================================================
   THEME LOCK
   The whole point: this site must render with OUR colours on
   every machine — Windows High-Contrast, forced dark mode,
   any OS theme. Three defences, all needed:
     1. color-scheme: only light  → the UA never re-themes us
     2. forced-color-adjust: none → opt every element out of
        the forced-colors palette substitution
     3. no prefers-color-scheme rules exist anywhere in this
        codebase, so there is nothing for dark mode to switch
   Trade-off: this deliberately ignores high-contrast themes,
   which is what was asked for. The palette below is held at
   WCAG AA contrast so it stays readable regardless.
   ============================================================ */
:root { color-scheme: only light; }

html, body, *, *::before, *::after {
  forced-color-adjust: none;
  -ms-high-contrast-adjust: none;
}

@media (forced-colors: active) {
  html, body, *, *::before, *::after { forced-color-adjust: none; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* `hidden` must win over any display we set later, otherwise elements the
   JavaScript hides (like the email button when no address is configured)
   stay stubbornly visible. */
[hidden] { display: none !important; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Form controls are the usual place an OS theme leaks in —
   every colour is stated explicitly, nothing inherited. */
input, select, textarea, button {
  font: inherit;
  color: var(--ink);
  background-color: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
button { cursor: pointer; background: none; border: none; color: inherit; }
::placeholder { color: var(--ink-mute); opacity: 1; }

:focus-visible {
  outline: 3px solid var(--red-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--blue-600); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 800;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.12rem, 1.7vw, 1.32rem); letter-spacing: -0.018em; }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 62ch;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 118px); }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--blue-900); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }
.section--dark .lead { color: var(--on-dark-soft); }

.section__head { max-width: 720px; margin-bottom: clamp(34px, 4.5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }
.section__head h2 { margin-bottom: 16px; }

/* Eyebrow label above a section heading */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red-600);
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--blue-300); }

/* Red accent on a word inside a heading */
.hl { color: var(--red-600); }
.section--dark .hl { color: var(--red-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
.btn .i { width: 1.15em; height: 1.15em; }

/* Primary — red. The only place red appears at full strength. */
.btn--primary {
  background: var(--red-600);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover { background: var(--red-700); transform: translateY(-2px); }

/* Secondary — blue, for lower-priority actions on light */
.btn--blue { background: var(--blue-600); color: #fff; }
.btn--blue:hover { background: var(--blue-700); transform: translateY(-2px); }

/* Ghost on light */
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--blue-600); color: var(--blue-600); }

/* Ghost on dark */
.btn--ghost-dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-dark);
  border-color: var(--on-dark-line);
}
.btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.6vw, 30px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Small chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--display);
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-100);
}

/* ---------- Icons ---------- */
.i { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Scroll reveal ----------
   Guarded behind .js (set by an inline script in <head>) so that if the
   JavaScript never runs, the page is still fully readable rather than a
   screen of invisible text. Content first, effect second. */
.reveal { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.nowrap { white-space: nowrap; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
