/* Shared by every page: fonts, colour, type, and the few controls the product has. */

@font-face { font-family: Aileron; src: url(/fonts/Aileron-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Aileron; src: url(/fonts/Aileron-Italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Aileron; src: url(/fonts/Aileron-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
/* the display weight is held back until it has loaded: a headline that appears a moment late is better than one that changes shape */
@font-face { font-family: Aileron; src: url(/fonts/Aileron-Black.woff2) format('woff2'); font-weight: 900; font-display: block; }
@font-face { font-family: 'Fragment Mono'; src: url(/fonts/FragmentMono-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  /* Limio's palette, cut down to what a card needs. See docs/design.md. */
  --paper: #fafafb;
  --ink: #1a1432;
  --quiet: #6d6d72;
  --rule: #e0e0e2;
  --accent: #fa8938;
  --accent-deep: #d46520;
  --tint: #fef3ec;
  --danger: #d41f4e;

  --sans: Aileron, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }

h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }

/* The metadata voice: every fact on a page is set like this. */
.meta {
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
}

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  background: transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--ink); color: var(--paper); }
/* one per screen: the thing the page is for */
/* navy on orange in every design, including the dark ones where --ink is light */
.button.primary { background: var(--accent); border-color: var(--accent); color: #1a1432; }
.button.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #1a1432; }
.button.danger { border-color: var(--danger); color: var(--danger); }
.button.danger:hover { background: var(--danger); color: var(--paper); }
.button:disabled { opacity: 0.45; cursor: default; pointer-events: none; }

/* a quiet action that reads as text */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule);
}
.link-button:hover { text-decoration-color: var(--accent); }

.field { display: grid; gap: 0.4rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: #1a1432;
  /* 16px minimum stops iOS zooming the page when a field takes focus */
  font-size: max(1rem, 16px);
  line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:hover, .field textarea:hover { border-color: var(--quiet); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
::placeholder { color: var(--quiet); opacity: 0.75; }

.form-error { color: var(--danger); font-size: 0.9375rem; }
.form-error:empty { display: none; }

/* the pen: a pad to draw on, and drawings wherever they are shown */
.ink { display: block; }
.pen-ink { fill: #1a1432; }
.pen-orange { fill: #fa8938; }
.ink-desk { display: grid; gap: 0.5rem; }
/* touch-action none: a finger on the pad draws, it does not scroll the page */
.ink-pad { display: block; width: 100%; aspect-ratio: 3 / 2; background: #fff; border: 1.5px solid var(--rule); border-radius: 8px; touch-action: none; cursor: url(/landing/marker.png) 3 38, crosshair; }
.ink-tools { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; min-height: 2.75rem; }
.ink-tools .link-button { min-height: 2.75rem; }
.ink-tools [aria-pressed='true'] { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

[hidden] { display: none !important; }

/* wrong links, private cards, locked doors */
.quiet {
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: var(--gutter);
  max-width: 34rem;
}
.quiet h1 { font-size: clamp(2rem, 7vw, 3rem); }
.quiet a { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); }
