/* horizonitgroup.com — Horizon IT Group
   Refined-minimal "clean corporate". No JS. No build step. */

:root {
  --paper:      #fbfbf9;          /* warm white, not sterile #fff */
  --paper-edge: #f2f1ed;
  --ink:        #0d1420;          /* near-black, blue cast */
  --ink-soft:   #4a5564;
  --ink-faint:  #8a93a1;
  --accent:     #0b57c8;
  --accent-dk:  #063a88;
  --rule:       #dcdbd4;

  --measure: 54rem;
  --step:    clamp(1.25rem, 3.5vw, 2.5rem);

  --font-display: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --font-body:    "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The "dawn" glow sitting just above the horizon rule. Purely atmospheric. */
body::before {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 58vh;
  background:
    radial-gradient(120% 100% at 18% 100%, rgba(11, 87, 200, 0.07), transparent 62%),
    linear-gradient(to top, var(--paper-edge), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--step);
}

/* ---------- header ---------- */

.masthead { padding-block: clamp(2rem, 7vh, 4rem) 0; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .it { color: var(--accent); }

/* ---------- hero ---------- */

main { flex: 1 0 auto; display: flex; align-items: center; }

.hero { padding-block: clamp(3rem, 14vh, 8rem); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  /* Large but never overflowing a 320px viewport. */
  font-size: clamp(2.25rem, 7.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin: 0;
  text-wrap: balance;
}

.hero h1 .break { display: block; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  margin: 1.75rem 0 0;
  max-width: 34ch;
  font-size: 1.0625em;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* The horizon: a hairline across the page with a marker riding on it. */
.horizon {
  position: relative;
  margin-top: clamp(2.75rem, 8vh, 4.5rem);
  height: 1px;
  background: linear-gradient(to right, var(--rule) 0%, var(--rule) 62%, transparent 100%);
  border: 0;
}

.horizon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* ---------- footer ---------- */

.footer {
  padding-block: clamp(1.5rem, 5vh, 2.5rem);
  font-size: 0.8125rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.footer a { color: var(--ink-soft); text-decoration-color: var(--rule); }
.footer a:hover { color: var(--accent); }

/* ---------- 404 ---------- */

.code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.back:hover { color: var(--accent); }

/* ---------- focus ---------- */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- one orchestrated load ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.6rem); }
  to   { opacity: 1; transform: none; }
}

@keyframes draw {
  from { transform: scaleX(0); }
  to   { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  /* "both" fill, deliberately: the from-state (opacity 0) is supplied by the
     animation's backwards fill rather than by a base `opacity: 0` rule. If the
     animation never runs, the text simply renders at full opacity instead of
     staying invisible forever. */
  .reveal {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .reveal:nth-child(1) { animation-delay: 0.05s; }
  .reveal:nth-child(2) { animation-delay: 0.16s; }
  .reveal:nth-child(3) { animation-delay: 0.27s; }

  .masthead .reveal { animation-delay: 0s; }

  .horizon {
    transform-origin: left;
    animation: draw 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  }
}

/* ---------- dark mode ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0b1118;
    --paper-edge: #0f1826;
    --ink:        #eef1f5;
    --ink-soft:   #a3adbb;
    --ink-faint:  #6b7585;
    --accent:     #5e9bff;
    --accent-dk:  #9dc1ff;
    --rule:       #26303d;
  }

  body::before {
    background:
      radial-gradient(120% 100% at 18% 100%, rgba(94, 155, 255, 0.10), transparent 62%),
      linear-gradient(to top, var(--paper-edge), transparent 70%);
  }
}
