/* Cirrus Tech landing page.
   Every colour, space and radius comes from tokens.css; type sizes are the
   design system's styles (display, heading-lg, heading, title, body, small, label). */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;            /* body */
  line-height: 24px;
  font-weight: 400;
}

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--sky-deep); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sky :focus-visible { outline-color: var(--on-sky); }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.skip {
  position: absolute; left: var(--space-4); top: -100px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-md);
  z-index: 10;
}
.skip:focus { top: var(--space-4); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit; font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--sky); color: var(--on-sky); }
.btn-primary:hover { background: var(--sky-deep); color: var(--surface); }
.btn-secondary { border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--sky-tint); }
.btn-on-sky { background: var(--on-sky); color: var(--cloud); }
.btn-on-sky:hover { background: var(--cloud); color: var(--on-sky); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* ---------- Hero: the logo extended to full bleed ---------- */

.hero { --logo-w: min(560px, 100vw - 2 * var(--space-6)); }

.sky { position: relative; overflow: hidden; background: var(--sky); color: var(--on-sky); }

.nav {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-sky); font-size: 18px; line-height: 26px; font-weight: 600; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-sky); font-weight: 500; text-decoration: none;
}
.nav-links a:not(.btn):hover { text-decoration: underline; }
.nav .btn { padding-inline: var(--space-4); }

.logo { width: var(--logo-w); height: auto; margin-inline: auto; }
.logo-sky { position: relative; margin-top: max(var(--logo-w) * 0.2, min(13vh, 144px)); }
.logo-word { margin-bottom: var(--space-12); }

.ground { text-align: center; padding-bottom: var(--space-12); }
.ground h1 {
  max-width: 22ch; margin-inline: auto;
  font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em;   /* heading-lg */
  text-wrap: balance;
}
.lead { max-width: 52ch; margin: var(--space-4) auto 0; color: var(--ink-muted); text-wrap: pretty; }
.ground .actions { justify-content: center; margin-top: var(--space-8); }

/* Background streaks: the cloud's own round-ended bars, paler and further off. */
.streaks { position: absolute; inset: 0; pointer-events: none; }
.streaks span {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  height: calc(var(--logo-w, 480px) / 30);
  border-radius: calc(var(--logo-w, 480px) / 60);   /* half the height, like the cloud's bar ends */
  background: var(--cloud); opacity: .3;
  animation: drift 48s ease-in-out infinite alternate;
}
.streaks span:nth-child(even) { animation-duration: 64s; animation-direction: alternate-reverse; }
/* In the hero the streaks sit on the cloud's own row spacing, in the rows above it. */
.streaks.rows { inset: auto 0 calc(var(--logo-w) * 66.5 / 300) 0; height: 0; }
.streaks.rows span { top: auto; bottom: calc(var(--logo-w) * (9 + 23 * var(--row)) / 300); }
@keyframes drift { from { transform: translateX(-24px); } to { transform: translateX(24px); } }

/* ---------- Sections ---------- */

.section { padding-block: var(--space-12); }
.raised { background: var(--surface-raised); border-block: 1px solid var(--line); }

.eyebrow {
  color: var(--sky-deep);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em;   /* label */
  text-transform: uppercase;
}
.section h2, .band h2 {
  margin-top: var(--space-2);
  font-size: 24px; line-height: 32px; font-weight: 600;   /* heading */
  text-wrap: balance;
}
h3 { font-size: 18px; line-height: 26px; font-weight: 600; }   /* title */

.cards { display: grid; gap: var(--space-6); margin-top: var(--space-8); }
.card {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.num {
  color: var(--sky-deep);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em;   /* label */
}
.card h3 { margin-top: var(--space-2); }
.card p:last-child, .steps p { margin-top: var(--space-2); color: var(--ink-muted); max-width: 46ch; }

.steps { display: grid; gap: var(--space-8); margin-top: var(--space-8); counter-reset: step; }
.steps li { counter-increment: step; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: var(--space-2);
  color: var(--sky-deep);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em;   /* label */
}

/* ---------- Contact band ---------- */

.band { padding-block: var(--space-12); }
.band .wrap { position: relative; }
.band p { margin-top: var(--space-4); max-width: 52ch; }
.band .actions { margin-top: var(--space-6); }

/* ---------- Footer ---------- */

.footer { padding-block: var(--space-8); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.footer-logo { display: inline-block; border-radius: var(--radius-sm); }
.footer p { color: var(--ink-muted); font-size: 13px; line-height: 20px; }   /* small */

/* ---------- Wider screens ---------- */

@media (max-width: 639px) {
  .nav-links li:not(:last-child) { display: none; }
  .ground .actions .btn { flex: 1 1 100%; }
  .streaks .wide-only { display: none; }
}

@media (min-width: 640px) {
  .wrap { padding-inline: var(--space-8); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
}

@media (min-width: 880px) {
  .ground h1 { font-size: 48px; line-height: 52px; letter-spacing: -0.02em; }   /* display */
  .section h2, .band h2 { font-size: 32px; line-height: 40px; letter-spacing: -0.01em; }   /* heading-lg */
  .section, .band { padding-block: calc(2 * var(--space-12)); }
  .ground { padding-bottom: calc(2 * var(--space-12)); }
  .card { padding: var(--space-8); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .streaks span { animation: none; }
  .btn { transition: none; }
}
