/*
  Business — product page.

  The tokens are the app's own (`src/theme.ts` in the business-game repo), so the page and
  the game read as one object: the royal-blue ground, white cards that sit on it like game
  pieces with a hard offset shadow rather than a blur, and Nunito Black for everything that
  matters. The property-group colours are the same eight the board uses.

  No JavaScript — the site CSP is `script-src 'none'`.
*/

:root {
  /* Ground */
  --blue: #2f63e8;
  --blue-deep: #1f4bc4;
  --blue-light: #4f8cff;
  --navy: #1a2b55;

  /* Ink, on white */
  --ink: #1e2a4a;
  --ink-soft: #4a5677;
  --ink-muted: #8a94b3;

  /* Surfaces */
  --white: #ffffff;
  --paper: #f6f7fb;
  --paper-dark: #e9ecf5;
  --line: #d5d9e6;

  /* Accents */
  --green: #2fd36b;
  --green-dark: #1a9a48;
  --yellow: #ffd23f;
  --yellow-dark: #c99a00;
  --yellow-ink: #4a3200;
  --red: #ef4444;

  /* Board green */
  --board: #5cc46a;

  /* The eight property groups, in board order */
  --g-brown: #8b5a2b;
  --g-lightblue: #60a5fa;
  --g-pink: #ec4899;
  --g-orange: #f97316;
  --g-red: #ef4444;
  --g-yellow: #facc15;
  --g-green: #22c55e;
  --g-darkblue: #a855f7;

  /* On the blue ground */
  --on-blue: #ffffff;
  /*
    Text on the blue ground, checked against every stop of the page gradient. The obvious
    values (0.82 / 0.62) measure 4.0:1 and 3.0:1 at the top of the page, under the 4.5:1 AA
    floor for text this size, so hierarchy here comes from size and weight rather than from
    fading the ink out.
  */
  --on-blue-soft: rgba(255, 255, 255, 0.94);
  --on-blue-muted: rgba(255, 255, 255, 0.86);
  --hairline: rgba(255, 255, 255, 0.18);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  /* The app's signature: a hard shadow, no blur, so cards read as physical pieces. */
  --lift: 0 6px 0 rgba(12, 26, 66, 0.28);
  --lift-sm: 0 4px 0 rgba(12, 26, 66, 0.22);
  --lift-deep: 0 14px 0 rgba(12, 26, 66, 0.3);

  --col: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(58px, 7.5vw, 88px);

  color-scheme: light;
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--blue);
  background-image: linear-gradient(180deg, #2f63e8 0%, #2757cc 38%, #1b3f92 100%);
  background-attachment: fixed;
  color: var(--on-blue);
  font-family: Nunito, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* ---------- layout ---------- */

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

section {
  padding-block: var(--section);
}

.eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-blue-muted);
  margin: 0 0 14px;
}

.section-title {
  font-size: clamp(28px, 4.4vw, 44px);
  max-width: 20ch;
}

.section-lede {
  margin-top: 14px;
  max-width: 58ch;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 700;
  color: var(--on-blue-soft);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: var(--lift-sm);
}

.topbar-link {
  font-size: 14px;
  font-weight: 800;
  color: var(--on-blue-soft);
  white-space: nowrap;
  text-decoration: none;
  padding: 8px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: 999px;
}

.topbar-link:hover {
  color: var(--on-blue);
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(48px, 7vw, 84px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(0, 0.74fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

.hero-title {
  font-size: clamp(34px, 4.9vw, 56px);
  letter-spacing: -0.025em;
  text-shadow: 0 4px 0 rgba(12, 26, 66, 0.25);
  /* The three lines are broken by hand; balancing would rebreak them somewhere worse. */
  text-wrap: normal;
}

.hero-title .pop {
  color: var(--yellow);
}

.hero-lede {
  margin-top: 20px;
  font-size: clamp(17px, 1.9vw, 21px);
  color: var(--on-blue-soft);
  max-width: 38ch;
}

.flags {
  display: flex;
  gap: 10px;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 18px;
}

/* ---------- buttons ---------- */

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 0;
}

.btn-primary {
  background: var(--yellow);
  color: var(--yellow-ink);
  box-shadow: 0 5px 0 var(--yellow-dark);
}

.btn-primary:hover {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--yellow-dark);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-blue);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Not a link: there is no listing to point at yet. */
.btn-soon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-blue);
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  cursor: default;
}

.btn .sub {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 800;
  color: var(--on-blue-soft);
}

/* ---------- phone frame ---------- */

.phone {
  --bezel: 10px;
  position: relative;
  width: 100%;
  max-width: 292px;
  margin-inline: auto;
  padding: var(--bezel);
  background: #101a33;
  border-radius: 42px;
  box-shadow: var(--lift-deep);
}

.phone img {
  border-radius: 32px;
  width: 100%;
}

.phone-tilt {
  transform: rotate(-2.5deg);
}

.phone-tilt-r {
  transform: rotate(2deg);
}

.phone-pair {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  align-items: flex-start;
  justify-content: center;
}

.phone-pair .phone {
  max-width: 250px;
}

/* ---------- the colour band ---------- */

.band {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--lift-sm);
}

.band span {
  flex: 1;
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: 18px;
  margin-top: 40px;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--lift);
}

.card h3 {
  font-size: 19px;
}

.card p {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- board cards ---------- */

.board-card {
  padding: 0;
  overflow: hidden;
}

.board-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}

.board-flag {
  font-size: 34px;
  line-height: 1;
}

.board-name {
  font-size: 18px;
  font-weight: 900;
}

.board-cur {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
}

.board-tiles {
  border-top: 1px solid var(--paper-dark);
}

.board-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 800;
  border-bottom: 1px solid var(--paper-dark);
}

.board-tile:last-child {
  border-bottom: 0;
}

.board-tile .swatch {
  width: 8px;
  height: 22px;
  border-radius: 3px;
  flex: none;
}

.board-tile .price {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.board-foot {
  padding: 12px 20px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
  border-top: 1px solid var(--paper-dark);
}

/* ---------- split rows ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

.split + .split {
  margin-top: clamp(48px, 6vw, 72px);
}

.split-media .phone {
  max-width: 262px;
}

.split-flip .split-media {
  order: -1;
}

.split h3 {
  font-size: clamp(24px, 3.2vw, 34px);
}

.split p {
  margin-top: 14px;
  color: var(--on-blue-soft);
  font-size: 17px;
  max-width: 46ch;
}

.tick-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tick-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 16px;
  font-weight: 800;
  color: var(--on-blue-soft);
}

.tick-list li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: inset 0 -2px 0 var(--green-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- rule deeds ---------- */

.deed {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--lift);
}

.deed-bar {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.deed-body {
  padding: 16px;
}

.deed-body h3 {
  font-size: 18px;
}

.deed-body p {
  margin-top: 7px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- house rules ---------- */

.rules-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.rule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--lift-sm);
}

.rule-row .rule-text {
  flex: 1;
  min-width: 0;
}

.rule-row strong {
  display: block;
  font-size: 15.5px;
  font-weight: 900;
}

.rule-row span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* A switch, drawn to match the one in the app's setup screen. */
.switch {
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--green);
  padding: 3px;
  display: flex;
  justify-content: flex-end;
}

.switch::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch-off {
  background: var(--line);
  justify-content: flex-start;
}

/* ---------- the closing band ---------- */

.closer {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  box-shadow: var(--lift-deep);
}

.closer h2 {
  font-size: clamp(28px, 4.4vw, 46px);
}

.closer p {
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--on-blue-soft);
}

.closer .store-row {
  justify-content: center;
}

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

.foot {
  border-top: 1px solid var(--hairline);
  padding-block: 34px 46px;
  font-size: 14px;
  font-weight: 700;
  color: var(--on-blue-muted);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  justify-content: space-between;
}

.foot a {
  color: var(--on-blue-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.foot a:hover {
  color: var(--on-blue);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.disclaimer {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 70ch;
}

/* ---------- legal pages ---------- */

.prose {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--lift);
  max-width: 760px;
}

.prose h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.prose h2 {
  font-size: 20px;
  margin-top: 30px;
}

.prose p,
.prose li {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-top: 12px;
}

.prose ul {
  padding-left: 22px;
}

.prose .updated {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 8px;
}

.prose a {
  color: var(--blue-deep);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media,
  .split-media {
    order: 2;
  }

  .split-flip .split-media {
    order: 2;
  }

  .phone-tilt,
  .phone-tilt-r {
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .phone-pair {
    flex-direction: column;
    align-items: center;
  }

  .phone-pair .phone {
    max-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .btn-primary:hover {
    transform: none;
  }
}
