/* AYRLI — get-ayrli.com. Hand-written, no build step, no dependencies.
   Colours are the app's, from src/ui/tokens.ts. Nothing here invents a value.
   Type floor is 16px: the app's 11.5pt floor is a phone-held-at-arm's-length
   rule for a native screen, and the web is a different medium. */

@font-face {
  font-family: 'Barlow SC';
  /* Barlow Semi Condensed 800, SIL Open Font License 1.1, subset to Latin
     from node_modules/@expo-google-fonts/barlow-semi-condensed. Self-hosted so
     the site asks nothing of a third party to render. */
  src: url('barlow-sc-800.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070707;
  --surface: #0F0F0E;
  --border: #222220;
  --cream: #F2EEE7;
  --text: #F2EEE7;
  --text-body: #D8D8D9;
  --text-dim: #A6A6A4;
  --text-subtle: #9E9D9C;
  --accent: #FE5825;
  --accent-tint: rgba(254, 88, 37, 0.10);
  --accent-line: #8A2C0E;
  --divider: #3B3B3A;
  --display: 'Barlow SC', 'Helvetica Neue', Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.25rem 1.375rem 4rem;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.masthead img {
  width: 30px;
  height: auto;
  display: block;
}

.masthead .word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.24em;
  color: var(--cream);
  line-height: 1;
  text-transform: uppercase;
}

.masthead .tag {
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
  margin-left: auto;
  text-align: right;
}

/* ---------------------------------------------------------------- type */

.eyebrow {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 11vw, 3.75rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 1.25rem;
}

h1 .accent { color: var(--accent); display: block; }

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 1.875rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
  margin: 2rem 0 0.5rem;
}

p { margin: 0 0 1.125rem; }

.lead { font-size: 19px; line-height: 1.55; color: var(--text); }

.small { font-size: 16px; color: var(--text-subtle); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(254, 88, 37, 0.35); }
a:hover, a:focus-visible { border-bottom-color: var(--accent); }

ul { margin: 0 0 1.125rem; padding-left: 1.15rem; }
li { margin-bottom: 0.5rem; }

strong { color: var(--cream); font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.375rem;
  margin: 0 0 0.875rem;
}

.card h3 { margin: 0 0 0.375rem; }
.card p { margin: 0; font-size: 16px; color: var(--text-dim); }

/* ---------------------------------------------------------------- the code */

.code-card {
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  margin: 0 0 1.5rem;
}

.code-card .label {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 0.75rem;
}

.code {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 15vw, 4rem);
  line-height: 1;
  letter-spacing: 0.14em;
  /* The trailing letter-spacing pushes the glyphs left of centre; pull them back. */
  text-indent: 0.14em;
  color: var(--cream);
  word-break: break-all;
  /* Selectable, so copying works with no JavaScript at all. */
  -webkit-user-select: all;
  user-select: all;
  margin: 0;
}

.code.is-handle {
  font-size: clamp(2rem, 10vw, 3rem);
  letter-spacing: 0.02em;
  text-indent: 0.02em;
  text-transform: none;
}

.copy {
  display: none;
  margin: 1.125rem auto 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  min-height: 44px;
}
.js .copy { display: inline-block; }
.copy:hover { border-color: var(--cream); }
.copy.is-done { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- the app button */

.cta-row { margin: 2rem 0 0.75rem; }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  border: 0;
}

/* Honest until the link exists: a flat, obviously-inert chip, not a button that
   looks alive and goes nowhere. site.js turns it into a real link the moment
   APP_LINK is filled in. */
.cta.is-waiting {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-subtle);
  cursor: default;
}

a.cta {
  background: var(--accent);
  color: #070707;
  border-bottom: 0;
}
a.cta:hover, a.cta:focus-visible { background: #ff6a3c; }

.cta-note {
  font-size: 16px;
  color: var(--text-subtle);
  margin: 0.625rem 0 0;
}

/* ---------------------------------------------------------------- steps */

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: step; }

.steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-body);
  font-size: 17px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.legal { font-size: 17px; }
.legal h2 { margin-top: 2.75rem; }
.legal .updated { color: var(--text-subtle); font-size: 16px; margin-bottom: 2.5rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 16px; }
.legal th { color: var(--cream); font-weight: 600; }
.legal td { color: var(--text-dim); }
.table-scroll { overflow-x: auto; }

/* Stacked by default. Two narrow columns on a 390 px phone squeeze the right-hand
   one into four-word lines, so the label sits above its row instead and only
   becomes a column once there is width for one. */
.legal th, .legal td { display: block; text-align: left; padding: 0; }
.legal th { padding-top: 1.125rem; }
.legal td { padding: 0.2rem 0 1.125rem; border-bottom: 1px solid var(--border); }
.legal tr:first-child th { padding-top: 0.25rem; }

@media (min-width: 34rem) {
  .legal th, .legal td {
    display: table-cell;
    vertical-align: top;
    padding: 0.75rem 0 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .legal th { width: 11rem; padding-right: 1.25rem; }
}

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

.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 16px;
  color: var(--text-subtle);
}

.footer nav { margin-bottom: 0.75rem; }
.footer nav a { margin-right: 1.25rem; color: var(--text-dim); border-bottom-color: transparent; }
.footer nav a:hover, .footer nav a:focus-visible { color: var(--cream); border-bottom-color: var(--divider); }

@media (min-width: 40rem) {
  .wrap { padding-top: 3.5rem; }
  .masthead { margin-bottom: 4rem; }
}

/* The join and profile pages toggle panels with the hidden attribute; the flex
   rules above would otherwise win. */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- open in app */

/* Revealed by site.js only, because only site.js knows the code or the handle
   that goes in the href. Outlined rather than filled: most people who land on
   this page do not have the app — the ones who do were caught by the universal
   link and never saw it — so the download stays the loud one. */
.open-row { margin: 0 0 1.75rem; }

.cta.is-open {
  background: transparent;
  border: 1px solid var(--cream);
  color: var(--cream);
}
a.cta.is-open:hover, a.cta.is-open:focus-visible { background: rgba(242, 238, 231, 0.08); }

.notice {
  margin: 0.875rem 0 0;
  padding: 0.875rem 1rem;
  font-size: 16px;
  color: var(--text-dim);
  background: var(--accent-tint);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
}
