:root {
  color-scheme: light;
  --ink: #15202a;
  --muted: #61707d;
  --line: #d8e0e6;
  --line-strong: #a8b5bf;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --chrome-soft: #1a2530;
  --accent-dark: #c94f10;
  --blue: #2d79ff;
  --grid-line: rgba(21, 32, 42, 0.055);
  --shadow: 0 12px 34px rgba(20, 32, 42, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Full frame width so the backdrop reaches the edges; the padding keeps
     the content itself to a 1100px column. */
  padding-block: clamp(28px, 6vh, 64px) clamp(24px, 4vw, 40px);
  padding-inline: max(clamp(16px, 3vw, 36px), calc((100% - 1100px) / 2));
  /* Faint drafting grid behind the hero, fading out towards the cards, with
     a touch of the header's orange in the top corner. */
  background:
    radial-gradient(ellipse 45% 55% at 100% 0%, rgba(255, 122, 47, 0.07), transparent 70%),
    radial-gradient(ellipse 85% 70% at 25% 0%, transparent 25%, var(--paper) 80%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper);
}

.hero { margin: 0 0 clamp(32px, 6vh, 56px); }
/* Short orange rule, echoing the line under the header. */
.hero::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--accent);
}

.greeting {
  position: relative;
  margin: 0;
  /* No width cap: every greeting fits on one line down to tablet width.
     Only on phones may the longest ones wrap. */
  font-size: clamp(20px, 3.2vw, 34px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

/* Typed-out greeting (see the script in index.html). The caret is taken
   out of flow so it never changes where the line wraps. */
.greeting .untyped { color: transparent; }
.greeting .typed::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 0.9em;
  margin: 0.14em 0 0 3px;
  border-radius: 1px;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}
/* Once typing finishes the caret blinks a few more times, then goes. */
.greeting.typed-done .typed::after {
  animation: caret-blink 1s steps(1) 3 forwards;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero-sub {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

/* Groups sit side by side on wide screens, so one card per group does not
   leave half the page empty; they stack when there is no room. */
.module-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 32px;
  align-items: start;
}

/* Groups fade up one after another on load. Animating the group rather
   than the card leaves the card's own hover transform alone. */
.module-group { animation: rise-in 450ms ease-out 150ms backwards; }
.module-group:nth-child(2) { animation-delay: 260ms; }
.module-group:nth-child(3) { animation-delay: 370ms; }
.module-group:nth-child(4) { animation-delay: 480ms; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
}
@media (prefers-reduced-motion: reduce) {
  .module-group { animation: none; }
}

.group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.module-grid {
  display: grid;
  gap: 14px;
}

.module-card {
  /* Icon on the left, text beside it: keeps each card short so both
     groups fit on screen without scrolling. */
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 18px;
  row-gap: 10px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 32, 42, 0.05);
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.module-card:hover, .module-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  outline: none;
}

.module-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #1f2c38, var(--chrome));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #d8e1e8;
}
.module-icon svg { width: 36px; height: 36px; }

.module-body h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; }
.module-body p:last-child { margin: 0; font-size: 17px; line-height: 1.45; color: var(--muted); }

.module-cta {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent-dark);
}
.module-cta .arrow {
  display: inline-block;
  transition: transform 120ms ease;
}
.module-card:hover .arrow, .module-card:focus-visible .arrow { transform: translateX(3px); }

/* Phones: not enough room beside the text, so "Open" drops underneath. */
@media (max-width: 480px) {
  .module-card { grid-template-columns: auto 1fr; }
  .module-icon { grid-row: span 2; align-self: start; }
}
