/* RuneReach portal: brand tokens as on runereach.com (RuneReach-Brand-Kit 02-Colours, 03-Fonts). Phone first. */
@font-face { font-family: 'Chakra Petch'; src: url('/fonts/ChakraPetch-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url('/fonts/ChakraPetch-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --woad: #2456b8;
  --deep: #163c82;
  --wool: #f2e8d2;
  --weld: #f2b21b;
  --woad-line: rgba(242, 232, 210, 0.18);
  --head: 'Chakra Petch', system-ui, sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}
@media (min-width: 600px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  background: var(--woad); color: var(--wool);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: -0.01em; line-height: 1.05; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--weld); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter); }
.bar__logo img { width: 150px; height: auto; }   /* horizontal logo minimum is 150 px */
.bar__link { font: 600 13px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 10px 0; }
.bar__link:hover { color: var(--weld); }

/* Page body */
.main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 8px var(--gutter) 48px; }
.main--wide { max-width: 720px; }
.kicker { font: 600 13px/1 var(--head); letter-spacing: 0.18em; text-transform: uppercase; color: var(--weld); margin-bottom: 14px; }
.title { font-size: clamp(36px, 10vw, 52px); }
.title em { font-style: normal; color: var(--weld); }
.lede { margin-top: 14px; opacity: 0.9; }
.small { font-size: 15px; opacity: 0.8; }
.small a:hover { color: var(--weld); }

/* Ship: spins once in 3D, settles into the flat logo */
.ship { position: relative; width: min(240px, 64vw); aspect-ratio: 4 / 3; margin: 0 auto 18px; perspective: 700px; }
.ship__canvas, .ship__flat, .ship__spin { position: absolute; inset: 0; width: 100%; height: 100%; }
.ship__spin { transform-style: preserve-3d; }
.ship__spin img { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: visible; }
.ship.is-css .ship__spin { animation: ship-spin 1.9s var(--ease) 0.2s both; }
.ship.is-css .ship__flat { opacity: 0; animation: ship-settle 0.35s ease-out 2.05s both; }
@keyframes ship-spin {
  0%   { transform: translateY(6%) rotateX(14deg) rotateY(-40deg) scale(0.86); opacity: 0; }
  12%  { opacity: 1; }
  80%  { transform: translateY(-3%) rotateX(4deg) rotateY(330deg) scale(1.02); }
  100% { transform: translateY(0) rotateX(0) rotateY(360deg) scale(1); opacity: 1; }
}
@keyframes ship-settle { to { opacity: 1; } }
.ship.is-done .ship__spin { opacity: 0; transition: opacity 0.3s; }
/* Rendered frames: the flat logo hides only while a spin frame is on screen (same 4:3 box, so no jump). */
.ship.is-spinning .ship__flat { opacity: 0; }

/* Forms */
.form { margin-top: 26px; display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field__label { font: 600 13px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; }
.field__label span { opacity: 0.65; letter-spacing: 0.04em; text-transform: none; font-family: var(--body); font-weight: 400; font-size: 14px; }
.field__input {
  width: 100%; font: 500 18px/1.2 var(--body); color: var(--deep); background: var(--wool);
  border: 2px solid var(--wool); border-radius: 0; padding: 14px 14px; min-height: 52px;
  -webkit-appearance: none; appearance: none;
}
.field__input:focus { outline: none; border-color: var(--weld); box-shadow: 0 0 0 2px var(--weld); }
.field__input[aria-invalid='true'] { border-color: var(--weld); }
.field__error { font-size: 15px; color: var(--weld); font-weight: 600; }
.form__error { background: var(--deep); border-left: 4px solid var(--weld); padding: 12px 14px; font-weight: 500; }

.btn {
  --cut: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 16px/1 var(--head); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  padding: 18px 26px; min-height: 56px; border: 0; cursor: pointer; color: inherit; background: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform 0.3s var(--ease), background-color 0.3s, color 0.3s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn--weld { background: var(--weld); color: var(--deep); }
.btn--weld:hover { background: var(--wool); }
.btn--ghost { box-shadow: inset 0 0 0 2px currentColor; clip-path: none; }
.btn--ghost:hover { background: var(--wool); color: var(--deep); }
.btn--block { width: 100%; }
.btn--small { padding: 11px 16px; min-height: 0; font-size: 13px; --cut: 7px; }

/* Panels */
.panel { background: var(--deep); padding: 22px 20px; margin-top: 26px; }
.panel h2 { font-size: 24px; margin-bottom: 10px; }
[tabindex='-1']:focus { outline: none; }
.panel p + p { margin-top: 10px; }
.panel--sent { text-align: left; }
.panel--sent strong { color: var(--weld); font-weight: 600; overflow-wrap: anywhere; }
.dev-link { margin-top: 16px; padding: 14px; border: 2px dashed var(--weld); font-size: 14px; overflow-wrap: anywhere; }
.dev-link a { color: var(--weld); }

.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps__n { font: 700 15px/34px var(--head); text-align: center; background: var(--woad); width: 34px; height: 34px; }
.steps li.is-next .steps__n { background: var(--weld); color: var(--deep); }
.steps strong { font-family: var(--head); font-weight: 600; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font: 600 13px/1 var(--head); letter-spacing: 0.06em; padding: 9px 12px; background: var(--woad); }
.chip[aria-current='true'] { background: var(--weld); color: var(--deep); }
.badge { display: inline-block; font: 600 11px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 7px; background: var(--weld); color: var(--deep); vertical-align: middle; margin-left: 8px; }

/* The logo's waves along the bottom (same as the site's hero) */
.waves { flex: none; width: 100%; height: 14px; margin: 0 0 18px; overflow: hidden; opacity: 0.55; pointer-events: none; }
.waves__track {
  width: calc(100% + 80px); height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 11 L20 3 L40 11' fill='none' stroke='%23F2E8D2' stroke-width='3.2' stroke-linejoin='miter'/%3E%3C/svg%3E") repeat-x left center / 40px 14px;
  animation: waves 2.4s linear infinite;
}
@keyframes waves { to { transform: translateX(-40px); } }

@media (prefers-reduced-motion: reduce) {
  .waves__track, .ship.is-css .ship__spin { animation: none; }
  .ship .ship__spin, .ship .ship__canvas { display: none; }
  .ship .ship__flat { opacity: 1 !important; animation: none !important; }
  .btn { transition: none; }
}

.linkish { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--weld); }
