/* PrimTrim website. Tokens mirror primtrim_ui (PrimColors, PrimSpace) so the
   site and the app read as one product: black on white, one green, the same
   control height and radii, and taps that dim on press like the app's
   Tappable. The brand device is the logo's two offset bars (.framed). */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --surface: #f6f6f6;
  --raised: #eaeaea;
  --line: #e2e2e2;
  --muted: #5e5e5e;
  --green: #06c167;
  --green-text: #037a3f;
  --on-green: #ffffff;
  --mark: #ffe680;

  --page: 20px;
  --section: clamp(64px, 10vw, 128px);
  --radius: 16px;
  --control-radius: 12px;
  --control-h: 54px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Satoshi', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --ink: #ffffff;
    --surface: #1c1c1e;
    --raised: #2c2c2e;
    --line: #38383a;
    --muted: #afafaf;
    --green: #1fc77c;
    --green-text: #1fc77c;
    --on-green: #000000;
    --mark: #6b5a00;
  }
}

@media (prefers-contrast: more) {
  :root { --line: #8a8a8a; --muted: #3a3a3a; }
  @media (prefers-color-scheme: dark) { :root { --line: #8a8a8a; --muted: #d6d6d6; } }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;               /* 16px: smaller than the app's 17 (Sika, 29 Nov 2026) */
  line-height: 1.55;
  letter-spacing: 0;
  font-feature-settings: 'ss01' 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
button { font: inherit; color: inherit; }
.i { width: 1.2em; height: 1.2em; flex: none; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: max(var(--page), env(safe-area-inset-left)) max(var(--page), env(safe-area-inset-right));
}
/* Narrow pages keep the site's left edge; only their measure shrinks. */
.narrow > * { max-width: 720px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--control-radius);
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* Size-specific tracking and leading: tighter as type grows. */
.display {
  font-size: clamp(2rem, 5.6vw, 4.25rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.026em; }
.h2 { font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.15; letter-spacing: -0.018em; }
.h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.h4 { font-size: 1rem; line-height: 1.4; }
.lede { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.5; letter-spacing: -0.004em; max-width: 36em; }
.muted { color: var(--muted); }
.fine { font-size: 0.875rem; color: var(--muted); letter-spacing: 0.003em; margin: 0; }

/* ---------- The logo's bars ----------
   In the wordmark a bar sits over the start of the word and another under its
   end. Headings carry the same pair. */

.framed {
  position: relative;
  display: inline-block;
  padding-block: 0.3em 0.34em;
  max-width: 100%;
}
.bar {
  position: absolute;
  height: max(3px, 0.075em);
  background: currentColor;
  border-radius: 1px;
}
.bar-top { top: 0; left: 0; width: 46%; transform-origin: left center; }
.bar-bottom { bottom: 0; left: 42%; right: 0; transform-origin: right center; }

/* The page's one orchestrated moment: on the home page the bars draw in. */
@media (prefers-reduced-motion: no-preference) {
  .is-home .hero .bar { animation: bar-in 760ms var(--ease-out) both; }
  .is-home .hero .bar-top { animation-delay: 120ms; }
  .is-home .hero .bar-bottom { animation-delay: 260ms; }
}
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--control-h);
  padding: 0 24px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem; font-weight: 700; letter-spacing: -0.003em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 160ms ease-out;
}
.btn-small { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
.btn-quiet { background: var(--surface); color: var(--ink); }
.btn-invert { background: var(--paper); color: var(--ink); }

/* Dim on press, instantly, like the app's Tappable; ease back on release. */
.btn:active, .store:active, .pro-card:active, .pro-line:active,
.back:active, .top-link:active, .faq summary:active { opacity: 0.55; transition: none; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: var(--control-h);
  padding: 0 22px 0 18px;
  border-radius: var(--control-radius);
  background: var(--ink); color: var(--paper);
  text-decoration: none; font-weight: 700; font-size: 1rem; line-height: 1.1;
  transition: opacity 160ms ease-out;
}
.store .i { width: 26px; height: 26px; }
.store small { display: block; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.01em; opacity: 0.8; }
/* Not in that store yet: the same badge, outlined, and nothing to press. */
.store-soon { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; }
.store-soon:active { opacity: 1; }
.stores + p { margin-top: 24px; }

/* Black whatever the visitor's setting: the header and the home hero. */
.on-black {
  --paper: #000000; --ink: #ffffff; --surface: #1c1c1e; --raised: #2c2c2e;
  --line: #38383a; --muted: #afafaf; --green: #1fc77c; --green-text: #1fc77c; --on-green: #000000;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Header: a translucent layer the page scrolls under ---------- */

/* Solid black at the top of the page, where only the empty page sits behind
   it; a translucent material once content scrolls underneath. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  transition: background-color 200ms ease-out, box-shadow 200ms ease-out;
}
.top.scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .top.scrolled { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding-top: env(safe-area-inset-top); }
.top-nav { display: flex; align-items: center; gap: 20px; }
.top-link { display: none; text-decoration: none; font-weight: 500; font-size: 0.875rem; padding: 10px 0; }
@media (min-width: 720px) { .top-link { display: inline-block; } }

.logo { display: inline-flex; padding: 8px 0; color: var(--ink); }
.logo-mark {
  display: block; width: 116px; aspect-ratio: 400 / 205;
  background: currentColor;
  -webkit-mask: url('/img/logo-mask.png') center / contain no-repeat;
  mask: url('/img/logo-mask.png') center / contain no-repeat;
}

/* ---------- Home: hero ----------
   Black, like the logo's own ground and the app's welcome screens. Two of the
   app's photos, staggered: a cut at home and braids checked in a mirror. */

.hero { padding-block: clamp(20px, 4vw, 56px) clamp(56px, 9vw, 112px); }
.hero-grid { display: grid; gap: 28px; }
/* Stacked (phones), the photos stay short enough to keep the headline in view. */
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; max-width: 480px; }
.hero-photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--surface);
}
.hero-photo-b { margin-top: 40px; }
.hero .display { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.02; }
.hero-lede {
  font-size: clamp(1.0625rem, 1.3vw, 1.125rem); line-height: 1.5; letter-spacing: -0.003em;
  color: var(--muted); max-width: 30em; margin: 22px 0 0;
}
.hero .stores { margin-top: 28px; }
.hero-join {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px;
  font-weight: 500; text-underline-offset: 4px; transition: opacity 160ms ease-out;
}
.hero-join:active { opacity: 0.55; transition: none; }
/* In dark mode the hero and the page are the same black: one gap, not two. */
@media (prefers-color-scheme: dark) { .hero + .band { padding-top: 0; } }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-photos { grid-column: 2; grid-row: 1; gap: 16px; max-width: none; }
  .hero-photo-b { margin-top: 72px; }
}

/* ---------- Home: who do you need? ----------
   The app's profession photos. Barbers, where PrimTrim began, leads wide. */

.crafts {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px;
}
.craft-lead { grid-column: 1 / -1; }
.craft a { display: grid; gap: 2px; text-decoration: none; transition: opacity 160ms ease-out; }
.craft a:active { opacity: 0.55; transition: none; }
.craft-photo { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 10px; }
.craft-lead .craft-photo { aspect-ratio: 16 / 9; }
.craft-photo img { width: 100%; height: 100%; object-fit: cover; }
.craft-name { position: relative; justify-self: start; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.012em; }
.craft-lead .craft-name { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.15; letter-spacing: -0.016em; }
.craft-meta { color: var(--muted); font-size: 0.875rem; }
.craft-soon .craft-photo img { filter: grayscale(1); opacity: 0.6; }

/* Hover (real pointers only): the logo's top bar settles over the name. */
.craft-name::before {
  content: ''; position: absolute; left: 0; top: -6px;
  width: 1.6em; height: 3px; background: currentColor; border-radius: 1px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 260ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .craft a:hover .craft-name::before { transform: scaleX(1); }
}

@media (min-width: 900px) {
  .crafts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; }
  .craft-lead .craft-photo { aspect-ratio: 3 / 1; }
  .craft-lead .craft-photo img { object-position: center 30%; }
}

/* ---------- Sections ---------- */

.band { padding-top: var(--section); }
.band-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 40em; }
.band-head p { margin: 0; }
.band > .h2 { margin-bottom: 14px; }
.band > .muted { max-width: 40em; }

.pro-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 236px);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--page);
  margin-inline: calc(var(--page) * -1);
  padding: 0 var(--page) 12px;
  scrollbar-width: none;
}
.pro-row::-webkit-scrollbar { display: none; }
.pro-card { display: grid; gap: 2px; scroll-snap-align: start; text-decoration: none; transition: opacity 160ms ease-out; }
.pro-photo { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 10px; }
.pro-photo img { width: 100%; height: 100%; object-fit: cover; }
.pro-name { font-weight: 700; letter-spacing: -0.01em; }
.pro-title { color: var(--muted); font-size: 0.875rem; }
.pro-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.875rem; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.rating .i { width: 15px; height: 15px; }

/* A real sequence, so it is numbered. The numerals are drawn in outline,
   like the logo's inline lettering. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-size: 2.75rem; font-weight: 900; line-height: 0.9; letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.steps h3 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .steps li { grid-template-columns: 1fr; }
  .steps li::before { grid-row: auto; font-size: 3.5rem; margin-bottom: 14px; }
}

.modes { display: grid; gap: 28px; margin-top: 28px; }
.mode img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--surface); margin-bottom: 18px; }
.mode h3 { font-size: 1.125rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.mode p { color: var(--muted); max-width: 32em; margin: 0; }
@media (min-width: 760px) { .modes { grid-template-columns: 1fr 1fr; gap: 40px; } }

/* For professionals: the page inverts, as the app's dark mode does. */
.dark { background: var(--ink); color: var(--paper); margin-top: var(--section); }
.join { padding-block: var(--section); }
.join-lede { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); max-width: 34em; margin: 24px 0 32px; opacity: 0.86; }

/* ---------- Inner pages ---------- */

.page { padding-top: clamp(20px, 4vw, 48px); padding-bottom: var(--section); }
.page > .framed { margin-top: 8px; }
.page > .lede { margin-top: 16px; }
.back {
  display: flex; width: fit-content; align-items: center; gap: 4px;
  min-height: 44px; margin-left: -6px; padding-right: 8px;
  text-decoration: none; font-weight: 500; color: var(--muted);
  transition: opacity 160ms ease-out;
}

.pro-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 760px; }
.pro-line {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: opacity 160ms ease-out;
}
.pro-line-text { display: grid; gap: 1px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--surface); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pro-line .i { color: var(--muted); }

.prices { width: 100%; max-width: 760px; border-collapse: collapse; margin-top: 20px; }
.prices th, .prices td { padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.prices tr:first-child th, .prices tr:first-child td { border-top: 1px solid var(--line); }
.prices th { text-align: left; font-weight: 500; padding-right: 16px; }
.prices th small { display: block; color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
.prices td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.cta-panel { margin-top: var(--section); padding: clamp(24px, 4vw, 40px); background: var(--surface); border-radius: var(--radius); max-width: 760px; }
.cta-panel .h3 { margin-bottom: 6px; }
.cta-panel .muted { margin: 0 0 4px; }
.cta-panel > .btn { margin-top: 16px; }

.empty { margin-top: 28px; padding: 24px; background: var(--surface); border-radius: var(--radius); max-width: 760px; }
.empty .btn { margin-top: 4px; }

/* Professional profile */
.profile { display: grid; gap: 28px; margin-top: 8px; }
.profile-photo { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; max-width: 520px; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.verified { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--green-text); font-weight: 700; font-size: 0.875rem; }
.verified .i { color: var(--green); width: 20px; height: 20px; }
.profile-title { font-size: 1.0625rem; color: var(--muted); margin: 10px 0 6px; }
.profile-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); }
.bio { max-width: 34em; font-size: 1rem; }
.profile-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 0; max-width: 560px; }
.facts dt { color: var(--muted); font-size: 0.8125rem; margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 500; }
@media (min-width: 860px) {
  .profile { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
  .profile-photo { position: sticky; top: 88px; }
}

.work { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.work figure { margin: 0; }
.work img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: 12px; background: var(--surface); }
.work figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 760px) { .work { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

.reviews { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 24px; max-width: 760px; }
.reviews li { border-top: 1px solid var(--line); padding-top: 18px; }
.review-stars { display: flex; gap: 2px; margin: 0 0 8px; }
.review-stars .i { width: 16px; height: 16px; }
.reviews blockquote { margin: 0 0 8px; font-size: 1.0625rem; line-height: 1.5; }
.reviews .muted { margin: 0; font-size: 0.875rem; }

/* For professionals */
.chips { list-style: none; margin: 20px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 99px; background: var(--surface); font-weight: 500; font-size: 0.875rem; }
.checklist { list-style: none; margin: 20px 0 16px; padding: 0; display: grid; gap: 12px; max-width: 40em; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 0.2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.2l3 3 6-6.2' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Text pages */
.prose > * { max-width: 760px; }
.prose > .muted:first-of-type { margin-top: 12px; }
.prose .h3 { margin: 40px 0 12px; }
.prose .h4 { margin: 24px 0 8px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }
.prose a { text-underline-offset: 3px; }
.todo { background: var(--mark); color: inherit; padding: 0 4px; border-radius: 4px; }

.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0;
  font-weight: 700; cursor: pointer; list-style: none;
  transition: opacity 160ms ease-out;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 40em; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(24px + env(safe-area-inset-bottom)); margin-top: 0; }
.dark + .foot, main:has(> .dark:last-child) + .foot { border-top: 0; }
.foot-grid { display: grid; gap: 24px; }
.foot-note { color: var(--muted); font-size: 0.875rem; margin: 10px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links a { display: inline-block; padding: 10px 0; text-decoration: none; font-weight: 500; font-size: 0.875rem; }
.foot-base { color: var(--muted); font-size: 0.8125rem; margin-top: 24px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr auto; align-items: start; } }

/* ---------- Reduced motion: keep feedback, drop movement ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
