/* Retalery · retalery.com
   Home (the trailer) and Invest in Retalery.
   Colours, type, spacing and radii come from the Retalery V1 design tokens. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }

:root {
  --rt-color-bg-subtle: #F6F4EF;
  --rt-color-surface-default: #FFFFFF;
  --rt-color-text-primary: #17211D;
  --rt-color-text-secondary: #3F4743;
  --rt-color-text-muted: #5A5F5B;
  --rt-color-border-subtle: #DCD8CF;
  --rt-color-border-focus: #17211D;
  --rt-color-action-primary: #17211D;
  --rt-color-action-primary-hover: #2A3831;
  --rt-color-action-on-primary: #EEEAE2;
  --rt-color-accent-sage: #7F9A87;
  --rt-color-accent-sage-soft: #E5ECE7;
  --rt-color-stage: #17211D;

  --rt-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rt-type-display: 600 40px/44px var(--rt-font);
  --rt-type-title-page: 600 28px/34px var(--rt-font);
  --rt-type-body-lg: 400 17px/26px var(--rt-font);
  --rt-type-body: 400 15px/24px var(--rt-font);
  --rt-type-label: 600 15px/20px var(--rt-font);
  --rt-type-label-sm: 600 13px/16px var(--rt-font);
  --rt-type-overline: 600 12px/16px var(--rt-font);
  --rt-type-caption: 400 12px/16px var(--rt-font);

  --rt-space-1: 4px;
  --rt-space-2: 8px;
  --rt-space-3: 12px;
  --rt-space-4: 16px;
  --rt-space-6: 24px;
  --rt-space-8: 32px;
  --rt-space-10: 40px;
  --rt-space-12: 48px;
  --rt-radius-md: 10px;
  --rt-radius-lg: 16px;
  --rt-radius-xl: 20px;
  --rt-radius-full: 999px;
  --rt-shadow-1: 0 1px 2px rgba(23, 33, 29, 0.06), 0 4px 12px rgba(23, 33, 29, 0.08);
  --rt-shadow-stage: 0 2px 6px rgba(23, 33, 29, 0.10), 0 24px 60px -12px rgba(23, 33, 29, 0.35);
  --rt-motion-fast: 120ms;
  --rt-motion-calm: 240ms;
  --rt-ease: cubic-bezier(0.2, 0, 0, 1);
  --rt-size-button-lg: 50px;
  --rt-size-touch: 44px;

  --gutter: var(--rt-space-4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--rt-color-bg-subtle);
  color: var(--rt-color-text-primary);
  font: var(--rt-type-body);
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: var(--rt-space-3) var(--rt-space-4); border-radius: var(--rt-radius-md);
  background: var(--rt-color-action-primary); color: var(--rt-color-action-on-primary);
  font: var(--rt-type-label); text-decoration: none;
}
.skip:focus { top: var(--rt-space-2); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rt-color-border-focus);
  outline-offset: 3px;
}

/* ---------- Header: logo left, two links right ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rt-space-4);
  padding: var(--rt-space-3) var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--rt-size-touch);
  flex: none;
  border-radius: var(--rt-radius-md);
}
.brand img { width: 112px; height: auto; }

.nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--rt-space-1);
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--rt-size-touch);
  padding: 0 var(--rt-space-2);
  border-radius: var(--rt-radius-full);
  color: var(--rt-color-text-primary);
  font: var(--rt-type-label-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--rt-motion-fast) var(--rt-ease), color var(--rt-motion-fast) var(--rt-ease);
}
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The one primary action on each page */
.nav .nav__primary {
  padding: 0 var(--rt-space-4);
  background: var(--rt-color-action-primary);
  color: var(--rt-color-action-on-primary);
}
.nav .nav__primary:hover { background: var(--rt-color-action-primary-hover); text-decoration: none; }

/* The page you are on: underlined, not only coloured */
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Home: the trailer fills what the header leaves ---------- */
.home {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter) var(--gutter);
  container-type: size;
}

.player {
  position: relative;
  width: 100%;
  max-width: 1600px;
  aspect-ratio: 16 / 9;
  border-radius: var(--rt-radius-lg);
  overflow: hidden;
  background: var(--rt-color-stage);
  box-shadow: var(--rt-shadow-stage);
}
@supports (width: 1cqh) {
  .player { width: min(100cqw, 100cqh * 16 / 9); }
}

.player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--rt-color-stage);
}

/* Large play control over the poster. Hidden once the trailer starts. */
.play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--rt-space-2);
  padding: 0 0 clamp(16px, 7%, 64px);
  border: 0;
  background: linear-gradient(to top, rgba(10, 16, 13, 0.55), rgba(10, 16, 13, 0) 55%);
  color: var(--rt-color-action-on-primary);
  font: var(--rt-type-label);
  cursor: pointer;
}
.play[hidden] { display: none; }

.play__disc {
  display: grid;
  place-items: center;
  width: clamp(52px, 9cqw, 76px);
  height: clamp(52px, 9cqw, 76px);
  border-radius: 50%;
  background: var(--rt-color-action-on-primary);
  color: var(--rt-color-text-primary);
  transition: transform var(--rt-motion-calm) var(--rt-ease);
}
.play__disc svg { width: 40%; height: 40%; margin-left: 8%; }
.play:hover .play__disc { transform: scale(1.06); }
.play:focus-visible { outline: none; }
.play:focus-visible .play__disc { outline: 2px solid var(--rt-color-action-on-primary); outline-offset: 4px; }

.play__label { font: var(--rt-type-label); }
.play__meta { font: var(--rt-type-caption); opacity: 0.85; }

.player-caption { display: none; }

/* Phones: the play disc sits low on the frame, the words move below it */
@media (max-width: 599px) {
  .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--rt-space-3); }
  @supports (width: 1cqh) { .player { width: min(100cqw, (100cqh - 40px) * 16 / 9); } }
  .play { padding-bottom: 6%; }
  .play__disc { width: 44px; height: 44px; }
  .play__label, .play__meta { display: none; }
  .player-caption { display: block; font: var(--rt-type-caption); font-size: 13px; color: var(--rt-color-text-muted); text-align: center; }
  .player.is-playing + .player-caption { visibility: hidden; }
}

/* ---------- Invest in Retalery ---------- */
.invest-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.invest {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rt-space-6) var(--gutter) var(--rt-space-12);
}

.card {
  width: 100%;
  max-width: 600px;
  background: var(--rt-color-surface-default);
  border: 1px solid var(--rt-color-border-subtle);
  border-radius: var(--rt-radius-xl);
  box-shadow: var(--rt-shadow-1);
  padding: var(--rt-space-8) var(--rt-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rt-space-4);
}

.overline {
  display: inline-flex;
  align-items: center;
  gap: var(--rt-space-2);
  align-self: flex-start;
  padding: 6px var(--rt-space-3);
  border-radius: var(--rt-radius-full);
  background: var(--rt-color-accent-sage-soft);
  color: var(--rt-color-text-primary);
  font: var(--rt-type-overline);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rt-color-accent-sage); flex: none; }

.title { font: var(--rt-type-title-page); letter-spacing: -0.02em; }
.body { font: var(--rt-type-body-lg); color: var(--rt-color-text-secondary); }
.divider { height: 1px; background: var(--rt-color-border-subtle); margin: var(--rt-space-2) 0; }

.investors { display: flex; flex-direction: column; gap: var(--rt-space-3); }
.investors__label { font: var(--rt-type-label); }

.deck-options { display: grid; gap: var(--rt-space-4); }
.deck-option { display: flex; flex-direction: column; gap: var(--rt-space-2); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rt-space-2);
  width: 100%;
  min-height: var(--rt-size-button-lg);
  padding: 0 var(--rt-space-6);
  border-radius: var(--rt-radius-md);
  background: var(--rt-color-action-primary);
  color: var(--rt-color-action-on-primary);
  font: var(--rt-type-label);
  text-decoration: none;
  transition: background-color var(--rt-motion-fast) var(--rt-ease);
}
.button:hover { background: var(--rt-color-action-primary-hover); }
.button__icon { width: 20px; height: 20px; flex: none; }
.caption { font: var(--rt-type-caption); color: var(--rt-color-text-muted); }

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--rt-space-2);
  min-height: var(--rt-size-touch);
  color: var(--rt-color-text-primary);
  font: var(--rt-type-label);
  text-underline-offset: 4px;
}

@media (max-width: 599px) {
  .card .overline { align-self: center; }
  .investors__label, .caption { text-align: center; }
  .back { align-self: center; }
}

/* ---------- Tablet and up: links side by side ---------- */
@media (min-width: 600px) {
  :root { --gutter: var(--rt-space-6); }
  .site-header { padding-top: var(--rt-space-4); padding-bottom: var(--rt-space-4); }
  .brand img { width: 128px; }
  .nav { flex-direction: row; align-items: center; gap: var(--rt-space-2); }
  .nav a { padding: 0 var(--rt-space-3); font: var(--rt-type-label); }
  .nav .nav__primary { padding: 0 var(--rt-space-5, 20px); }
  .card { padding: var(--rt-space-12); gap: var(--rt-space-6); }
  .title { font: var(--rt-type-display); letter-spacing: -0.02em; }
}

@media (min-width: 1024px) {
  :root { --gutter: var(--rt-space-10); }
  .brand img { width: 144px; }
  .stage { padding-bottom: var(--rt-space-8); }
  .player { border-radius: var(--rt-radius-xl); }
  .card { max-width: 680px; }
  .deck-options { grid-template-columns: 1fr 1fr; }
}

/* Phones held sideways: give the screen to the trailer */
@media (max-height: 480px) and (orientation: landscape) {
  .site-header { padding-top: var(--rt-space-1); padding-bottom: var(--rt-space-1); }
  .nav { flex-direction: row; align-items: center; gap: var(--rt-space-2); }
  .stage { padding-bottom: var(--rt-space-2); }
  .player { border-radius: var(--rt-radius-md); }
}

@media (prefers-reduced-motion: reduce) {
  .nav a, .button, .play__disc { transition: none; }
}
