/* ============================================================
   CloudCode — design tokens
   Palette verified for WCAG AA: body text 7.0:1+, accent 6.3:1,
   interactive borders 3.2:1 (non-text contrast, WCAG 1.4.11).
   ============================================================ */
:root {
  --bg:          #F7F8FA;
  --surface:     #FFFFFF;
  --ink:         #0B1220;
  --ink-2:       #47566B;
  --line:        #E3E7ED;
  --line-strong: #7E8CA0;
  --accent:      #1D4ED8;
  --accent-hi:   #3B82F6;
  --accent-wash: rgba(29, 78, 216, .07);
  --danger:      #B42318;

  --on-dark:     #F7F8FA;
  --on-dark-2:   #96A3B5;
  --on-dark-line:rgba(247, 248, 250, .16);

  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "IBM Plex Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --wrap: 1140px;
  --r:    4px;
  --r-lg: 10px;

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite { position: absolute; }

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

::selection { background: var(--ink); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

.mono { font-family: var(--mono); font-variant-ligatures: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--on-dark);
  padding: 12px 18px;
  border-radius: 0 0 var(--r) 0;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 500 15.5px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease);
}
.btn__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s var(--ease); }
.btn:hover .btn__icon { transform: translateX(3px); }

.btn--primary { --btn-bg: var(--ink); --btn-fg: var(--on-dark); --btn-bd: var(--ink); }
.btn--primary:hover { --btn-bg: var(--accent); --btn-bd: var(--accent); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bd: var(--ink); background: rgba(11, 18, 32, .04); }

.btn--invert { --btn-bg: var(--on-dark); --btn-fg: var(--ink); --btn-bd: var(--on-dark); }
.btn--invert:hover { --btn-bg: var(--accent-hi); --btn-bd: var(--accent-hi); }

.btn--sm { min-height: 40px; padding: 9px 16px; font-size: 14.5px; }
.btn--full { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 250, .86);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  color: var(--ink);
}
.brand__mark { color: var(--ink); transition: transform .25s var(--ease); }
.brand__caret { fill: var(--accent); }
.brand:hover .brand__mark { transform: translateY(-2px); }

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.03em;
}
.brand__text em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nav { display: flex; gap: var(--s-3); }
.nav a {
  position: relative;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-2);
  padding-block: 6px;
  transition: color .18s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.top__actions { display: flex; align-items: center; gap: 12px; }

.lang {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  overflow: hidden;
}
.lang button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  min-height: 38px;
  padding: 0 11px;
  background: transparent;
  border: 0;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lang button:hover { color: var(--ink); background: rgba(11, 18, 32, .05); }
.lang button.is-active { background: var(--ink); color: var(--on-dark); }

.burger {
  display: none;
  width: 44px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  padding: 12px 11px;
}
.burger span {
  display: block;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.mobilenav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mobilenav a {
  padding: 16px var(--s-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
}
.mobilenav:not([hidden]) { display: flex; }
.mobilenav a:active { background: var(--accent-wash); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -5%;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--accent-wash), transparent 72%);
  pointer-events: none;
}
.hero__inner { position: relative; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s-3);
}
.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.eyebrow__sep { color: var(--line-strong); }

h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.5rem);
  max-width: 15ch;
}

.lede {
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: var(--ink-2);
  max-width: 52ch;
}
.lede--sm { font-size: 1.0625rem; margin-top: 20px; margin-bottom: var(--s-4); }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--s-4);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(48px, 7vw, 88px) 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fact {
  background: var(--surface);
  padding: var(--s-3) var(--s-3) 22px;
}
.fact dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.fact dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -.01em;
  line-height: 1.3;
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
/* the sticky header would otherwise sit on top of a jumped-to heading */
section[id], main[id] { scroll-margin-top: 88px; }

.shead { margin-bottom: clamp(36px, 4.5vw, 56px); max-width: 640px; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.h2 { font-size: clamp(1.85rem, 3.3vw, 2.75rem); }

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}
.section--dark .kicker { color: var(--accent-hi); }
.section--dark :focus-visible { outline-color: var(--on-dark); }
.section--dark .shead { border-color: var(--on-dark-line); }

/* ---------- service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-3) 26px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px -18px rgba(11, 18, 32, .35);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r);
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.card p { font-size: 15px; color: var(--ink-2); }

/* ---------- process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  padding-top: var(--s-3);
  border-top: 1px solid var(--on-dark-line);
  position: relative;
}
.step::after {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 36px; height: 2px;
  background: var(--accent-hi);
}
.step__num {
  display: block;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--on-dark-2);
  margin-bottom: 14px;
}
.step h3 {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -.015em;
  margin-bottom: 10px;
}
.step p { font-size: 15px; color: var(--on-dark-2); line-height: 1.6; }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: var(--s-4);
  border-top: 1px solid var(--on-dark-line);
}
.cta-band__text { font-size: 1.0625rem; color: var(--on-dark-2); max-width: 46ch; }

/* ---------- contacts ---------- */
.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.contacts__list { list-style: none; margin: 0; padding: 0; }
.contacts__list li {
  display: grid;
  grid-template-columns: 24px 170px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contacts__list li:last-child { border-bottom: 1px solid var(--line); }
.ci { color: var(--accent); }
.ci svg { width: 20px; height: 20px; }
.contacts__list .lbl {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contacts__list .big {
  font-size: 16.5px;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}
.contacts__list .big:hover { color: var(--accent); }

/* ---------- form ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4) 28px;
  display: grid;
  gap: 18px;
  box-shadow: 0 24px 48px -40px rgba(11, 18, 32, .5);
}
.form__title {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.02em;
}
.field { display: grid; gap: 7px; }
.field__label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.form input, .form textarea {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.form input:focus, .form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field__err {
  display: none;
  font-size: 13px;
  color: var(--danger);
}
.field.is-invalid .field__err { display: block; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--danger); }
.field.is-invalid input:focus,
.field.is-invalid textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .1); }

.form__hint { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: var(--s-4); }
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px var(--s-4);
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-2);
}
.foot__nav { display: flex; flex-wrap: wrap; gap: 10px var(--s-3); }
.foot__nav a { text-decoration: none; padding-block: 6px; }
.foot__nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.foot__sep { color: var(--line-strong); }
.foot a { text-underline-offset: 3px; }
.foot a:hover { color: var(--accent); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 981px) {
  /* the mobile menu can never survive into the desktop layout */
  .mobilenav { display: none !important; }
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    column-gap: var(--s-6);
    align-items: end;
  }
  .eyebrow { grid-column: 1 / -1; }
  .hero__inner h1 { grid-column: 1; }
  .hero__aside { grid-column: 2; padding-bottom: 6px; }
}

@media (max-width: 980px) {
  /* comfortable thumb targets once the header is touch-driven */
  .lang button { min-height: 44px; padding-inline: 14px; }
  .burger { width: 46px; height: 44px; }
  .nav { display: none; }
  .burger { display: block; }
  .top__cta { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts { grid-template-columns: minmax(0, 1fr); }
  .lede, h1 { max-width: none; }
  .hero__aside { margin-top: var(--s-3); }
  .shead { max-width: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: 18px var(--s-3) 20px; }
  .contacts__list li { grid-template-columns: 24px minmax(0, 1fr); row-gap: 2px; }
  .contacts__list .lbl { grid-column: 2; }
  .contacts__list li > :last-child { grid-column: 2; }
  .form { padding: 26px 20px; }
  .brand__text em { display: none; }
}

@media (max-width: 380px) {
  .hero__cta .btn { width: 100%; }
}

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

@media print {
  .top, .burger, .mobilenav, .form, .skip { display: none; }
  body { background: #fff; font-size: 12pt; }
  .section--dark { background: #fff; color: #000; }
}

/* ---------- 404 ---------- */
.page-404 { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; }
.nf { max-width: 620px; padding-block: var(--s-6); }
.nf__brand { margin-bottom: var(--s-6); }
.nf__code {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.nf__title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--s-3); }
.nf__en { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.nf .hero__cta { margin-top: var(--s-4); }
