/* oneappcompany.com
 *
 * The palette is the app's own Lumen skin, lifted from
 * lib/design/skin_tokens.dart in the calculator repository: warm off-white
 * ground, white cards on hairline borders, a near-black panel for the thing
 * you are meant to read first, and one deep green accent. A customer who has
 * used the app should recognise the site, and a customer who reaches the site
 * first should not be surprised by the app.
 *
 * Not the Play feature graphic. That is an orange-to-magenta gradient built to
 * survive a crowded search grid, which is a different job from a page somebody
 * has already chosen to open.
 */

:root {
  --canvas: #f6f5f1;
  --surface: #ffffff;
  --sunken: #efede6;
  --border: #e3e0d8;
  --border-strong: #cfc9bc;
  --text: #15181c;
  --text-2: #4a4740;
  --muted: #6e675c;
  --faint: #8c8579;
  --accent: #2f6f5e;
  --accent-wash: #eaf2ef;
  --panel: #15181c;
  --on-panel: #f6f5f1;
  --panel-accent: #7fd1b0;

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --page: 62rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0f1114;
    --surface: #16191e;
    --sunken: #1c2027;
    --border: #2a2f37;
    --border-strong: #3a414b;
    --text: #f1efe9;
    --text-2: #c3bfb6;
    --muted: #9a958b;
    --faint: #7e786e;
    --accent: #7fd1b0;
    --accent-wash: #17251f;
    --panel: #0a0c0f;
    --on-panel: #f1efe9;
    --panel-accent: #7fd1b0;
  }
}

* { box-sizing: border-box; }

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

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* An email address is one unbreakable token. At 200% text on a 360px screen
 * hello@oneappcompany.com is wider than the viewport, and without this it
 * pushes the whole page sideways rather than wrapping. `anywhere` rather than
 * `break-word` because only `anywhere` also shrinks the element's min-content
 * width, which is the measurement that was causing the overflow. */
body { overflow-wrap: break-word; }
a[href^="mailto:"], code { overflow-wrap: anywhere; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 10;
  background: var(--panel); color: var(--on-panel);
  padding: 0.6rem 1rem; border-radius: 8px;
}

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

/* ---------------------------------------------------------------- topbar */

.topbar {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.brand {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }

.brand-apps {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.brand-apps:hover { color: var(--accent); }

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

main { max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }

.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-icon {
  width: 88px; height: 88px;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  font-weight: 600;
}

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  line-height: 1.45;
  color: var(--text-2);
  margin: 0 0 0.85rem;
  max-width: 34em;
}

.tagline {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 34em;
}

.hero-home { border-bottom: none; }
.home-para { color: var(--text-2); max-width: 36em; }

.price {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 1.25rem 0 0;
}

/* ---------------------------------------------------------------- stores */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* min-width: 13rem alone overflows the viewport at 200% text, where 13rem is
   * 442px on a 360px screen. min() caps the floor at the container width, so
   * the button gives up its preferred size instead of pushing the page
   * sideways. */
  min-width: min(13rem, 100%);
  max-width: 100%;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--on-panel);
  border: 1px solid var(--panel);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.store-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(21, 24, 28, 0.16);
}

.store-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.72;
}

.store-name {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Not a link, and visibly not one. An app that is not on a store yet says so
 * rather than offering a button that goes nowhere. */
.store-btn-off {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  cursor: default;
}
.store-btn-off:hover { transform: none; box-shadow: none; }

/* The live action on a page whose store buttons are both still dead. Accent
 * rather than near-black, so it reads as the thing to press and not as a third
 * store. */
.store-btn-beta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent, #fff);
}
:root { --on-accent: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root { --on-accent: #0f1114; }
}

/* ------------------------------------------------------------- beta block */

.beta-blurb {
  max-width: 34em;
  color: var(--text-2);
  margin: 0 0 1.75rem;
  font-size: 1.02rem;
}

.beta-note {
  max-width: 34em;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 1.25rem 0 0;
}

/* --------------------------------------------------------------- sections */

.section { padding: 3rem 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }

.section > h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.prose p { max-width: 36em; color: var(--text-2); }
.prose p:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- reasons */

/* Three claims, set large enough to be read rather than scanned. Not cards in
 * a grid: a grid invites a fourth, a fifth, and the page becomes the spec
 * sheet this replaced. */

.reasons { counter-reset: reason; }

.reason {
  counter-increment: reason;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  max-width: 40em;
}
.reason:first-child { padding-top: 0; }
.reason:last-child { border-bottom: none; padding-bottom: 0; }

.reason h3 {
  font-size: clamp(1.25rem, 3.4vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.reason h3::before {
  content: counter(reason, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 0.75rem;
}

.reason p {
  margin: 0;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.6;
}

.reason ul { margin: 0.9rem 0 0; padding-left: 1.1rem; }
.reason li { color: var(--muted); line-height: 1.55; margin-bottom: 0.3rem; }

/* ------------------------------------------------- floating download bar */

/* Always visible, no script. The way to install the app is never more than a
 * glance away, and that must not depend on JavaScript running. */

.getbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.7rem 1.25rem calc(0.7rem + env(safe-area-inset-bottom));
}

@supports not (backdrop-filter: blur(1px)) {
  .getbar { background: var(--canvas); }
}

.getbar-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.getbar-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.getbar-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
  margin-right: auto;
}
.getbar-text strong {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.getbar-text span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keeps the footer clear of the bar. This has to sit on the page, not on a
 * spacer inside <main>: the footer is a sibling of main, so anything inside
 * main can never push it above a bar fixed to the viewport. */
.has-getbar .footer { padding-bottom: calc(8rem + env(safe-area-inset-bottom)); }

.stores-sm { flex: 0 0 auto; gap: 0.5rem; }
.stores-sm .store-btn {
  min-width: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
}

/* The bar is persistent chrome, not a hero. One line per button: the
 * sub-label is already explained by the page above, and carrying it here made
 * each button wrap to two lines — at 200% text that put the bar at 314px, a
 * third of the viewport, and pushed it over the footer. */
.stores-sm .store-sub { display: none; }
.stores-sm .store-name { font-size: 0.86rem; line-height: 1.2; }

/* On a phone the app's name is already at the top of the page; the two
 * buttons are what the bar is for, so they take the whole width. */
@media (max-width: 34rem) {
  .getbar { padding-left: 0.9rem; padding-right: 0.9rem; }
  .getbar-icon, .getbar-text { display: none; }
  .stores-sm { flex: 1 1 auto; }
  .stores-sm .store-btn { flex: 1 1 0; text-align: center; }

}

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

/* Screenshots scroll sideways rather than shrinking to unreadable thumbnails,
 * and the scroll is snapped so a phone lands on one shot at a time. */
.gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.shot {
  flex: 0 0 auto;
  width: min(15rem, 62vw);
  margin: 0;
  scroll-snap-align: start;
}

.shot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--sunken);
}

.shot figcaption {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.6rem;
}

.promo {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
}

.promo-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel);
}

.promo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Older browsers without aspect-ratio still get a 16:9 box. */
@supports not (aspect-ratio: 16 / 9) {
  .promo-frame { height: 0; padding-bottom: 56.25%; }
}

.promo-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.9rem 0 0;
}

/* ----------------------------------------------------------------- chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chip {
  font-size: 0.85rem;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* ----------------------------------------------------------------- facts */

.facts { margin: 0; }

.fact {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.fact:last-child { border-bottom: none; }

.fact dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.25rem;
}

.fact dd { margin: 0; color: var(--text-2); }

@media (max-width: 34rem) {
  .fact { grid-template-columns: 1fr; gap: 0.15rem; }
}

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

.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.app-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.app-card img {
  width: 64px; height: 64px;
  border-radius: 15px;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.app-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 600; }
.app-card p { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }

.app-card-price {
  font-family: var(--mono);
  font-size: 0.68rem !important;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint) !important;
  margin-top: 0.6rem !important;
}

/* ------------------------------------------------------------------- cta */

.cta { text-align: left; }
.cta-line {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.45;
  color: var(--text);
  max-width: 26em;
  margin: 0 0 1.5rem;
}
.cta-legal {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--faint);
  max-width: 42em;
  padding: 1.5rem 0 0;
  margin: 0;
}

/* -------------------------------------------------- documents (privacy) */

.page-head { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}
.eyebrow a { color: var(--muted); text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

.page-head h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}

.doc { padding: 2.5rem 0 4rem; }

.doc h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 0.85rem;
  scroll-margin-top: 1rem;
}

.doc h3 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 0.6rem; }

.doc p, .doc li { color: var(--text-2); max-width: 38em; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.45rem; }

.doc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.doc code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08em 0.35em;
}

/* Wide content scrolls inside its own box; the page body never scrolls
 * sideways. Same rule the app's layouts are held to. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: var(--surface);
}

table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }

th, td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--sunken);
  white-space: nowrap;
}

td { color: var(--text-2); }
tr:last-child td { border-bottom: none; }

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

.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p { margin: 0 0 0.4rem; }
.footer-brand { font-weight: 600; color: var(--text); }
.footer-fine { color: var(--faint); font-size: 0.82rem; max-width: 34em; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
