/* Rhea Foundry. Deep space, brushed silver and a blue horizon.
   Dark sections pair silver with blue. Light sections pair black with orange, as the two logos do. */

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #050d26;
  --night-deep: #030817;
  --line-night: #24365f;
  --on-night: #f1f4f9;
  --on-night-muted: #aebbd4;
  --blue: #5cb8f5;
  --blue-pale: #a9dcfb;

  --light: #eef2f9;
  --paper: #ffffff;
  --line-light: #d5dcea;
  --ink: #0b1220;
  --muted: #4b566b;
  --orange: #ff8a0f;
  --orange-ink: #a84d00;

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--light);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--orange-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--blue); color: var(--night); padding: 10px 16px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Type */
h1, h2, .display {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 600; }
.mark {
  font: 600 .72rem/1.5 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 38em; text-wrap: pretty; }

/* Header */
.site-header { position: relative; z-index: 2; background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--line-night); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 28px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font: 600 .95rem/1 var(--display); letter-spacing: .2em; text-transform: uppercase; }
.brand:hover { color: inherit; }
.brand img { width: 53px; height: 36px; flex: none; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 34px); margin-left: -2px; }
.nav a { display: inline-block; padding: 10px 2px; font-size: 1rem; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--blue-pale); }
.nav a[aria-current="page"] { border-bottom-color: var(--blue); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  border: 2px solid var(--blue); background: var(--blue); color: var(--night);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--on-night); border-color: var(--on-night); color: var(--night); }
.btn.ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn.ghost:hover { background: var(--on-night); border-color: var(--on-night); color: var(--night); }
.on-light .btn { background: var(--night); border-color: var(--night); color: var(--on-night); }
.on-light .btn:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero: the brand artwork, shifted right so the copy can sit over open space */
.hero { position: relative; overflow: hidden; background: var(--night); color: var(--on-night); }
.hero-art {
  position: absolute; left: 0; top: 0;
  width: 140%; max-width: none; height: 100%;
  object-fit: cover; object-position: center 65%;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 13, 38, .94) 0%, rgba(5, 13, 38, .82) 28%, rgba(5, 13, 38, 0) 48%);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  min-height: clamp(600px, 52vw, 800px);
  padding-block: 56px;
}
.hero-copy { width: min(490px, 40vw); }
.hero .mark { color: var(--blue-pale); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.5rem, 4.05vw, 3.65rem); }
.hero .lede { margin-top: 22px; font-size: clamp(1.0625rem, 1.35vw, 1.2rem); }
.hero .actions { margin-top: 32px; }

/* Sections */
.section { padding-block: var(--section); }
.section.paper { background: var(--paper); }
.night-bg {
  background: var(--night) url("/img/stars.svg");
  color: var(--on-night);
}
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(24px, 5vw, 72px); align-items: end;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head p:not(.mark) { max-width: 34em; }
.eyebrow { color: var(--orange-ink); margin-bottom: 14px; }
.night-bg .eyebrow { color: var(--blue); }

.page-head {
  background: url("/img/horizon.webp") center bottom / max(100%, 1100px) auto no-repeat, var(--night) url("/img/stars.svg");
  color: var(--on-night);
  padding-block: clamp(52px, 7vw, 88px) clamp(180px, 16vw, 240px);
}
.page-head .mark { color: var(--blue-pale); margin-bottom: 18px; }
.page-head .lede { margin-top: 22px; }

/* Product panels, each in its own colours */
.castings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.casting-card {
  --c-bg: #000; --c-fg: #fff; --c-soft: #ddd; --c-line: rgba(255, 255, 255, .28);
  display: flex; flex-direction: column;
  background: var(--c-bg); color: var(--c-fg);
  padding: clamp(22px, 3vw, 36px);
  min-height: 390px;
  border-radius: 18px;
}
.casting-card a { color: inherit; }
.casting-card a:hover { color: inherit; text-decoration-thickness: 2px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.card-top img { width: 96px; height: 96px; border-radius: 20px; box-shadow: 0 0 0 1px var(--c-line); }
.casting-card .mark { color: var(--c-soft); text-align: right; }
.casting-card h2, .casting-card h3 { font: 700 clamp(1.7rem, 2.6vw, 2.3rem)/1.1 var(--display); letter-spacing: -.02em; }
.casting-card p { margin-top: 12px; max-width: 32em; color: var(--c-soft); text-wrap: pretty; }
.card-body { margin-bottom: 26px; }
.card-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px;
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--c-line);
}
.casting-card .status { display: inline-flex; align-items: center; gap: 9px; text-align: left; }
.status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.status.live::before { background: currentColor; }
.card-link { font-weight: 600; }

.c-peas  { --c-bg: #304d3b; --c-fg: #f6f1e4; --c-soft: #dbe4d3; --c-line: rgba(246, 241, 228, .3); }
.c-rice  { --c-bg: #021933; --c-fg: #fff; --c-soft: #ffd84d; --c-line: rgba(255, 216, 77, .35); }
.c-rice p { color: #dfe7f2; }
.c-data  { --c-bg: #1863dc; --c-fg: #fff; --c-soft: #e6efff; --c-line: rgba(255, 255, 255, .38); }

/* Services */
.service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.service-list > li { padding: 26px clamp(18px, 2.4vw, 32px) 8px 0; }
.service-list > li + li { border-left: 1px solid var(--line-light); padding-left: clamp(18px, 2.4vw, 32px); }
.service-list .mark { color: var(--orange-ink); display: block; margin-bottom: 22px; }
.service-list .display { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.15; }
.service-list p { margin-top: 12px; text-wrap: pretty; }
.more { margin-top: clamp(32px, 4vw, 48px); }

/* Data promises */
.promises { display: grid; }
.promises > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px clamp(24px, 5vw, 72px);
  padding-block: 22px; border-top: 1px solid var(--line-night);
}
.promises > div:last-child { border-bottom: 1px solid var(--line-night); }
.promises dt { font-weight: 600; font-size: 1.125rem; }
.promises dd { color: var(--on-night-muted); max-width: 42em; }

/* Call to action over the horizon */
.horizon-band {
  background: url("/img/horizon.webp") center bottom / max(100%, 1100px) auto no-repeat, var(--night) url("/img/stars.svg");
  color: var(--on-night);
  padding-block: clamp(56px, 7vw, 92px) clamp(180px, 16vw, 240px);
}
.horizon-band .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px 48px; }
.horizon-band h2 { max-width: 15em; }
.horizon-band p { margin-top: 14px; max-width: 34em; font-size: 1.125rem; }

/* Products page */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--c-bg); color: var(--c-fg); border-radius: 18px; scroll-margin-top: 16px; }
.product + .product { margin-top: clamp(12px, 1.6vw, 20px); }
.product .casting-card { min-height: 0; height: 100%; }
.product-detail { padding: clamp(22px, 3vw, 36px); }
.product-detail h3 { margin-bottom: 12px; font-size: 1.0625rem; }
.product-detail ul { display: grid; gap: 10px; }
.product-detail li { padding-left: 20px; position: relative; text-wrap: pretty; }
.product-detail li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 2px; background: currentColor; }
.product-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-weight: 600; }
.product-links a { color: inherit; }
.product-links a:hover { color: inherit; text-decoration-thickness: 2px; }

/* Process and tools */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.steps li { border-top: 2px solid var(--blue); padding-top: 16px; }
.steps .display { display: block; font-size: 1.6rem; margin: 10px 0 8px; }
.steps .mark { color: var(--blue); }
.steps p { color: var(--on-night-muted); text-wrap: pretty; }
.detail-list { margin-top: 18px; display: grid; gap: 8px; }
.detail-list li { padding-left: 20px; position: relative; font-size: 1rem; }
.detail-list li::before { content: ""; position: absolute; left: 0; top: .66em; width: 9px; height: 2px; background: var(--orange); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { padding: 7px 16px; border: 1px solid var(--muted); border-radius: 999px; font-size: .95rem; font-weight: 500; }

/* Prose pages */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { display: grid; gap: 8px; }
.prose li { padding-left: 20px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 2px; background: var(--orange); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px clamp(24px, 6vw, 88px); }
.logo-light { width: min(100%, 240px); height: auto; margin-top: 32px; }

/* Directory table */
.table-scroll { overflow-x: auto; }
.directory { width: 100%; min-width: 620px; border-collapse: collapse; }
.directory th, .directory td { padding: 15px 18px 15px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-light); }
.directory thead th { font: 600 .72rem/1.5 var(--display); letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--ink); }
.directory tbody th { font-weight: 600; }
.directory .none { color: var(--muted); }

.mail-big { font: 700 clamp(1.6rem, 5vw, 3.6rem)/1.1 var(--display); letter-spacing: -.02em; color: var(--blue-pale); overflow-wrap: anywhere; }
.mail-big:hover { color: var(--on-night); }
.facts { display: grid; gap: 16px; }
.facts dt { font: 600 .72rem/1.5 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Footer */
.site-footer { background: var(--night-deep); color: var(--on-night-muted); padding-block: 44px 34px; font-size: .95rem; }
.site-footer .grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.site-footer .brand { color: var(--on-night); margin-bottom: 14px; }
.site-footer h2 { font: 600 .72rem/1.5 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--on-night); margin-bottom: 10px; }
.site-footer li a { display: inline-block; padding-block: 4px; }
.site-footer a:hover { color: var(--blue-pale); }
.site-footer p { max-width: 24em; }
.legal-line { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-night); font-size: .875rem; }
.site-footer .legal-line p { max-width: none; }

@media (max-width: 960px) {
  .hero-art { position: static; width: 100%; height: auto; aspect-ratio: 16 / 10; object-position: center; }
  .hero::after { inset: 0 0 auto; aspect-ratio: 16 / 10; background: linear-gradient(180deg, rgba(5, 13, 38, 0) 72%, var(--night) 100%); }
  .hero .wrap { min-height: 0; padding-block: 28px 56px; }
  .hero-copy { width: 100%; max-width: 640px; }
  .hero h1 { font-size: clamp(2.5rem, 7.4vw, 3.65rem); }
  .castings { grid-template-columns: minmax(0, 1fr); }
  .casting-card { min-height: 0; }
  .section-head, .split, .product { grid-template-columns: minmax(0, 1fr); }
  .section-head { align-items: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .about { grid-column: 1 / -1; }
  .product-detail { padding-top: 0; }
  .product .card-foot { margin-top: 0; }
}
@media (max-width: 760px) {
  .castings, .service-list { grid-template-columns: minmax(0, 1fr); }
  .casting-card { min-height: 0; }
  .card-foot { margin-top: 0; }
  .service-list > li { padding-right: 0; padding-bottom: 24px; }
  .service-list > li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-light); }
  .service-list .mark { margin-bottom: 12px; }
  .promises > div { grid-template-columns: minmax(0, 1fr); }
  .site-header .wrap { padding-block: 12px 4px; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .site-footer .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions .btn { flex: 1 1 100%; }
  .card-top img { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
