/* products.successbycs.com — one stylesheet for every page.
   Colours, type and spacing come from the approved mock-up
   (docs/design/mockups/). */

/* ---------- Fonts: served from this site, Latin only ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Stand-in faces: a system font scaled to the width of the real font, so
   text does not jump when the real font arrives. Ratios measured with
   font-ratio.mjs (website-release skill). */
@font-face {
  font-family: "Space Grotesk Stand-in";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 106%;
}
@font-face {
  font-family: "IBM Plex Sans Stand-in";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 100%;
}
@font-face {
  font-family: "IBM Plex Mono Stand-in";
  src: local("Courier New"), local("Liberation Mono");
  size-adjust: 100%;
}

/* ---------- Tokens ---------- */
:root {
  --ground: #0b0b0a;
  --panel: #161614;
  --ink: #f4f3ee;
  --ink-soft: #d6d5cf;
  --ink-mid: #b9b8b2;
  --ink-quiet: #9d9c96;
  --ink-faint: #8f8e88;
  --ink-ghost: #6f6e69;
  --accent: #f5c518;
  --line: #ffffff26;
  --line-soft: #ffffff1f;
  --display: "Space Grotesk", "Space Grotesk Stand-in", system-ui, sans-serif;
  --body: "IBM Plex Sans", "IBM Plex Sans Stand-in", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Mono Stand-in", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 40px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  min-height: 100vh;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
img { display: block; max-width: 100%; }
h1, h2, p, dl, dd, ol { margin: 0; }
.accent { color: var(--accent); }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  padding: 12px 16px; background: var(--accent); color: var(--ground);
  font-family: var(--mono); font-size: 13px;
}
.skip:focus { left: 16px; top: 16px; color: var(--ground); }

.label {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-quiet);
}
.note { font-family: var(--mono); font-size: 13px; color: var(--ink-quiet); letter-spacing: .04em; }

/* ---------- Header ---------- */
.site-header {
  padding-top: 28px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.01em;
}
.brand small {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  color: var(--ink-quiet); letter-spacing: .04em;
}
.site-nav {
  display: flex; flex-wrap: wrap; gap: 28px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
}
.site-nav a { color: var(--ink-mid); padding: 6px 0; }
.site-nav a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero { padding-top: 120px; padding-bottom: 96px; }
.hero .label { margin-bottom: 32px; }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(56px, 9vw, 136px); line-height: .95; letter-spacing: -.035em;
  overflow: hidden; padding-bottom: .08em;
}
.hero-foot {
  margin-top: 56px; display: flex; flex-wrap: wrap; gap: 40px;
  justify-content: space-between; align-items: flex-end;
}
.lede { max-width: 560px; font-size: 20px; line-height: 1.55; font-weight: 300; color: var(--ink-soft); }

/* Hero words rise one after another. Pure CSS, so the first screen never
   waits for a script. */
.rise {
  display: inline-block; opacity: 0; transform: translateY(.6em);
  animation: rise .9s var(--ease) forwards;
}
.d1 { animation-delay: .05s } .d2 { animation-delay: .18s } .d3 { animation-delay: .31s }
.d4 { animation-delay: .44s } .d5 { animation-delay: .57s } .d6 { animation-delay: .7s }
.fade { opacity: 0; animation: fade 1s ease .8s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Ticker ---------- */
.ticker-band {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  overflow: hidden; padding: 22px 0; white-space: nowrap;
  font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.01em;
  color: var(--ink-ghost);
}
.ticker { display: flex; gap: 56px; width: max-content; animation: drift 40s linear infinite; }
.ticker i { font-style: normal; color: var(--accent); }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-top: 140px; padding-bottom: 40px; }
.section-head {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: baseline; margin-bottom: 48px;
}
.section-head h2 { font-family: var(--display); font-weight: 500; font-size: 48px; letter-spacing: -.02em; }
.section-head p { font-family: var(--mono); font-size: 13px; color: var(--ink-quiet); }

/* ---------- Product rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.6fr) 120px;
  gap: 24px; align-items: center; padding: 36px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color .35s ease;
}
a.row:hover { background-color: var(--panel); }
.row .num { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); }
.row .name {
  font-family: var(--display); font-size: 40px; font-weight: 500; letter-spacing: -.02em;
  transition: transform .45s var(--ease); overflow-wrap: anywhere;
}
a.row:hover .name { transform: translateX(12px); }
.row .about { display: flex; flex-direction: column; gap: 8px; }
.row .about span:first-child { font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.row .about span:last-child { font-family: var(--mono); font-size: 12px; color: var(--ink-quiet); }
.row .about .links { line-height: 1.9; }
.row .about .links a { color: var(--ink-mid); border-bottom: 1px solid var(--line); white-space: nowrap; }
.row .about .links a:hover { color: #fff; border-bottom-color: var(--accent); }
.tag {
  justify-self: end; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; border-radius: 999px; white-space: nowrap;
}
.tag-live { padding: 6px 12px; background-color: var(--accent); color: var(--ground); }
.tag-building { padding: 5px 11px; border: 1px solid #ffffff59; color: var(--ink-soft); }

/* ---------- Website cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 18px; }
.frame {
  border-radius: 6px; overflow: hidden; background-color: var(--panel);
  border: 1px solid #ffffff1a;
}
.card .frame { aspect-ratio: 16 / 10; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card .frame img { transition: transform .6s var(--ease); }
.card:hover .frame img { transform: scale(1.03); }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title span:first-child { font-family: var(--display); font-size: 24px; font-weight: 500; }
.card-title span:last-child { font-family: var(--mono); font-size: 12px; color: var(--ink-quiet); }
.card p { font-size: 15px; line-height: 1.5; color: var(--ink-mid); }

/* ---------- Closing call ---------- */
.closing { padding-top: 180px; padding-bottom: 120px; }
.closing .label { margin-bottom: 24px; }
.closing a {
  display: inline-flex; align-items: baseline; gap: 20px;
  font-family: var(--display); font-size: clamp(44px, 7vw, 96px);
  font-weight: 500; letter-spacing: -.03em; line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); }
.site-footer .wrap {
  padding-top: 32px; padding-bottom: 32px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--ink-quiet);
}

/* ---------- Product page ---------- */
.hero-product { padding-top: 96px; padding-bottom: 64px; }
.hero-product .label { margin-bottom: 28px; }
.hero-product h1 { font-size: clamp(52px, 8vw, 120px); }
.hero-product .lede { margin-top: 48px; max-width: 680px; font-size: 21px; }

.meta-block { padding-bottom: 72px; }
.meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.meta div { padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.meta dt {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-quiet);
}
.meta dd { font-size: 16px; line-height: 1.5; }
.meta dd a { border-bottom: 1px solid var(--accent); }

.shot-block { padding-bottom: 120px; }
.shot-block .frame { border-radius: 8px; aspect-ratio: 16 / 10; }

.story { padding-bottom: 140px; display: flex; flex-wrap: wrap; gap: 48px; }
.story-index { padding-bottom: 120px; }
.story > .side { flex: 1 1 220px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.story > .side.quiet { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-quiet); }
.story > .main { flex: 999 1 560px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.story > .main.roomy { gap: 40px; }
.story h2 {
  font-family: var(--display); font-weight: 500; font-size: 48px;
  line-height: 1.05; letter-spacing: -.02em;
}
.story .text { font-size: 19px; line-height: 1.65; font-weight: 300; color: var(--ink-soft); }

.index-list {
  padding: 0; list-style: none; flex: 999 1 560px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px;
  font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.01em;
}
.index-list li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.index-list a { color: var(--ink-mid); transition: color .3s ease; }
.index-list a:hover { color: #fff; }
.index-list a span { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-right: 14px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { border-top: 1px solid var(--accent); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.step span:nth-child(1) { font-family: var(--mono); font-size: 12px; color: var(--ink-quiet); }
.step span:nth-child(2) { font-family: var(--display); font-size: 22px; font-weight: 500; }
.step span:nth-child(3) { font-size: 16px; line-height: 1.55; color: var(--ink-mid); }

.phone-shot { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; }
.phone-shot .frame { width: min(100%, 300px); aspect-ratio: 390 / 844; border-radius: 20px; }
.phone-shot p { flex: 1 1 220px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink-quiet); }

.button {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background-color: var(--accent); color: var(--ground);
  font-family: var(--mono); font-size: 14px; font-weight: 500;
}
.button:hover { color: var(--ground); background-color: #ffd43a; }

.next { display: block; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next .wrap {
  padding-top: 72px; padding-bottom: 72px;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end;
}
.next .lead { display: flex; flex-direction: column; gap: 16px; }
.next .label { font-size: 12px; }
.next .nextname {
  font-family: var(--display); font-size: clamp(48px, 7vw, 96px);
  font-weight: 500; letter-spacing: -.03em; line-height: 1;
  transition: transform .5s var(--ease);
}
.next:hover .nextname { transform: translateX(16px); }
.next .blurb { max-width: 360px; font-size: 16px; line-height: 1.55; color: var(--ink-mid); }
.site-footer.plain { border-top: 0; }

/* ---------- Not found ---------- */
.notfound { padding-top: 160px; padding-bottom: 200px; }
.notfound h1 {
  font-family: var(--display); font-weight: 500; font-size: clamp(52px, 8vw, 120px);
  line-height: .95; letter-spacing: -.035em; margin: 28px 0 40px;
}

/* ---------- Scroll motion (set up by /js/site.js) ---------- */
/* Smooth scrolling wraps the page in these two boxes. Without the script
   they are ordinary blocks. */
#smooth-content { will-change: transform; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px 16px; padding: 28px 4px; }
  .row .name { font-size: 32px; }
  .row .about { grid-column: 2 / -1; grid-row: 2; }
  .row .tag { grid-column: 3; grid-row: 1; }
}
@media (max-width: 760px) {
  :root { --gutter: 22px; }
  .hero { padding-top: 72px; padding-bottom: 64px; }
  .hero h1 { font-size: clamp(44px, 13.5vw, 72px); }
  .hero-product { padding-top: 56px; }
  .hero-foot { margin-top: 40px; gap: 24px; }
  .lede, .hero-product .lede { font-size: 18px; }
  .hero-product .lede { margin-top: 32px; }
  .site-nav { gap: 20px; }
  .ticker-band { font-size: 22px; padding: 16px 0; }
  .section { padding-top: 96px; }
  .section-head { margin-bottom: 32px; }
  .section-head h2, .story h2 { font-size: 34px; }
  .row .name { font-size: 28px; }
  .cards { grid-template-columns: 1fr; }
  .closing { padding-top: 120px; padding-bottom: 88px; }
  .shot-block, .story-index { padding-bottom: 80px; }
  .story { padding-bottom: 96px; gap: 24px; }
  .story > .side { flex-basis: 100%; }
  .story > .main, .index-list { flex-basis: 100%; }
  .index-list { grid-template-columns: 1fr; font-size: 24px; }
  .story .text { font-size: 17px; }
  .next .wrap { padding-top: 56px; padding-bottom: 56px; }
}

/* ---------- Reduced motion: everything still, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .rise, .fade { animation: none; opacity: 1; transform: none; }
  .ticker { animation: none; }
  .row, .row .name, .card .frame img, .next .nextname { transition: none; }
}
