/* Lotly website. Tokens follow docs/lotly-website-source-kit/design/tokens.css. */

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/PublicSans-400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/PublicSans-500Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/PublicSans-600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/PublicSans-700Bold.woff2') format('woff2');
}

:root {
  --page: #fdfcf6;
  --surface: #ffffff;
  --ink: #001f3e;
  --muted: #66747a;
  --muted-strong: #4a575d;
  --brand: #2b4a6c;
  --link: #3560a9;
  --accent: #e2ee57;
  --border: #d1d7d9;
  --showcase: #d8edff;
  --draft: #fff4c2;
  --draft-border: #c9a400;
  --font-ui: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --content-max: 1200px;
  --gutter: 64px;
  --body-size: 18px;
  --showcase-radius: 40px;
  --focus: 0 0 0 3px var(--page), 0 0 0 6px var(--link);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--body-size);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:focus-visible,
summary:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

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

.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 100px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: block;
  width: 150px;
  line-height: 0;
  border-radius: 8px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 395 / 200;
  object-fit: contain;
  background: var(--page);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 10px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-lede {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.45;
  text-wrap: balance;
}

.availability {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.status-pill {
  margin: 0;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.availability-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.anchor-link:hover {
  text-decoration: underline;
}

.anchor-link svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Showcase: desktop places both phones and the notification on a scaled 1200×960 stage. */

.showcase {
  margin: 44px 0 0;
}

.stage {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1200 / 960;
  overflow: hidden;
  border-radius: var(--showcase-radius);
  background: var(--showcase);
}

.phones {
  position: absolute;
  inset: 0;
}

.phone {
  --w: 300px;
  width: var(--w);
  padding: calc(var(--w) * 0.026);
  border-radius: calc(var(--w) * 0.155);
  background: #0d0f12;
  box-shadow:
    0 0 0 1px #2b2f36,
    0 0 0 calc(var(--w) * 0.006) #b9bfc7,
    0 24px 48px -16px rgb(0 31 62 / 0.28);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--w) * 0.13);
  background: var(--page);
}

.phone--feed {
  --w: 39.1667cqw;
  position: absolute;
  z-index: 1;
  left: 6.6667cqw;
  top: 4cqw;
}

/* The notification's text does not scale, so on narrower desktops it grows taller than its
   1440px proportion; the Detail phone starts below it instead of underneath it. */
.phone--detail {
  --w: 30.4167cqw;
  position: absolute;
  left: 48cqw;
  top: max(19.5833cqw, calc(4cqw + 200px));
  transform: rotate(3deg);
  transform-origin: 50% 0;
}

.notification {
  position: absolute;
  z-index: 2;
  right: 3.3333cqw;
  top: 4cqw;
  width: 36.6667cqw;
  margin: 0;
}

.notification figcaption {
  margin: 0 0 10px 4px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.4;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 12px 32px -12px rgb(0 31 62 / 0.22);
}

.toast img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 11px;
}

.toast-text {
  min-width: 0;
}

.toast-app {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.toast-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.toast-body {
  margin: 2px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.4;
}

.showcase-caption {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* How Lotly works */

.steps {
  margin-top: 72px;
  scroll-margin-top: 24px;
}

.steps ol {
  display: grid;
  /* One equal column per step, so a step held back from the review edition leaves no gap. */
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.steps img {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.steps p {
  max-width: 320px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

/* Footer */

.site-footer {
  margin-top: 88px;
}

.site-footer .container > .footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  border-left: 1px solid var(--border);
}

.footer-links a {
  display: inline-block;
  padding: 10px 20px;
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current='page'] {
  text-decoration: underline;
}

.footer-email {
  justify-self: end;
  margin: 0;
}

.footer-email a {
  display: inline-block;
  padding: 10px 0;
  color: var(--muted-strong);
}

.footer-note {
  margin: 0;
  padding: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Support, Privacy and Terms */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 32px;
}

.doc h1 {
  margin: 0 0 16px;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.doc h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.doc p,
.doc li {
  font-size: 18px;
  line-height: 1.65;
}

.doc p {
  margin: 0 0 16px;
}

.doc ul,
.doc ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.doc li + li {
  margin-top: 8px;
}

.doc h3 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.doc li > ul,
.doc li > ol {
  margin: 8px 0 0;
}

.doc code {
  font-size: 0.9em;
}

/* Legal tables scroll inside their own box so a narrow screen never scrolls the page sideways. */
.table-wrap {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.doc table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

.doc th,
.doc td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.doc th {
  font-weight: 600;
}

.doc tr + tr td,
.doc tbody tr:first-child td {
  border-top: 1px solid var(--border);
}

.doc-lede {
  color: var(--muted-strong);
  font-size: 20px;
}

.contact-card {
  margin: 24px 0 8px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-email {
  font-size: 22px;
  font-weight: 600;
}

.faq {
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.faq details[open] summary::after {
  transform: translateY(3px) rotate(-135deg);
}

.faq .answer {
  padding: 0 0 20px;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

.path {
  font-weight: 600;
}

/* Local drafts. scripts/check-site.mjs refuses publication while any [data-draft] remains. */

.draft-banner {
  margin: 0 0 32px;
  padding: 20px 24px;
  border: 2px solid var(--draft-border);
  border-radius: 12px;
  background: var(--draft);
}

.draft-banner p {
  margin: 0 0 8px;
  font-size: 16px;
}

.draft-banner p:last-child {
  margin-bottom: 0;
}

.draft-banner strong {
  font-weight: 700;
}

.draft-note {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--draft);
  box-shadow: inset 0 0 0 1px var(--draft-border);
  color: var(--ink);
  font-size: 0.92em;
}

/* Tablet */

@media (max-width: 1023px) {
  :root {
    --gutter: 32px;
  }

  .hero h1 {
    font-size: 56px;
  }

  .stage {
    aspect-ratio: auto;
    height: 760px;
    padding: 32px 32px 0;
  }

  .notification {
    position: relative;
    right: auto;
    top: auto;
    width: auto;
    max-width: 440px;
    margin: 0 auto;
  }

  .phones {
    top: 210px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 5cqw;
  }

  .phone--feed,
  .phone--detail {
    position: relative;
    left: auto;
    top: auto;
  }

  .phone--feed {
    --w: 44cqw;
  }

  .phone--detail {
    --w: 36cqw;
    margin-top: 12cqw;
  }

  .steps ol {
    gap: 32px;
  }
}

/* Mobile: an ordinary vertical flow, not a scaled desktop canvas. */

@media (max-width: 767px) {
  :root {
    --gutter: 20px;
    --body-size: 16px;
    --showcase-radius: 24px;
  }

  .site-header .container {
    min-height: 72px;
    gap: 4px 16px;
  }

  .brand {
    width: 110px;
  }

  .site-nav ul {
    gap: 0 20px;
  }

  .site-nav a {
    font-size: 14px;
    padding: 12px 0;
  }

  .hero {
    gap: 20px;
    padding-top: 16px;
  }

  .hero h1 {
    font-size: clamp(36px, 10.5vw, 44px);
  }

  .hero-lede {
    font-size: 18px;
  }

  .status-pill {
    font-size: 18px;
  }

  .anchor-link {
    font-size: 18px;
  }

  .stage {
    height: auto;
    padding: 20px 16px 28px;
  }

  .phones {
    position: static;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-top: 28px;
  }

  .phone--feed {
    --w: min(300px, 100cqw - 32px);
  }

  .phone--detail {
    --w: min(280px, 100cqw - 32px);
    margin-top: 0;
    transform: none;
  }

  .toast {
    gap: 12px;
    padding: 16px;
  }

  .steps {
    margin-top: 56px;
  }

  .steps ol {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    gap: 32px;
    text-align: left;
  }

  .steps img {
    margin: 0 0 12px;
  }

  .steps h3 {
    font-size: 22px;
  }

  .steps p {
    max-width: none;
    margin: 0;
    font-size: 18px;
  }

  .site-footer {
    margin-top: 64px;
  }

  .site-footer .container > .footer-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 4px;
  }

  .footer-links ul {
    justify-content: flex-start;
  }

  /* Four links wrap at phone widths; separators would start a wrapped row with a stray rule. */
  .footer-links li + li {
    border-left: 0;
  }

  .footer-links a {
    padding: 10px 24px 10px 0;
  }

  .footer-email {
    justify-self: start;
  }

  .footer-note {
    text-align: left;
  }

  .doc {
    padding-top: 16px;
  }

  .doc h1 {
    font-size: 36px;
  }

  /* Phone tables: each row becomes a block, and each cell shows its column name. */
  .doc table {
    min-width: 0;
  }

  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .doc tr,
  .doc td {
    display: block;
  }

  .doc td {
    padding: 4px 16px;
  }

  .doc td:first-child {
    padding-top: 14px;
    font-weight: 600;
  }

  .doc td:last-child {
    padding-bottom: 14px;
  }

  .doc td + td::before {
    content: attr(data-label) ': ';
    color: var(--muted-strong);
    font-weight: 600;
  }

  .doc tr + tr td,
  .doc tbody tr:first-child td {
    border-top: 0;
  }

  .doc tbody tr + tr {
    border-top: 1px solid var(--border);
  }

  .doc h2 {
    font-size: 22px;
    margin-top: 40px;
  }

  .doc p,
  .doc li {
    font-size: 17px;
    line-height: 1.6;
  }

  .faq summary {
    font-size: 18px;
  }
}
