/* Lyvogo mobile web demo — landing page. Colours, type and radii from docs/design/tokens.json
   (light theme): navy.800 brand, gold.500 decorative accent, gray ramp, status.info for the demo
   marker. Inter is served from this origin (OFL, same files as the apps' lyvogo_tokens). */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/Inter-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/Inter-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/Inter-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('fonts/Inter-Bold.ttf') format('truetype'); }

:root {
  --brand: #0E2C5C;          /* brand.primary  navy.800 */
  --brand-subtle: #EEF3FB;   /* brand.primary-subtle navy.50 */
  --accent: #C9A227;         /* brand.accent-decorative gold.500 */
  --bg: #F7F9FC;             /* bg.subtle gray.25 */
  --surface: #FFFFFF;        /* surface.default */
  --border: #D9DFE7;         /* border.default gray.200 */
  --border-subtle: #E8ECF2;  /* border.subtle gray.100 */
  --text: #161A22;           /* text.primary gray.900 */
  --text-2: #4F5868;         /* text.secondary gray.600 */
  --info-fg: #174F9E;        /* status.info.fg blue.700 */
  --info-bg: #EAF2FD;        /* status.info.bg blue.50 */
  --info-border: #CFE1FA;    /* status.info.border blue.100 */
  --focus: #1F64C4;          /* focus.ring blue.600 */
  --bezel: #161A22;          /* gray.900 */
  --phone-w: 390px;
  --phone-h: 844px;
  --bezel-w: 10px;
  --s: 1;                    /* frame scale, set by landing.js */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top { background: var(--surface); border-bottom: 1px solid var(--border-subtle); }
.top-inner {
  max-width: 1440px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; }
.mark span { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); }
.wordmark { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; }
.demo-pill {
  font-size: 12px; line-height: 16px; font-weight: 600; color: var(--info-fg);
  background: var(--info-bg); border: 1px solid var(--info-border); border-radius: 999px; padding: 4px 10px;
}

main { max-width: 1440px; margin: 0 auto; padding: 24px 16px 8px; }
.intro { max-width: 860px; }
.intro h1 { font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; }
.intro p { margin: 0 0 16px; color: var(--text-2); }
.lang { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lang-label { font-size: 14px; line-height: 20px; color: var(--text-2); margin-right: 4px; }
.lang button, .chips button {
  font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; cursor: pointer;
  min-height: 32px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.lang button { min-width: 44px; font-weight: 600; }
.lang button[aria-pressed='true'], .chips button[aria-pressed='true'] {
  background: var(--brand); border-color: var(--brand); color: #FFFFFF;
}
.lang button:hover:not([aria-pressed='true']), .chips button:hover:not([aria-pressed='true']) {
  background: var(--brand-subtle); border-color: #B9CCEB;
}

.apps {
  display: grid; gap: 24px; margin-top: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.app {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.app-head { display: flex; align-items: center; gap: 12px; }
.app-head img { border-radius: 12px; flex: none; }
.app h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 0; }
.app-kind { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
.app-desc { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-2); min-height: 80px; }
/* Two chip rows on every card, so the three phones line up. */
.chips { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 70px; }

/* Phone frame: the iframe always has the 390 x 844 viewport of the Figma frames; the frame is
   scaled as a whole to fit the window. */
.phone-slot {
  width: calc((var(--phone-w) + 2 * var(--bezel-w)) * var(--s));
  height: calc((var(--phone-h) + 2 * var(--bezel-w)) * var(--s));
  margin: 4px auto 0;
}
.phone {
  width: calc(var(--phone-w) + 2 * var(--bezel-w));
  height: calc(var(--phone-h) + 2 * var(--bezel-w));
  padding: var(--bezel-w);
  border-radius: 52px;
  background: var(--bezel);
  box-shadow: 0 12px 32px rgba(12, 15, 20, 0.16), 0 2px 6px rgba(12, 15, 20, 0.08);
  transform: scale(var(--s));
  transform-origin: top left;
}
.phone iframe {
  display: block; width: var(--phone-w); height: var(--phone-h);
  border: 0; border-radius: 42px; background: #FFFFFF;
}

.open {
  align-self: center; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: 12px;
  font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none;
  color: var(--brand); border: 1px solid var(--border); background: var(--surface);
}
.open:hover { background: var(--brand-subtle); }

.foot { max-width: 1440px; margin: 0 auto; padding: 16px 16px 32px; }
.foot p { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-2); max-width: 860px; }

@media (max-width: 1100px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones and small tablets: the apps open full screen; frames would be too small to use. */
@media (max-width: 720px) {
  .apps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .phone-slot { display: none; }
  .app-desc { min-height: 0; }
  .chips { min-height: 0; }
  .chips-empty { display: none; }
  .open { align-self: stretch; background: var(--brand); color: #FFFFFF; border-color: var(--brand); }
  .open:hover { background: #081D40; }
  .intro h1 { font-size: 24px; line-height: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .lang button, .chips button, .open { transition: background-color 120ms ease, border-color 120ms ease; }
}
