/* Base: reset, type scale, buttons and shared bits. Brand colours and fonts are in brand/brand.css. */

:root {
  /* Type scale (the classic 12–72 scale) */
  --step--2: 0.75rem;   /* 12 */
  --step--1: 0.875rem;  /* 14 */
  --step-0: 1rem;       /* 16 */
  --step-1: 1.125rem;   /* 18 */
  --step-2: 1.3125rem;  /* 21 */
  --step-3: 1.5rem;     /* 24 */
  --step-4: 2.25rem;    /* 36 */
  --step-5: 3rem;       /* 48 */
  --step-6: 3.75rem;    /* 60 */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Safe areas: the notch, the status bar and the home bar. Zero in a normal browser tab. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  /* 24px, widened to clear the notch on a phone turned sideways */
  --gutter: max(24px, var(--safe-left), var(--safe-right));
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--color-paper);
}

body {
  margin: 0;
  min-height: 100vh; /* older browsers */
  min-height: 100svh;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-kerning: normal;
}

/*
  Full screen from the Home Screen, iOS draws its status bar (clock, battery) in white over the
  page. A band in the brand black, as tall as the status bar, keeps it readable on the light
  screens. In a browser tab the safe area at the top is zero, so the band doesn't show.
*/
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--safe-top);
  background: var(--color-brand);
  pointer-events: none;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--color-heading); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-accent); /* coral shows on white and on the navy panel */
  outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

.screen { min-height: 100vh; min-height: 100svh; }

/* Buttons: square, uppercase and letter-spaced, as on the brand website */
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  font: 600 var(--step--1) / 1 var(--font-text);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s, opacity 0.2s, transform 0.15s var(--ease-out);
}

.button:active:not(:disabled) { transform: scale(0.985); }
.button:disabled { cursor: default; opacity: 0.45; }

.button-primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

.button-primary:active:not(:disabled) { background: var(--color-brand-deep); }

.button-quiet {
  background: transparent;
  border-color: var(--color-heading);
  color: var(--color-heading);
}

.button-quiet:active:not(:disabled) { background: var(--color-backdrop); }

/* The small outlined button, such as Buy Now */
.button-small {
  width: auto;
  min-height: 44px;
  padding: 0 20px;
  font-size: var(--step--2);
}

/* Logo (sized where it's used), or the brand name as text if no logo file is set */
.logo { display: block; width: auto; height: auto; max-width: 100%; }

.logo-text {
  display: inline-block;
  font: 500 var(--step-1) / 1 var(--font-display);
  letter-spacing: 0.02em;
}

/* Brand tagline under the logo, as the brand writes it: lower case, Futura-style, key words in bold */
.tagline {
  font: 400 var(--step-1) / 1.3 var(--font-display);
  letter-spacing: 0.01em;
}

.tagline b { font-weight: 600; }

/* Small uppercase labels: section kickers, detail headings */
.label {
  font: 600 var(--step--2) / 1.3 var(--font-text);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.fine-print {
  font-size: var(--step--2);
  line-height: 1.55;
  color: var(--color-ink-soft);
  max-width: 44ch;
}

/* Load and content errors */
.screen-message {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: calc(var(--safe-top) + 32px) var(--gutter) 32px;
  max-width: 640px;
}

.message-text { font-size: var(--step-1); max-width: 40ch; }

.message-details {
  font-size: var(--step--1);
  color: var(--color-ink-soft);
  padding-left: 1.2em;
}

.noscript { padding: 32px var(--gutter); }
