/* ============================================================
   combocaller.app — the whole stylesheet.

   The palette, the two families and the uppercase mono labels are the app's
   own, lifted from `public/styles.css` so the page and the product look like
   one thing. What the page adds is the editorial scaffolding a phone screen
   has no room for: hairline rules, an asymmetric hero, and one chart.
   ============================================================ */

:root {
  --bg: #131211;
  --panel: #1a1815;
  --raise: #221f1a;
  --line: #2b2823;
  --line-hard: #3a352e;

  --fg: #f2efe9;
  --fg-2: #e6e2da;
  --muted: #b6b0a6;
  --dim: #9e978c;
  --dim-2: #6c655a;

  --amber: #f0a94a;
  --red: #e0563f;

  --sans: Archivo, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --pad: clamp(1.25rem, 5vw, 5.5rem);
  --rule: 1px solid var(--line);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A gym is not a flat colour. Turbulence at 4% over the whole page, fixed so
   it does not swim while scrolling. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--fg); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.02; }

p { margin: 0; }

em { font-style: normal; color: var(--amber); }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- the bar ---------- */

.bar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .9rem var(--pad);
  border-bottom: var(--rule);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--dim);
}

.bar-name { color: var(--fg); font-weight: 700; }
.bar-mid { color: var(--amber); }
.bar-meta { margin-left: auto; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding: clamp(3rem, 8vw, 6.5rem) var(--pad) 0;
  border-bottom: var(--rule);
}

.hero-text { padding-bottom: clamp(3rem, 7vw, 6rem); max-width: 33rem; }

h1 {
  margin: 1.1rem 0 1.6rem;
  font-size: clamp(2.5rem, 5.1vw, 4.3rem);
  letter-spacing: -.035em;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.17rem);
  max-width: 33rem;
}

.cta { margin-top: 2.4rem; }

/* Apple asks for one quarter of the badge height in clear space, and for a
   badge nobody has redrawn: the SVG under img/ is theirs, untouched. */
.badge {
  display: inline-block;
  padding: .3rem;
  margin: -.3rem;
  transition: opacity .2s;
}
.badge:hover { opacity: .78; }
.badge img { width: 150px; height: auto; }

.cta-note {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--dim);
}

/* The screen runs past the rule under it. A phone photographed inside a tidy
   box is a stock image; one that leaves the frame is a product. */
.hero-shot {
  margin-bottom: -3px;
  justify-self: end;
  width: min(100%, 350px);
}

.hero-shot img {
  border: 1px solid var(--line-hard);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -2px 60px rgba(0, 0, 0, .55);
}

/* ---------- the chart ---------- */

.chart-block {
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad);
  border-bottom: var(--rule);
}

.chart-block h2 {
  margin: .9rem 0 1.3rem;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.chart-intro {
  color: var(--muted);
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* The scale is one variable. Every bar is a percentage of `--span` seconds and
   the ruler reserves the same right-hand gutter as the tracks, so a tick and a
   bar end at the same pixel. */
.chart { --span: 3.4; --gutter: 4.6rem; }

.ruler {
  position: relative;
  height: 1.4rem;
  margin-right: var(--gutter);
  border-bottom: 1px dashed var(--line-hard);
}

.ruler span {
  position: absolute;
  left: calc(var(--t) / var(--span) * 100%);
  bottom: .25rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--dim-2);
  transform: translateX(-2px);
}
.ruler span::after {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 1px;
  height: .3rem;
  background: var(--line-hard);
}

.row { padding: 1.4rem 0; border-bottom: var(--rule); }

.row-name {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: .7rem;
}

.track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--gutter);
  align-items: center;
}

.bars {
  position: relative;
  display: flex;
  height: 2.6rem;
  align-items: stretch;
}

.seg {
  flex: 0 0 calc(var(--d) / var(--span) * 100%);
  background: var(--raise);
  border: 1px solid var(--line-hard);
  border-right: 0;
  font-style: normal;
  display: flex;
  align-items: center;
  overflow: hidden;
  transform-origin: left center;
  animation: grow .7s cubic-bezier(.22, 1, .36, 1) both;
}
.seg:last-of-type { border-right: 1px solid var(--line-hard); }

.seg b {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  padding-left: .5rem;
  white-space: nowrap;
}

.seg.is-kick { background: #2a2118; border-color: #55432a; }
.seg.is-kick b { color: var(--amber); }

/* The bag going away is dead time, not work: hatched, and not solid. */
.seg.is-bag {
  background:
    repeating-linear-gradient(-45deg, transparent 0 5px, rgba(158, 151, 140, .13) 5px 6px);
  border-color: var(--line);
  border-style: dashed;
}
.seg.is-bag b { color: var(--dim-2); }

.seg:nth-of-type(2) { animation-delay: .07s; }
.seg:nth-of-type(3) { animation-delay: .14s; }
.seg:nth-of-type(4) { animation-delay: .21s; }
.seg:nth-of-type(5) { animation-delay: .28s; }

@keyframes grow { from { transform: scaleX(0); opacity: 0 } to { transform: scaleX(1); opacity: 1 } }

.tot {
  padding-left: .8rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--fg);
  white-space: nowrap;
}

.row-beat { border-bottom: 0; padding-bottom: 0; }
.row-beat .bars { height: 4.6rem; }

.beat {
  position: absolute;
  left: calc(var(--t) / var(--span) * 100%);
  top: 0;
  width: 2px;
  height: 1.5rem;
  background: var(--red);
}
.beat::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 4.6rem;
  background: linear-gradient(var(--red), transparent);
  opacity: .35;
}

.beat-note {
  position: absolute;
  left: calc(var(--t) / var(--span) * 100%);
  top: 1.9rem;
  margin-left: .6rem;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--red);
}

.chart-src {
  margin-top: 2.6rem;
  max-width: 70ch;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--dim-2);
  border-left: 2px solid var(--line-hard);
  padding-left: 1rem;
}

/* ---------- figures ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: var(--rule);
}

.figures div {
  padding: clamp(1.6rem, 3vw, 2.6rem) var(--pad);
  border-right: var(--rule);
}
.figures div:last-child { border-right: 0; }
.figures div:not(:first-child) { padding-left: clamp(1rem, 2.5vw, 2rem); }

.figures b {
  display: block;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.figures div:last-child b { color: var(--amber); }

.figures span {
  display: block;
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- the list ---------- */

.list { padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(3rem, 6vw, 5rem); }

.list article {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.8rem, 3.5vw, 2.6rem) 0;
  border-bottom: var(--rule);
}
.list article:last-child { border-bottom: 0; }

.idx {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--dim-2);
  padding-top: .35rem;
}

.list h3 {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  margin-bottom: .6rem;
}

.list p { color: var(--muted); max-width: 66ch; }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0 var(--pad) clamp(3.5rem, 7vw, 6rem);
}

.gallery figure { margin: 0; }

.gallery img {
  border: 1px solid var(--line-hard);
  border-radius: 20px;
  background: var(--panel);
}

.gallery figcaption {
  margin-top: .9rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- the negative ---------- */

.never {
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad);
  border-top: var(--rule);
  border-bottom: var(--rule);
  background: #100f0e;
}

.never h2 {
  margin: .9rem 0 1.4rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  max-width: 18ch;
}

.never p { color: var(--muted); max-width: 64ch; }

/* ---------- close ---------- */

.close {
  padding: clamp(4rem, 9vw, 7rem) var(--pad);
  text-align: center;
}

.close h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 2rem;
}

.close .badge img { width: 180px; }
.close .cta-note { margin-top: 1.2rem; }

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

footer {
  display: grid;
  gap: 1.2rem;
  padding: 2.2rem var(--pad) 3rem;
  border-top: var(--rule);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--dim-2);
}

.foot-name { color: var(--fg-2); }

footer nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
footer a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--line-hard); padding-bottom: 2px; }
footer a:hover { color: var(--amber); border-color: var(--amber); }

.foot-legal { line-height: 1.8; letter-spacing: .06em; }

/* ---------- the page arriving ---------- */

.hero-text > *, .hero-shot {
  animation: rise .8s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-text .eyebrow { animation-delay: .05s; }
.hero-text h1 { animation-delay: .12s; }
.hero-text .lede { animation-delay: .2s; }
.hero-text .cta { animation-delay: .28s; }
.hero-shot { animation-delay: .18s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: clamp(2.5rem, 9vw, 4rem); }
  .hero-text { padding-bottom: 2.5rem; max-width: none; }
  h1 { font-size: clamp(2.4rem, 8.4vw, 3.4rem); }
  .hero-shot { justify-self: center; width: min(78%, 300px); }

  .figures { grid-template-columns: 1fr 1fr; }
  .figures div { border-bottom: var(--rule); padding-left: var(--pad); }
  .figures div:nth-child(2n) { border-right: 0; }
  .figures div:nth-child(n+3) { border-bottom: 0; }

  .list article { grid-template-columns: 1fr; gap: .4rem; }
  .idx { padding-top: 0; }

  .gallery { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar-mid { display: none; }

  /* Two and a half seconds of bar in 300 points is unreadable, so the labels
     go and the shape stays. */
  .seg b { display: none; }
  .chart { --gutter: 3.6rem; }
  .bars { height: 2.1rem; }
  .row-beat .bars { height: 4rem; }
  .beat-note { font-size: .62rem; margin-left: .4rem; }
  .tot { font-size: .7rem; margin-left: .5rem; }
}

/* ============================================================
   Pages beyond the home page: guides and comparisons.

   The home page argues in one screen. These read like an article, so they get
   a measure (`--col`, 38rem), running prose, tables that scroll rather than
   squeeze, and pull quotes for the App Store reviews they cite. Everything
   else — palette, families, hairline rules, uppercase mono labels — is what
   the home page already uses.
   ============================================================ */

:root { --col: 38rem; }

.bar-name, .bar-meta { text-decoration: none; }
.bar-meta:hover, .bar-name:hover { color: var(--amber); }

/* ---------- article head ---------- */

.lead-in {
  padding: clamp(3rem, 8vw, 6rem) var(--pad) clamp(2rem, 4vw, 3rem);
  border-bottom: var(--rule);
}
.lead-in h1 {
  margin: 1.1rem 0 1.4rem;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  letter-spacing: -.035em;
  max-width: 20ch;
}
.lead-in .lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  max-width: var(--col);
}
.stamp {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim-2);
}

/* ---------- running prose ---------- */

.prose { padding: clamp(2.5rem, 5vw, 4rem) var(--pad); border-bottom: var(--rule); }
.prose > * { max-width: var(--col); }
.prose h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  max-width: 22ch;
}
.prose h3 {
  margin: 2.2rem 0 .6rem;
  font-size: 1.08rem;
  letter-spacing: -.01em;
}
.prose p { margin: 0 0 1rem; color: var(--fg-2); }
.prose p.note { color: var(--dim); font-size: .95rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--fg-2); }
.prose li { margin-bottom: .5rem; }
.prose a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--fg); font-weight: 600; }

/* A review someone wrote on a competitor's listing. It is somebody else's
   sentence, so it is set apart and it carries its star count and store. */
.cite {
  margin: 1.4rem 0;
  padding: .1rem 0 .1rem 1.1rem;
  border-left: 2px solid var(--line-hard);
  max-width: var(--col);
}
.cite p { margin: 0 0 .4rem; color: var(--fg); font-size: 1rem; }
.cite span {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--dim-2);
  text-transform: uppercase;
}
.cite.hot { border-left-color: var(--red); }

/* ---------- tables ---------- */

.scroll { overflow-x: auto; margin: 1.4rem 0 1.2rem; max-width: none; }
.scroll table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: .84rem; }
.scroll th, .scroll td {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: var(--rule);
  white-space: nowrap;
}
.scroll th {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
  border-bottom: 1px solid var(--line-hard);
}
.scroll td { color: var(--fg-2); }
.scroll td:first-child { color: var(--fg); font-weight: 500; white-space: normal; min-width: 14rem; }
.scroll tr.self td { background: var(--raise); color: var(--fg); }
.scroll tr.self td:first-child { color: var(--amber); }
.scroll .num { font-family: var(--mono); font-size: .78rem; }
.scroll-note {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  color: var(--dim-2);
  text-transform: uppercase;
}

/* ---------- the two-column verdict ---------- */

.face-off {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--rule);
  max-width: none;
  margin: 1.6rem 0;
}
.face-off > div { padding: 1.2rem 1.4rem 1.4rem 0; }
.face-off > div + div { padding-left: 1.4rem; border-left: var(--rule); }
.face-off p.eyebrow { margin-bottom: .8rem; }
.face-off ul { margin: 0; padding-left: 1rem; font-size: .95rem; }

/* ---------- combo catalogue ---------- */

.combo-grid { display: grid; gap: 0; max-width: none; margin: 1.2rem 0; border-top: var(--rule); }
.combo-grid div {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: var(--rule);
  align-items: baseline;
}
.combo-grid b {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--amber);
  font-weight: 500;
}
.combo-grid span { color: var(--fg-2); font-size: .95rem; }

/* ---------- FAQ ---------- */

.faq { padding: clamp(3rem, 6vw, 5rem) var(--pad); border-bottom: var(--rule); }
.faq h2 { margin: .9rem 0 2rem; font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 18ch; }
.qa-list { display: grid; gap: 0; border-top: var(--rule); }
.qa { padding: 1.4rem 0; border-bottom: var(--rule); max-width: var(--col); }
.qa h3 { font-size: 1.02rem; margin-bottom: .5rem; }
.qa p { color: var(--muted); font-size: .97rem; }
.qa a { color: var(--amber); }

/* ---------- read next ---------- */

.more { padding: clamp(2.5rem, 5vw, 4rem) var(--pad); border-bottom: var(--rule); }
.more .eyebrow { margin-bottom: 1rem; }
.more .eyebrow + .more-list { margin-bottom: 2.2rem; }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: var(--rule); }
.more-list li { border-bottom: var(--rule); }
.more-list a {
  display: grid;
  gap: .2rem;
  padding: .9rem 0;
  text-decoration: none;
}
.more-list a:hover b { color: var(--amber); }
.more-list b { font-weight: 600; font-size: 1rem; }
.more-list span { color: var(--dim); font-size: .9rem; }

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

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin: 1.8rem 0 2rem;
}
.foot-cols a {
  display: block;
  color: var(--dim);
  text-decoration: none;
  font-size: .88rem;
  padding: .2rem 0;
}
.foot-cols a:hover { color: var(--amber); }
.foot-h {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: .5rem;
}
.foot-name a { text-decoration: none; }

@media (max-width: 860px) {
  .face-off { grid-template-columns: 1fr; }
  .face-off > div + div { padding-left: 0; border-left: 0; border-top: var(--rule); }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .combo-grid div { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---------- one screen, inside an article ----------
   The gallery on the home page is three phones in a row. Inside a guide a
   screenshot is evidence for the paragraph above it, so it sits alone, narrow,
   with a caption that says what to look at rather than what it is. */

.shot {
  margin: 2rem 0;
  max-width: 300px;
}
.shot img { border: var(--rule); }
.shot figcaption {
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--dim);
  text-transform: uppercase;
}
