@import url("tokens.css");

/* Spacelink Hosting — static site.
   Layout rule of the page: the search is the hero. Everything else is quiet. */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); }

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

.night :focus-visible { outline-color: var(--accent); }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */

.display {
  font-weight: 500;
  font-size: clamp(36px, 7vw, 68px);
  line-height: .92;
  letter-spacing: -0.05em;
  margin: 0;
}

.h2 {
  font-weight: 500;
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: .98;
  letter-spacing: -0.04em;
  margin: 0;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.night .label { color: var(--night-muted); }

.lede {
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--muted);
  max-width: 54ch;
}

.night .lede { color: var(--night-muted); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--night);
  border-bottom: 1px solid var(--night-line);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 17px;
}

.brand__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav a {
  color: #dfe6f5;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
}

.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.nav a[aria-current="page"] { color: var(--accent); }

@media (max-width: 720px) {
  .nav a:not(.nav__cta) { display: none; }
}

.nav__cta {
  color: var(--accent-ink) !important;
  background: var(--accent);
  padding: 9px 14px;
}

.nav__cta:hover { background: var(--accent-2); }

/* ---------- hero: the search is the page ---------- */

.hero {
  background:
    radial-gradient(120% 90% at 85% -10%, var(--night-3) 0%, transparent 55%),
    radial-gradient(90% 70% at 5% 110%, var(--night-2) 0%, transparent 60%),
    var(--night);
  color: #fff;
  padding-block: clamp(44px, 8vw, 92px) clamp(36px, 6vw, 68px);
  overflow: hidden;
}

.hero__label { margin-bottom: 18px; }

.hero__ask {
  font-weight: 500;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 6px;
}

/* The input is set at display size. Typing your domain is the headline. */
.search {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  border-bottom: 2px solid var(--night-line);
  padding-block: 10px 14px;
  margin-bottom: 18px;
  transition: border-color .25s var(--ease);
}

.search:focus-within { border-bottom-color: var(--accent); }

.search__www {
  font-family: var(--mono);
  font-size: clamp(14px, 1.8vw, 20px);
  color: var(--night-muted);
}

.search__input {
  flex: 1 1 8ch;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(32px, 6.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.search__input::placeholder { color: rgba(255, 255, 255, .32); }
.search__input:focus { outline: none; }

.search__go {
  flex: none;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.search__go:hover { background: var(--accent-2); }
.search__go:active { transform: translateY(1px); }
.search__go[disabled] { opacity: .5; cursor: progress; }

.hero__hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--night-muted);
  margin: 0;
}

/* ---------- the till slip ---------- */

.slip {
  margin-top: 26px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(5, 16, 48, .4);
}

.slip[hidden] { display: none; }

.slip__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px dashed var(--line);
}

.slip__name {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  word-break: break-all;
}

.slip__status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
}

.slip__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 46vh;
  overflow-y: auto;
}

.slip__row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-family: var(--mono);
  font-size: 13px;
}

.slip__row + .slip__row { border-top: 1px solid var(--paper-2); }

.slip__row--taken { color: var(--muted); }

.slip__row--taken .slip__price { text-decoration: line-through; }

.slip__row input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }

.slip__tld { letter-spacing: .02em; }

.slip__price { font-variant-numeric: tabular-nums; white-space: nowrap; }

.slip__mark {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.slip__foot {
  border-top: 1px dashed var(--line);
  padding: 16px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slip__total {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.slip__total strong { font-size: 16px; }

.slip__note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
  width: 100%;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-2); }
.btn--accent[disabled] { opacity: .45; cursor: not-allowed; }
.btn--accent[disabled]:hover { background: var(--accent); }

.btn--ghost {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn--ghost:hover { border-color: var(--brand); }

.night .btn--ghost { color: #fff; border-color: var(--night-line); }
.night .btn--ghost:hover { border-color: var(--accent); }

.btn:active { transform: translateY(1px); }

/* ---------- sections ---------- */

.section { padding-block: clamp(52px, 8vw, 96px); }

.section--tight { padding-block: clamp(40px, 6vw, 68px); }

.section__head { margin-bottom: clamp(28px, 4vw, 44px); }

.section__head .label { margin-bottom: 12px; }

/* ---------- plans ---------- */

.plans {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
}

.plan--pick {
  background: var(--night);
  border-color: var(--night);
  color: #fff;
}

.plan--pick .plan__specs li { color: var(--night-muted); }
.plan--pick .plan__per { color: var(--night-muted); }

.plan__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
  min-height: 14px;
}

.plan__name {
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.plan__price {
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 10px 0 2px;
  font-variant-numeric: tabular-nums;
}

.plan__per {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.plan__specs {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  color: var(--muted);
  flex: 1;
}

.plan__specs li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.plan__specs svg { margin-top: 5px; color: var(--teal); }

.plan .btn { text-align: center; }

/* ---------- steps ---------- */

.steps {
  display: grid;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.step {
  background: var(--paper);
  padding: 22px 20px 24px;
}

.step__n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--teal-ink);
  margin: 0 0 10px;
}

.step h3 {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.step p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- portal ---------- */

.portal-head {
  background: var(--night);
  color: #fff;
  padding-block: clamp(36px, 6vw, 64px) clamp(30px, 5vw, 52px);
}

.portal-head .display { margin-bottom: 12px; }

.handoff {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 22px;
  max-width: 640px;
  font-size: 14.5px;
  color: #e6ecf9;
}

.handoff svg { flex: none; margin-top: 2px; color: var(--teal); }

.desk {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 20px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.tile:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 36, 102, .1);
}

.tile__icon { color: var(--brand); }

.tile__name {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.02em;
  margin: 0;
}

.tile__what { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }

.tile__go {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tile--direct .tile__go { color: var(--teal-ink); }

/* ---------- footer ---------- */

.site-foot {
  background: var(--night);
  color: var(--night-muted);
  padding-block: 44px 36px;
  font-size: 14px;
}

.site-foot a { color: #dfe6f5; text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

.site-foot__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 32px;
}

.site-foot h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 12px;
  font-weight: 400;
}

.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.site-foot__base {
  border-top: 1px solid var(--night-line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The mark is artwork, not an icon font — it keeps its own colour. */
.brand__mark { width: 22px; height: auto; flex: none; align-self: center; }

.site-foot__lockup {
  width: 212px;
  height: auto;
  margin-bottom: 4px;
  /* The lockup is drawn for light ground; on the night footer it needs air
     rather than inversion, which would destroy the two-colour relationship. */
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
}

@media (max-width: 560px) {
  .site-foot__lockup { width: 170px; }
}
