/* 278labs design system. Source of truth for every 278labs page. See DESIGN.md. */

/* 1. Tokens */
:root {
  --paper: #F5F3EF;
  --ink: #0B1B3A;
  --ink-soft: #3A4A6E;
  --muted: #5B6784;
  --accent: #D9551B;
  --accent-glow: #FF7F2A;

  --hairline: rgba(11, 27, 58, .12);
  --glass: rgba(255, 255, 255, .5);
  --glass-hover: rgba(255, 255, 255, .55);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-edge-hover: rgba(255, 255, 255, .9);
  --glass-blur: blur(22px) saturate(160%);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px -22px rgba(11, 27, 58, .25);
  --glass-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px -22px rgba(11, 27, 58, .22);
  --pill-fill: rgba(11, 27, 58, .045);
  --pill-edge: rgba(11, 27, 58, .09);

  --font: -apple-system, 'SF Pro Display', 'Helvetica Neue', Helvetica, sans-serif;
  --weight-light: 300;
  --weight-thin: 200;
  --weight-label: 400;

  --radius-pill: 999px;
  --radius-row: 28px;
  --radius-icon: 20px;
  --radius-frame: 30px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.2, .7, .2, 1);
  --reveal-time: 1.7s;

  --page-width: 1120px;
  --gutter: 32px;
}

/* 2. Base */
body { margin: 0; background: var(--paper); }
.container, .slot, .appicon, .frame, .strip, .shots, .consent, .btn, .tabs button { box-sizing: border-box; }
a { color: var(--ink); }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
.page {
  position: relative;
  overflow: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--weight-light);
  -webkit-font-smoothing: antialiased;
}
.container {
  position: relative;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
}

/* 3. Motion */
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes turn { to { transform: rotate(360deg); } }
.in { animation: fade 1.4s var(--ease-soft) both; }
.d1 { animation-delay: .15s; }
.d2 { animation-delay: .35s; }
.d3 { animation-delay: .55s; }
.rings { position: absolute; pointer-events: none; transform-origin: 50% 50%; animation: turn 240s linear infinite; }
.rv, .name, .slot, .plat, .stat {
  transition: opacity var(--reveal-time) var(--ease-out), transform var(--reveal-time) var(--ease-out), filter var(--reveal-time) var(--ease-out);
}
[data-js="1"] .rv:not(.row):not([data-in="1"]) { opacity: 0; transform: translateY(40px); filter: blur(8px); }
[data-js="1"] .row:not([data-in="1"]) .name { opacity: 0; transform: translateX(-64px); filter: blur(8px); }
[data-js="1"] .row:not([data-in="1"]) .plat,
[data-js="1"] .row:not([data-in="1"]) .stat { opacity: 0; transform: translateX(48px); filter: blur(6px); }
[data-js="1"] .row:not([data-in="1"]) .slot { opacity: 0; transform: scale(.55) rotate(-14deg); filter: blur(6px); }
.row[data-in="1"] .slot { transition-delay: .05s; }
.row[data-in="1"] .name { transition-delay: .14s; }
.row[data-in="1"] .plat { transition-delay: .26s; }
.row[data-in="1"] .stat { transition-delay: .36s; }
.rvl { transform-origin: 0 50%; transition: transform 1.9s var(--ease-out); }
[data-js="1"] .rvl:not([data-in="1"]) { transform: scaleX(0); }

/* 4. Surfaces */
.line { height: 1px; background: var(--hairline); }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}

/* 5. Navigation */
.topbar { margin-top: 28px; padding: 8px 12px 8px 28px; }
.brand { font-size: 18px; font-weight: var(--weight-light); letter-spacing: .14em; text-decoration: none; color: var(--ink); }
.brand .crumb { color: var(--muted); }
.toplinks { display: flex; gap: 22px; padding-right: 16px; }
.navlink { font-size: 14px; letter-spacing: .02em; color: var(--ink-soft); text-decoration: none; padding: 10px 4px; min-height: 24px; transition: color .3s; }
.navlink:hover { color: var(--accent); }

/* 6. Type */
.label { flex: 0 0 200px; font-size: 13px; font-weight: var(--weight-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.display { font-size: clamp(40px, 6.2vw, 84px); line-height: 1.06; font-weight: var(--weight-thin); letter-spacing: -0.035em; }
.lede { font-size: 18px; line-height: 1.65; color: var(--muted); }
.link { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(217, 85, 27, .55); padding-bottom: 2px; transition: color .3s, border-color .3s; }
.link:hover { color: var(--accent); border-color: var(--accent); }
.herohead { padding: 200px 0 220px; }

/* 7. Project row (list item with icon slot) */
.row {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 190px 100px 28px;
  grid-template-areas: "icon title plat stat arr";
  align-items: center;
  column-gap: 32px;
  padding: 38px 24px;
  margin: 0 -24px;
  border-radius: var(--radius-row);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
  transition: background .5s, border-color .5s, box-shadow .5s, opacity 1s var(--ease-soft), transform 1s var(--ease-soft);
}
a.row:hover {
  background: var(--glass-hover);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-edge-hover);
  box-shadow: var(--glass-shadow-hover);
}
.name { grid-area: title; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.title { font-size: 44px; font-weight: var(--weight-thin); letter-spacing: -0.03em; line-height: 1.05; }
.desc { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 560px; }
.plat { grid-area: plat; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.stat, .pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--pill-fill);
  border: 1px solid var(--pill-edge);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
}
.stat { grid-area: stat; }
.pill { font-size: 12px; padding: 5px 12px; gap: 7px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dot.ok { background: var(--ink); }
.stat .dot { width: 4px; height: 4px; }
.slot {
  grid-area: icon;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: var(--weight-thin);
  color: var(--muted);
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px -14px rgba(11, 27, 58, .35);
  overflow: hidden;
}
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.art, .appicon.art { background: none; border: 0; box-shadow: none; overflow: visible; }
.slot.art img, .appicon.art img { object-fit: contain; filter: drop-shadow(0 10px 14px rgba(11, 27, 58, .28)); }
.arrow { grid-area: arr; justify-self: end; font-size: 20px; color: var(--muted); transition: transform .5s var(--ease-soft), color .3s; }
a.row:hover .arrow { transform: translateX(6px); color: var(--accent); }

/* 8. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: var(--weight-label);
  text-decoration: none;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  transition: transform .35s var(--ease-soft), color .3s;
}
.btn:hover { transform: translateY(-2px); color: var(--accent); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { color: #fff; }

/* 9. Product page: app icon, stories, facts, device frames */
.appicon {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, 0 22px 40px -20px rgba(11, 27, 58, .45);
}
.appicon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.badge { display: inline-block; line-height: 0; transition: transform .35s var(--ease-soft); }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 48px; width: auto; display: block; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px 64px; padding: 44px 0; border-top: 1px solid var(--hairline); align-items: start; }
.story h3, .story h2 { font-size: 36px; font-weight: var(--weight-thin); letter-spacing: -0.025em; line-height: 1.1; }
.story p { font-size: 18px; line-height: 1.65; color: var(--muted); }
.story p + p { margin-top: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.fact { padding: 22px 0; border-top: 1px solid var(--hairline); }
.fact dt { font-size: 13px; font-weight: var(--weight-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.fact dd { margin: 0; font-size: 20px; line-height: 1.5; letter-spacing: -0.01em; }
.tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: var(--radius-pill); }
.tabs button { font: inherit; font-size: 14px; font-weight: var(--weight-light); letter-spacing: .02em; color: var(--ink-soft); background: transparent; border: 0; padding: 10px 20px; min-height: 40px; border-radius: var(--radius-pill); cursor: pointer; transition: background .3s, color .3s; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.strip { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 28px 0; margin: 0 calc(var(--gutter) * -1) 0 0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(11, 27, 58, .28) transparent; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: rgba(11, 27, 58, .22); border-radius: 999px; }
.strip::-webkit-scrollbar-track { background: transparent; }
.strip-nav { display: inline-flex; gap: 8px; }
.strip-nav button { width: 44px; height: 44px; padding: 0; border-radius: var(--radius-pill); font: inherit; font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; transition: transform .35s var(--ease-soft), color .3s; }
.strip-nav button:hover { transform: translateY(-2px); color: var(--accent); }
.strip-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.strip[hidden] { display: none; }
.frame { margin: 0; flex: 0 0 auto; scroll-snap-align: start; padding: 8px; border-radius: var(--radius-frame); }
.frame img { display: block; border-radius: 22px; height: auto; width: 100%; }
.frame figcaption { padding: 14px 8px 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.frame.phone { width: clamp(200px, 22vw, 250px); }
.frame.tablet { width: clamp(280px, 34vw, 400px); }
.shots { display: flex; gap: 18px; margin-top: 32px; padding: 0 0 44px 104px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: rgba(11, 27, 58, .28) transparent; }
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-thumb { background: rgba(11, 27, 58, .22); border-radius: 999px; }
.shots .frame { width: clamp(150px, 16vw, 190px); padding: 6px; border-radius: 24px; }
.shots .frame img { border-radius: 18px; }

/* 10. Consent banner */
.consent { font-family: var(--font); font-weight: var(--weight-light); position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 16px 14px 24px; border-radius: 28px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.consent[hidden] { display: none; }
.consent .actions { display: flex; gap: 8px; }
.consent button { font: inherit; font-size: 14px; min-height: 40px; padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid var(--glass-edge); background: var(--glass); color: var(--ink); cursor: pointer; }
.consent button.accept { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 11. Footer */
.footer { margin-top: 160px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 14px; letter-spacing: .02em; color: var(--muted); }

/* 12. Small screens */
@media (max-width: 900px) {
  .topbar { margin-top: 12px; padding: 4px 6px 4px 20px; }
  .brand { font-size: 16px; letter-spacing: .1em; }
  .toplinks { gap: 8px; padding-right: 4px; }
  .navlink { font-size: 13px; padding: 10px 6px; }
  .herohead { padding: 120px 0 140px; }
  .row { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "icon title" "icon plat" "icon stat"; column-gap: 18px; row-gap: 8px; padding: 28px 16px; margin: 0 -16px; align-items: start; }
  .arrow { display: none; }
  .slot { width: 64px; height: 64px; border-radius: 18px; }
  .title { font-size: 30px; }
  .desc { font-size: 16px; }
  .label { flex: 0 0 100%; }
  .story { grid-template-columns: 1fr; padding: 32px 0; }
  .story h3, .story h2 { font-size: 30px; }
  .facts { grid-template-columns: 1fr; }
  .shots { padding-left: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .in, .rings { animation: none; }
  .rv, .rvl, .row, .name, .slot, .plat, .stat { transition: none; }
}

/* 13. Developer tools: code, command tables, chat illustration, numbers, bars */
:root { --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.code { margin: 0; padding: 20px 24px; border-radius: 22px; background: var(--pill-fill); border: 1px solid var(--pill-edge); overflow-x: auto; font: var(--weight-label) 14.5px/1.75 var(--mono); color: var(--ink); white-space: pre; scrollbar-width: thin; scrollbar-color: rgba(11, 27, 58, .28) transparent; }
.code .c { color: var(--muted); }
.mono { font-family: var(--mono); font-weight: var(--weight-label); font-size: .92em; }
.steps { counter-reset: step; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 24px; padding: 32px 0; border-top: 1px solid var(--hairline); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 14px; color: var(--muted); padding-top: 8px; }
.step h3 { font-size: 30px; font-weight: var(--weight-thin); letter-spacing: -0.02em; line-height: 1.15; }
.step p { margin-top: 10px; font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 640px; }
.step .code { margin-top: 16px; max-width: 760px; }
.step > div { grid-column: 2; }
.cmds { width: 100%; border-collapse: collapse; }
.cmds caption { text-align: left; padding: 0 0 16px; font-size: 13px; font-weight: var(--weight-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cmds th, .cmds td { text-align: left; vertical-align: top; padding: 16px 24px 16px 0; border-top: 1px solid var(--hairline); font-weight: var(--weight-light); }
.cmds th { width: 34%; font-family: var(--mono); font-weight: var(--weight-label); font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.cmds td { font-size: 16px; line-height: 1.6; color: var(--muted); }
.table-block + .table-block { margin-top: 56px; }
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.number { padding: 28px 0 8px; border-top: 1px solid var(--hairline); }
.number b { display: block; font-size: clamp(36px, 4.6vw, 60px); font-weight: var(--weight-thin); letter-spacing: -0.03em; line-height: 1.05; }
.number span { display: block; margin-top: 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.spark { margin-top: 36px; height: 96px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--hairline); }
.spark i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--ink); opacity: .5; transition: opacity .3s; }
.spark i:hover { opacity: .85; }
.spark-axis { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.note { margin-top: 20px; font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.chats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.chat { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 30px; }
.chat h3 { font-size: 13px; font-weight: var(--weight-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg { max-width: 92%; padding: 12px 16px; border-radius: 20px; font-size: 14.5px; line-height: 1.55; }
.msg .code { margin: 8px 0; padding: 10px 14px; border-radius: 14px; font-size: 13px; }
.msg.bot { align-self: flex-start; background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .95); color: var(--ink-soft); }
.msg.you { align-self: flex-end; background: var(--ink); color: #fff; }
.msg.pane { align-self: flex-start; background: var(--pill-fill); border: 1px solid var(--pill-edge); font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); word-break: break-word; }
.msg small { display: block; margin-top: 6px; font-size: 12px; color: inherit; opacity: .7; }

@media (max-width: 900px) {
  .step { grid-template-columns: 1fr; }
  .step > div { grid-column: 1; }
  .step::before { padding-top: 0; }
  .cmds th { width: auto; white-space: normal; }
  .cmds th, .cmds td { display: block; padding: 0; border: 0; }
  .cmds tr { display: block; padding: 14px 0; border-top: 1px solid var(--hairline); }
  .cmds td { margin-top: 4px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chats { grid-template-columns: 1fr; }
}

/* 14. Document pages (policies, FAQ) and language switcher */
.display.sm { font-size: clamp(34px, 5vw, 64px); }
.story ul { margin: 14px 0 0; padding-left: 22px; list-style: disc; font-size: 18px; line-height: 1.65; color: var(--muted); }
.story li { margin-top: 8px; }
.story.qa { padding: 30px 0; }
.story.qa h3 { font-size: 22px; line-height: 1.35; letter-spacing: -0.015em; }
.story.qa p { font-size: 17px; }
.group { margin: 0; padding: 72px 0 18px; font-size: 13px; font-weight: var(--weight-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 40px; }
.langs select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: var(--weight-light); color: var(--ink); min-height: 44px; padding: 0 44px 0 20px; border-radius: var(--radius-pill); border: 1px solid var(--glass-edge); background: var(--glass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235B6784' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 18px center; box-shadow: var(--glass-shadow); cursor: pointer; }
.langs select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[dir="rtl"] .langs select { padding: 0 20px 0 44px; background-position: left 18px center; }
[dir="rtl"] .story ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .row .arrow, [dir="rtl"] .arrow { transform: scaleX(-1); }

/* 15. Product identity: icon, name and the studio byline */
.product { display: flex; align-items: center; gap: 22px; }
.product-name { display: block; font-size: 26px; font-weight: var(--weight-thin); letter-spacing: -0.02em; line-height: 1.1; }
.byline { display: block; margin-top: 6px; font-size: 13px; font-weight: var(--weight-light); letter-spacing: .14em; color: var(--muted); }
.byline a { color: inherit; text-decoration: none; transition: color .3s; }
.byline a:hover { color: var(--accent); }
p.byline { margin: 0 0 26px; }

/* 16. Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 17. Right-to-left: mirror the bleed of the screenshot strip */
[dir="rtl"] .strip { margin: 0 0 0 calc(var(--gutter) * -1); padding: 8px 0 28px var(--gutter); }
