/* tryrims.com landing page. Brand: Inch Mark v2 "Plain" (Host Grotesk, chalk, ink, red).
   Colours and sizes are taken from the approved mockup (tryrims/tmp/brand_plain_mockups).
   Phone first: the base rules are the 390 px layout, wider screens add to them. */

/* ------------------------------------------------------------------ fonts */

/* One variable font file per script, weights 400 to 800. Latin is preloaded by the page;
   Latin Extended is fetched only by a browser that meets one of its characters. */
@font-face {
  font-family: "Host Grotesk";
  src: url("/assets/host-grotesk-latin.f315eba06c.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("/assets/host-grotesk-latin-ext.e776f9d5ae.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* The outlined numbers: Host Grotesk 800, digits and "in" only, overlaps merged, so the
   outline draws no stray lines inside the glyphs (landing/scripts/prepare_fonts.py). */
@font-face {
  font-family: "Host Grotesk Outline";
  src: url("/assets/host-grotesk-outline-digits.479769ae55.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
/* While Host Grotesk loads, Arial (or the metric-identical Liberation Sans) is scaled to the
   same average width and line metrics, so swapping fonts does not move the layout.
   Figures from landing/scripts/prepare_fonts.py: Host Grotesk is 6.43 % wider than Arial,
   ascent 1.015 em, descent 0.315 em, no line gap (overrides divided by the size adjust). */
@font-face {
  font-family: "Host Grotesk Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Helvetica");
  size-adjust: 106.43%;
  ascent-override: 95.37%;
  descent-override: 29.6%;
  line-gap-override: 0%;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --ink: #141414;
  --chalk: #F1EFEA;
  --red: #E1251B;
  --red-press: #C41E15;
  --concrete: #9A968F;
  --line: #DEDAD2;
  --white: #FFFFFF;
  --muted: #6B675F;
  --plate: #E6E6E6;
  --giant-outline: #CFC9BF;
  --on-ink-muted: #BDB8AF;
  --page-padding: 20px;
  --content-width: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 16px/1.5 "Host Grotesk", "Host Grotesk Fallback", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--page-padding); }

/* ------------------------------------------------------------------ logo */

/* The wordmark. The ″ after it is drawn (two tapered, slanted wedges), never typed. */
.wm { font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; line-height: 1; display: inline-flex; align-items: flex-start; }
.wm svg { height: .38em; width: auto; margin: .08em 0 0 .04em; flex: none; }

/* ------------------------------------------------------------------ buttons */

.btn {
  min-height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 20px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn.small { min-height: 44px; font-size: 15px; border-radius: 12px; padding: 0 16px; }
.btn.ink { background: var(--ink); color: var(--white); }
.btn.ink:hover { background: #2a2a2a; }
/* White on the brand red is 4.4:1, so red buttons carry large text (19 px bold, AA at 3:1). */
.btn.red { background: var(--red); color: var(--white); font-size: 19px; }
.btn.red:hover { background: var(--red-press); }
.btn:active { transform: translateY(1px); }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ header */

.site-header .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-link { text-decoration: none; display: inline-flex; padding: 6px 0; }
.site-header .wm { font-size: 26px; }
.site-nav { display: none; }
.site-nav a { font-weight: 600; font-size: 16px; text-decoration: none; padding: 10px 2px; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

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

.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 12px; padding-bottom: 40px; position: relative; }
.hero-text { position: relative; }
.hero h1 { font-size: clamp(40px, 11.3vw, 76px); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin-bottom: 16px; text-wrap: pretty; position: relative; z-index: 1; }
.lead { font-size: 17px; color: var(--muted); max-width: 32ch; margin-bottom: 20px; position: relative; z-index: 1; }

/* Giant outlined size numbers live only here, behind the hero text. Decorative. */
.giant-size {
  position: absolute; right: 14px; top: 160px; z-index: 0; pointer-events: none; user-select: none;
  font-family: "Host Grotesk Outline", "Host Grotesk", "Host Grotesk Fallback", sans-serif;
  font-size: 200px; font-weight: 800; line-height: .8; letter-spacing: -0.04em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px var(--giant-outline); font-variant-numeric: tabular-nums;
}
.giant-size small { font-size: .2em; -webkit-text-stroke-width: 1.2px; margin-left: .04em; letter-spacing: 0; }

/* A link that looks like the app's search bar: it opens the app, where the search is. */
.search-link {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 58px; max-width: 560px;
  padding: 0 5px 0 16px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line) inset;
  color: var(--muted); font-size: 16px; text-decoration: none;
}
.search-link:hover { box-shadow: 0 0 0 1.5px var(--concrete) inset; }
.search-link .icon { color: var(--ink); }
.search-link .hint-long { display: none; }
.search-link .search-hint { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-link .btn { min-height: 48px; border-radius: 11px; padding: 0 16px; }

.stats { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 20px 0 0; padding: 0; list-style: none; position: relative; z-index: 1; }
.stats b { display: block; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 15px; }

/* The before/after slot: two photos of the same 4:3 size, so the divider lines up;
   see landing/README.md, "The hero images". */
[data-slot="hero-before-after"] {
  position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--plate); --split: 34%;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare .compare-handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; margin-left: -1px; background: var(--white); pointer-events: none; }
.compare .compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: var(--white) no-repeat center / 22px 22px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  background-image: url("/assets/compare-arrows.edebd92e8e.svg");
}
.compare .tag { position: absolute; top: 14px; background: rgba(20, 20, 20, .76); color: var(--white); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.compare .tag-before { left: 14px; }
.compare .tag-after { right: 14px; }
.compare figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: var(--white); font-size: 14px; }
/* Added by compare.js only: with no script the photo stays split at --split. */
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) .compare-handle::after { outline: 3px solid var(--red); outline-offset: 2px; }

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

.section { border-top: 1px solid var(--line); }
.section > .wrap { padding-top: 44px; padding-bottom: 44px; }
.section h2 { font-size: 32px; line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin-bottom: 20px; text-wrap: balance; }
:target { scroll-margin-top: 12px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { background: var(--white); border-radius: 20px; padding: 16px; display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; align-items: center; }
.step-number {
  font-family: "Host Grotesk Outline", "Host Grotesk", "Host Grotesk Fallback", sans-serif;
  grid-row: span 2; font-size: 92px; font-weight: 800; line-height: .8; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--giant-outline); font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 4px; }
.step p { color: var(--muted); font-size: 16px; }

.catalog-band { background: var(--ink); color: var(--white); border-radius: 20px; padding: 24px; display: grid; gap: 22px; }
.catalog-band h2 { color: var(--white); margin-bottom: 10px; }
.catalog-band p { color: var(--on-ink-muted); font-size: 17px; margin-bottom: 20px; max-width: 40ch; }
.wheel-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wheel-tile { display: block; text-decoration: none; color: var(--white); }
.wheel-tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--white); }
.wheel-tile span { display: block; font-size: 14px; color: var(--on-ink-muted); margin-top: 8px; line-height: 1.3; }
.wheel-tile b { display: block; color: var(--white); font-size: 15px; }
.wheel-tile:hover img { outline: 2px solid var(--white); outline-offset: 2px; }

.faq { display: grid; gap: 0; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-size: 18px; font-weight: 700; list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; min-height: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin-top: 8px; font-size: 16px; max-width: 60ch; }

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

.site-footer { background: var(--ink); color: var(--on-ink-muted); font-size: 15px; }
.site-footer .wrap { padding-top: 34px; padding-bottom: 44px; display: grid; grid-template-columns: 1fr; gap: 26px; }
.site-footer .wm { font-size: 28px; color: var(--white); }
.site-footer p { margin-top: 12px; max-width: 36ch; }
.site-footer h2 { color: var(--white); font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; text-decoration: none; }
.site-footer li a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .small-print { font-size: 13px; color: var(--concrete); margin-top: 0; max-width: none; }

/* ------------------------------------------------------------------ tablet */

@media (min-width: 700px) {
  :root { --page-padding: 40px; }
  .site-header .wrap { height: 80px; }
  .site-header .wm { font-size: 30px; }
  .site-nav { display: flex; gap: 28px; margin-left: auto; }
  .hero .wrap { padding-top: 24px; padding-bottom: 56px; gap: 36px; }
  .lead { font-size: 20px; margin-bottom: 26px; }
  .giant-size { font-size: 300px; top: 120px; right: 40px; }
  .search-link .hint-long { display: inline; }
  .search-link .hint-short { display: none; }
  .stats { gap: 18px 44px; margin-top: 28px; }
  .stats b { font-size: 34px; }
  .search-link { height: 60px; font-size: 17px; }
  .section > .wrap { padding-top: 64px; padding-bottom: 64px; }
  .section h2 { font-size: 44px; margin-bottom: 28px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 16px; }
  .step { display: block; padding: 22px; }
  .step-number { display: block; font-size: 120px; margin-bottom: 16px; }
  .step h3 { font-size: 22px; margin-bottom: 6px; }
  .catalog-band { padding: 40px; border-radius: 24px; }
  .catalog-band p { font-size: 18px; }
  .wheel-tiles { grid-template-columns: repeat(4, 1fr); }
  .faq { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .faq details:last-child { border-bottom: 0; }
  .site-footer .wrap { grid-template-columns: 2fr 1fr; padding-top: 48px; padding-bottom: 44px; }
  .site-footer .wm { font-size: 30px; }
}

/* ------------------------------------------------------------------ desktop */

@media (min-width: 1080px) {
  :root { --page-padding: 56px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 640px); align-items: center; gap: 40px; padding-top: 30px; padding-bottom: 70px; }
  .giant-size { font-size: 380px; left: 150px; right: auto; top: 40px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .catalog-band { grid-template-columns: 1fr 1.2fr; align-items: center; gap: 40px; }
  .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; }
}

/* ------------------------------------------------------------------ motion */

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