/* ==========================================================================
   Stella International — stellainternational.com
   Ground #0E0E0E · accent Pantone Yellow C #FEDD00 · Acumin Pro (kit zbp5rqc)

   Acumin Pro weight map in Adobe Fonts:
     400 Regular · 600 Semibold · 700 Bold · 800 Black
   Display type uses 800. There is no 900 in the kit — do not ask for it or
   the browser will synthesise a smeared fake.

   Mark usage rule: the fill must contrast with the ground.
   Never the yellow mark on white (1.35:1 — the negative-space cuts dissolve).
   ========================================================================== */

/* ---------- tokens ---------- */

:root {
  --ground: #0e0e0e;
  --ground-lift: #141312;
  --surface: #171614;
  --rule: #2a2724;
  --rule-strong: #3d3934;

  --text: #edeae4;
  --text-muted: #948d84;
  --text-dim: #6d675f;

  --yellow: #fedd00;
  --yellow-dim: #c9af06;

  --font: "acumin-pro", "Helvetica Neue", Arial, sans-serif;

  --wt-regular: 400;
  --wt-semi: 600;
  --wt-bold: 700;
  --wt-black: 800;

  /* fluid scale */
  --t-micro: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --t-small: clamp(0.86rem, 0.83rem + 0.15vw, 0.94rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --t-lede: clamp(1.06rem, 1rem + 0.4vw, 1.3rem);
  --t-h3: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  --t-h2: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  --t-h1: clamp(2.1rem, 1.25rem + 4vw, 4.6rem);

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --shell: 76rem;
}

/* ---------- reset ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-weight: var(--wt-regular);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0; font-weight: var(--wt-black); line-height: 1.03; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--yellow);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--yellow) 40%, transparent);
  transition: border-color 140ms ease, color 140ms ease;
}
a:hover { border-bottom-color: var(--yellow); }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Visible to screen readers only. Used to keep the heading outline
   continuous where a visible heading would be redundant. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-size: var(--t-micro);
  font-weight: var(--wt-semi);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   First screen — header, hero and the three services share one viewport
   on desktop. min-height (not height) so it grows rather than clips.
   ========================================================================== */

.screen {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(2rem, 5vh, 4rem);
  padding-block: clamp(1.5rem, 3.5vh, 2.75rem) clamp(2rem, 4vh, 3.5rem);
  overflow: hidden;
}

.screen__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/bg-servers-1920.webp");
  background-size: cover;
  background-position: 58% center;
}

/* Flat 10%. The plate averages 13/255 and its 99th percentile is 63, so even
   under a light overlay only ~0.1% of pixels in the headline area fall below
   4.5:1 against the text colour. No ramp needed. */
.screen__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 14, 14, 0.10);
}

/* ---------- header ---------- */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem clamp(0.75rem, 3vw, 1.5rem);
}

.site-head__logo {
  border: 0;
  display: block;
  flex: 0 0 auto;
}
.site-head__logo img {
  width: clamp(168px, 20vw, 248px);
}

.site-head__contact {
  font-size: var(--t-small);
  font-weight: var(--wt-semi);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.4vh, 1.6rem);
  max-width: 54rem;
}

.hero h1 {
  font-size: var(--t-h1);
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero__lede {
  font-size: var(--t-lede);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.55;
}

/* ---------- services ---------- */

.services {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

@media (min-width: 56rem) {
  .services { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  padding: clamp(1.25rem, 2.4vh, 1.9rem) clamp(1.25rem, 2vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.card h3 {
  font-size: var(--t-h3);
  font-weight: var(--wt-bold);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card p {
  font-size: var(--t-small);
  color: var(--text-muted);
  line-height: 1.58;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--ground-lift);
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 9vh, 6rem);
}

.contact__grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .contact__grid { grid-template-columns: 0.85fr 1fr; }
}

.contact h2 {
  font-size: var(--t-h2);
  letter-spacing: -0.022em;
  margin-bottom: 0.9rem;
}

.contact__intro { color: var(--text-muted); margin-bottom: 2rem; }

.contact__details {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  font-size: var(--t-small);
}

.contact__details dt {
  font-size: var(--t-micro);
  font-weight: var(--wt-semi);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.contact__details dd { margin: 0; color: var(--text); }
.contact__details dl { margin: 0; }

/* ---------- form ---------- */

.form {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 34rem) {
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}

.field { display: flex; flex-direction: column; gap: 0.42rem; }

.field label {
  font-size: var(--t-micro);
  font-weight: var(--wt-semi);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field .req { color: var(--yellow-dim); }

.field input,
.field textarea {
  font-family: inherit;
  font-size: var(--t-body);
  color: var(--text);
  background: var(--ground);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.72rem 0.85rem;
  width: 100%;
  transition: border-color 140ms ease;
}

.field textarea { resize: vertical; min-height: 7.5rem; line-height: 1.55; }

.field input:hover,
.field textarea:hover { border-color: #4a453e; }

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--yellow);
  outline: 1px solid var(--yellow);
  outline-offset: 0;
}

/* honeypot — must stay reachable to bots but invisible and out of tab order */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  justify-self: start;
  font-family: inherit;
  font-size: var(--t-small);
  font-weight: var(--wt-black);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0e0e0e;
  background: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 999px;
  padding: 0.78rem 2.1rem;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.btn:hover:not(:disabled) { background: #fff06b; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form__note {
  font-size: var(--t-micro);
  color: var(--text-dim);
  line-height: 1.55;
}

/* Success state: the form is removed from the DOM and this takes its place,
   so a visitor cannot fire off repeat submissions by mashing Send. A page
   refresh brings the form back - this is a UX guard, not abuse protection. */
.form-sent {
  border: 1px solid var(--yellow);
  border-radius: 3px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.form-sent:focus { outline: none; }
.form-sent:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.form-sent h3 {
  font-size: var(--t-h3);
  font-weight: var(--wt-bold);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.form-sent p {
  font-size: var(--t-small);
  color: var(--text-muted);
  line-height: 1.58;
}

.form__status {
  font-size: var(--t-small);
  line-height: 1.55;
  padding: 0.75rem 0.95rem;
  border-radius: 3px;
  border: 1px solid var(--rule-strong);
  background: var(--ground);
}
.form__status[hidden] { display: none; }
.form__status[data-state="ok"] { border-color: var(--yellow); color: var(--text); }
.form__status[data-state="error"] { border-color: #a8503c; color: #f0c4b8; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.5rem;
  font-size: var(--t-small);
  color: var(--text-dim);
}

/* 1fr auto 1fr keeps the copyright optically centred in the page, not merely
   centred in the leftover space between the mark and the links. */
.site-foot__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
}

.site-foot__mark {
  border: 0;
  display: block;
  justify-self: start;
  opacity: 0.85;
  transition: opacity 140ms ease;
}
.site-foot__mark:hover { opacity: 1; }
.site-foot__mark img { width: clamp(42px, 4.5vw, 58px); }

.site-foot__copy { text-align: center; }

.site-foot nav { display: flex; gap: 1.5rem; justify-self: end; }

@media (max-width: 44rem) {
  .site-foot__grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
  }
  .site-foot__mark,
  .site-foot nav { justify-self: center; }
}

.site-foot a {
  color: var(--text-muted);
  border-bottom-color: transparent;
}
.site-foot a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }

/* ==========================================================================
   Timeline — the dates are the argument, so they lead and stay restrained.
   Numbering is legitimate here: this really is a sequence.
   ========================================================================== */

.timeline,
.practice {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 10vh, 7rem);
}

.timeline__head,
.practice h2 {
  font-size: var(--t-h2);
  letter-spacing: -0.022em;
  margin-top: 0.9rem;
}

.timeline__head {
  margin-bottom: clamp(2.25rem, 6vh, 3.75rem);
  max-width: 20ch;
}

.tl { display: flex; flex-direction: column; }

.tl__item {
  position: relative;
  display: grid;
  gap: 0.35rem 2.5rem;
  padding-block: clamp(1.4rem, 3vh, 2.1rem);
  border-top: 1px solid var(--rule);
}

.tl__item:last-child { border-bottom: 1px solid var(--rule); }

/* marker sits inline with the year, which lines up with the entry heading */

@media (min-width: 46rem) {
  .tl__item { grid-template-columns: 9.5rem 1fr; }
}

.tl__year {
  position: relative;
  font-weight: var(--wt-black);
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  padding-left: 1.15rem;
}

.tl__year::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.6em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.tl__span { color: var(--text-dim); font-weight: var(--wt-semi); }

.tl__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 62ch;
}

.tl__body h3 {
  font-size: var(--t-h3);
  font-weight: var(--wt-bold);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.tl__body p {
  font-size: var(--t-small);
  color: var(--text-muted);
  line-height: 1.58;
}

.tl__body .tl__tech {
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

@media (max-width: 45.99rem) {
  .tl__year { padding-left: 1.15rem; }
  .tl__body { padding-left: 1.15rem; }
}

/* ==========================================================================
   Practice
   ========================================================================== */

.practice__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .practice__grid { grid-template-columns: 0.85fr 1fr; }
}

.practice h2 { max-width: 17ch; }

.practice__body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.practice__body p { color: var(--text-muted); }

.founders {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3.5rem;
  margin-top: 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.founders li { display: flex; flex-direction: column; gap: 0.15rem; }

.founders__name {
  font-weight: var(--wt-bold);
  color: var(--text);
}

/* names link out to LinkedIn, but shouldn't shout like a body link */
a.founders__name {
  border-bottom: 1px solid var(--rule-strong);
}
a.founders__name:hover,
a.founders__name:focus-visible {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

.founders__role {
  font-size: var(--t-micro);
  font-weight: var(--wt-semi);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   Simple content pages (privacy, terms)
   ========================================================================== */

.doc { padding-block: clamp(2.5rem, 7vh, 5rem) clamp(3rem, 9vh, 6rem); }
.doc__inner { max-width: 42rem; display: flex; flex-direction: column; gap: 1.25rem; }
.doc h1 { font-size: var(--t-h2); letter-spacing: -0.022em; }
.doc h2 { font-size: var(--t-h3); font-weight: var(--wt-bold); margin-top: 1.25rem; }
.doc p { color: var(--text-muted); }

/* ==========================================================================
   Motion / responsive trims
   ========================================================================== */

@media (max-width: 55.99rem) {
  .screen { min-height: 0; padding-block: 1.5rem 2.5rem; }
  .hero { padding-block: clamp(1.5rem, 6vh, 3rem); }
  .screen__bg { background-position: 84% center; }

  /* copy spans the full width here and the crop favours the brighter centre
     band, so sit on the darkest part of the plate with a little more cover. */
  .screen__scrim { background: rgba(14, 14, 14, 0.22); }
}

/* smaller plates for smaller screens — the preload tags in the HTML are
   media-matched to these breakpoints, keep them in sync */
@media (max-width: 50rem) {
  .screen__bg { background-image: url("../img/bg-servers-1200.webp"); }
}

@media (max-width: 30rem) {
  .screen__bg { background-image: url("../img/bg-servers-800.webp"); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
