/* Amerikano site: a late-night table. Tokens from docs/design/visual-direction.md. */

:root {
  --felt-center: #1b4a43;
  --felt-mid: #133631;
  --felt-edge: #0a1d1b;
  --wood-light: #9a6537;
  --wood-mid: #73461f;
  --wood-dark: #4a2a10;
  --brass: #d2a54e;
  --brass-bright: #e2ba63;
  --brass-dim: #8c6c30;
  --ivory-face: #fbf6e9;
  --ivory-body: #e9dfc6;
  --ink-red: #c42b1c;
  --ink-black: #1c1c1e;
  --ink-blue: #1e56b8;
  --surface: rgba(12, 16, 15, 0.78);
  --line: rgba(244, 235, 221, 0.12);
  --text: #f4ebdd;
  --text-dim: rgba(244, 235, 221, 0.7);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --gutter: max(16px, env(safe-area-inset-left));
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 500 1.0625rem/1.6 var(--ui);
  /* One warm lamp over the middle of the table, darkness at the edges. */
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(226, 186, 99, 0.09), transparent 70%),
    radial-gradient(130% 90% at 50% 10%, var(--felt-center) 0%, var(--felt-mid) 45%, var(--felt-edge) 100%)
      no-repeat var(--felt-edge);
}

a {
  color: var(--brass-bright);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ivory-face);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.5rem 0.875rem;
  background: var(--brass);
  color: var(--ink-black);
  border-radius: 10px;
  font-weight: 700;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

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

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  font: 700 1.25rem/1 var(--display);
  letter-spacing: 0.01em;
}
.brand img {
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.lang {
  min-height: 44px;
  padding: 0 0.875rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 16, 15, 0.4);
  color: var(--text-dim);
  font: 600 0.875rem/1 var(--ui);
  text-decoration: none;
  cursor: pointer;
}
.lang:hover {
  color: var(--text);
  border-color: var(--brass-dim);
}

/* ---------------------------------------------------------------- main */

main {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
}

h1,
h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}
h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 700;
}
h2 {
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--ivory-face);
}
p {
  margin: 0 0 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.25rem, 5vw, 2rem);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.panel + .panel {
  margin-top: 1.25rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text);
}
.dim,
.soon {
  color: var(--text-dim);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border-radius: 14px;
  border: 1px solid var(--brass-dim);
  background: linear-gradient(180deg, var(--brass-bright), var(--brass) 55%, #b88a3a);
  color: #1a1206;
  font: 700 1rem/1 var(--ui);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 100ms var(--ease-out), filter 100ms var(--ease-out);
}
.btn:hover {
  color: #1a1206;
  filter: brightness(1.05);
}
.btn:active {
  transform: scale(0.98);
}
.btn-quiet {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}
.btn-quiet:hover {
  color: var(--text);
  border-color: var(--brass-dim);
}

/* ---------------------------------------------------------------- home */

.hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}
.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 22px 40px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(210, 165, 78, 0.25);
}
.hero h1 {
  margin: 1.25rem 0 0.25rem;
  font-size: clamp(2.75rem, 12vw, 4rem);
  font-weight: 800;
}
.tagline {
  font: italic 600 1.25rem/1.3 var(--display);
  color: var(--brass-bright);
  margin-bottom: 1.25rem;
}
.hero .lead {
  max-width: 32rem;
  margin: 0 auto 0.5rem;
}
.hero .actions {
  justify-content: center;
}
.hero .soon {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}

.features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.features li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(244, 235, 221, 0.03);
}
.features h2 {
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
  color: var(--brass-bright);
}
.features p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- legal and support */

.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
}
.prose ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.prose li + li {
  margin-top: 0.375rem;
}
.prose strong {
  color: var(--ivory-face);
}
.updated {
  color: var(--text-dim);
  font-size: 0.9375rem;
}
code {
  font-size: 0.9em;
}

.email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 1.75rem;
}
.email span {
  overflow-wrap: anywhere;
}

.tips {
  margin: 0;
  display: grid;
  gap: 1rem;
}
.tips div {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.tips dt {
  font: 650 1.0625rem/1.3 var(--display);
  color: var(--ivory-face);
  margin-bottom: 0.25rem;
}
.tips dd {
  margin: 0;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- join */

.join {
  text-align: center;
}
.eyebrow {
  font: 600 0.8125rem/1.3 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-bright);
}
.code-label {
  margin: 1.25rem 0 0.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* The code, one ivory tile per character, like a rack row. */
.code {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 2vw, 12px);
  margin: 0 0 0.5rem;
  padding: 14px 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood-mid) 45%, var(--wood-dark));
  box-shadow: inset 0 2px 0 var(--brass), 0 16px 30px -14px rgba(0, 0, 0, 0.8);
}
.tile {
  display: grid;
  place-items: center;
  width: clamp(48px, 15vw, 72px);
  aspect-ratio: 5 / 7;
  border-radius: 14%;
  background: linear-gradient(180deg, var(--ivory-face), var(--ivory-body));
  box-shadow: inset 0 -3px 0 rgba(120, 95, 50, 0.25), 0 6px 10px -4px rgba(0, 0, 0, 0.6);
  font: 800 clamp(1.75rem, 9vw, 2.75rem)/1 var(--display);
  font-variant-numeric: tabular-nums;
}
/* A friend code has 8 characters: smaller tiles keep them on one row on a phone. */
.code-long {
  gap: clamp(3px, 1.2vw, 8px);
}
.code-long .tile {
  width: clamp(30px, 9.5vw, 54px);
  font-size: clamp(1.25rem, 6vw, 2.125rem);
}
.ink-black {
  color: var(--ink-black);
}
.ink-red {
  color: var(--ink-red);
}
.ink-blue {
  color: var(--ink-blue);
}
.join .actions {
  justify-content: center;
}
.status {
  min-height: 1.6em;
  color: var(--text-dim);
  font-size: 0.9375rem;
}
.join h2 {
  margin-top: 1.5rem;
}
.steps {
  text-align: left;
  max-width: 28rem;
  margin: 0 auto 1rem;
  padding-left: 1.5rem;
}
.steps li + li {
  margin-top: 0.5rem;
}
.steps strong {
  color: var(--ivory-face);
}

/* ---------------------------------------------------------------- footer: the rack */

.rack {
  position: relative;
  padding: 1.25rem var(--gutter) max(1.25rem, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--wood-light), var(--wood-mid) 40%, var(--wood-dark));
  box-shadow: inset 0 2px 0 var(--brass), 0 -12px 30px rgba(0, 0, 0, 0.35);
  color: rgba(251, 246, 233, 0.85);
  font-size: 0.875rem;
}
.rack-inner[hidden] {
  display: none;
}
.rack nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  max-width: 46rem;
  margin: 0 auto 0.5rem;
}
.rack nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.625rem;
  color: var(--ivory-face);
  font-weight: 650;
  text-decoration: none;
  border-radius: 8px;
}
.rack nav a:hover,
.rack nav a[aria-current='page'] {
  background: rgba(26, 14, 4, 0.35);
}
.rack p {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn:active {
    transform: none;
  }
}
