/* FFF Labs — single-page site */

:root {
  --bg: #ffffff;
  --ink: #161616;
  --ink-2: #2e2e2e;
  --muted: #8c8c8c;
  --line: #e6e6e6;
  --chip: #f1f1f1;

  --slate: #8e9693;
  --onyx: #1c1c1d;
  --mist: #f3f3f3;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 2.4vw, 46px);
  --section-x: clamp(16px, 4.7vw, 94px);
  --header-h: clamp(72px, 9.4vh, 120px);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }

.underline {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }

.wordmark {
  justify-self: start;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 420;
  font-size: 19px;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav { display: flex; gap: 34px; }
.nav a {
  font-size: 15px;
  color: var(--ink-2);
  transition: color .2s ease;
}
.nav a:hover { color: var(--muted); }

.btn-chip {
  justify-self: end;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--chip);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s ease;
}
.btn-chip:hover { background: #e6e6e6; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  padding: 0 var(--gutter);
}

.hero h1 {
  padding-top: clamp(88px, 18vh, 200px);
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 400;
  font-size: clamp(44px, 6.3vw, 128px);
  line-height: .9;
  letter-spacing: -.03em;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
}

.scroll-cue {
  position: absolute;
  left: calc(var(--gutter) + 20px);
  bottom: clamp(28px, 5vh, 64px);
  font-size: 15px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .2s ease;
}
.scroll-cue:hover { color: var(--ink); }

/* ---------- Overview cards ---------- */

.overview {
  padding: clamp(56px, 6vw, 96px) var(--section-x) clamp(80px, 9vw, 160px);
  scroll-margin-top: var(--header-h);
}

.cards {
  display: flex;
  gap: clamp(16px, 1.9vw, 37px);
  height: clamp(340px, 26vw, 400px);
}

.card {
  --card-bg: var(--slate);
  --card-fg: #ffffff;
  --card-sub: rgba(255, 255, 255, .62);
  --card-icon: rgba(255, 255, 255, .55);
  --illo-stroke: rgba(255, 255, 255, .92);
  --illo-grid: rgba(255, 255, 255, .3);

  position: relative;
  flex: 0 0 clamp(220px, 14.2vw, 272px);
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--card-fg);
  transition: flex-grow .7s var(--ease), flex-basis .7s var(--ease);
}
.card.is-open { flex: 1 1 0; }

.card--onyx {
  --card-bg: var(--onyx);
  --card-sub: rgba(255, 255, 255, .55);
  --card-icon: rgba(255, 255, 255, .6);
  --illo-stroke: rgba(255, 255, 255, .78);
  --illo-grid: rgba(255, 255, 255, .13);
}
.card--mist {
  --card-bg: var(--mist);
  --card-fg: #1c1c1d;
  --card-sub: #7d7d7d;
  --card-icon: #9a9a9a;
  --illo-stroke: rgba(28, 28, 29, .62);
  --illo-grid: rgba(28, 28, 29, .1);
}

.card-toggle {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: inherit;
  cursor: pointer;
}
.card.is-open .card-toggle { cursor: default; }

.card-icon {
  position: absolute;
  top: 36px;
  right: 36px;
  z-index: 2;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.card-icon::before,
.card-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  margin-top: -.75px;
  background: var(--card-icon);
  transition: transform .45s var(--ease);
}
.card-icon::after { transform: rotate(90deg); }
.card.is-open .card-icon::after { transform: rotate(0deg); }
.card:not(.is-open):hover .card-icon::before,
.card:not(.is-open):hover .card-icon::after { background: var(--card-fg); }

.card-short,
.card-title,
.card-text {
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.33;
}

.card-short {
  position: absolute;
  left: 33px;
  bottom: 33px;
  z-index: 1;
  width: clamp(150px, 9.5vw, 190px);
  font-weight: 500;
  transition: opacity .35s ease .25s;
}
.card.is-open .card-short { opacity: 0; transition-delay: 0s; }

.card-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 66px 33px 33px;
  width: min(520px, 48%);
  min-width: 300px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.card.is-open .card-body {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease .3s, visibility 0s;
}

.card-title { font-weight: 500; }
.card-text { margin-top: auto; color: var(--card-sub); }

.card-link {
  position: relative;
  z-index: 4;
  align-self: flex-start;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.card-link:hover { color: var(--muted); }

.illo {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: min(600px, 52%);
  height: 100%;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
  mask-image: linear-gradient(to right, transparent 0, #000 38%);
}
.card.is-open .illo {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease .3s, transform .9s var(--ease) .3s;
}
.illo .grid line { stroke: var(--illo-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.illo .shape { fill: var(--card-bg); stroke: var(--illo-stroke); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.illo .guide { fill: none; stroke: var(--illo-stroke); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.illo .dot { fill: var(--illo-stroke); }

/* ---------- Sell ---------- */

.sell {
  padding: clamp(40px, 5vw, 80px) var(--section-x) clamp(96px, 10vw, 180px);
  scroll-margin-top: var(--header-h);
}

.eyebrow {
  font-size: 15px;
  color: var(--muted);
}

.display-2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 400;
  font-size: clamp(36px, 4vw, 76px);
  line-height: .95;
  letter-spacing: -.028em;
  text-wrap: balance;
}

.sell-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "eyebrow eyebrow"
    "title   lede";
  column-gap: clamp(32px, 6vw, 120px);
  row-gap: 20px;
  align-items: end;
}
.sell-head .eyebrow { grid-area: eyebrow; }
.sell-head .display-2 { grid-area: title; }
.lede {
  grid-area: lede;
  max-width: 520px;
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.45;
  color: var(--ink-2);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 2.6vw, 48px);
  margin-top: clamp(56px, 6vw, 112px);
}
.steps li {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.step-n {
  display: block;
  margin-bottom: 44px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  font-size: clamp(17px, 1.05vw, 19px);
  font-weight: 500;
  line-height: 1.33;
}
.steps p {
  margin-top: 8px;
  max-width: 380px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact {
  padding: 0 var(--section-x) clamp(64px, 6vw, 112px);
  scroll-margin-top: var(--header-h);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title   title"
    "text    actions";
  row-gap: clamp(48px, 6vw, 120px);
  column-gap: 32px;
  align-items: end;
  padding: clamp(32px, 3.4vw, 64px);
  border-radius: 16px;
  background: var(--onyx);
  color: #fff;
}
.contact-panel .display-2 { grid-area: title; }
.contact-text {
  grid-area: text;
  max-width: 440px;
  font-size: clamp(17px, 1.05vw, 19px);
  line-height: 1.4;
  color: rgba(255, 255, 255, .55);
}
.contact-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 28px;
}

.btn-solid {
  padding: 11px 18px;
  border-radius: 8px;
  background: #fff;
  color: var(--onyx);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s ease;
}
.btn-solid:hover { background: #e9e9e9; }

.contact-email {
  font-size: 15px;
  color: rgba(255, 255, 255, .6);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .2s ease;
}
.contact-email:hover { color: #fff; }

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

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 260px;
  padding: 0 var(--gutter);
  font-size: 16px;
}

.footer-links {
  justify-self: start;
  display: flex;
  gap: clamp(28px, 4.3vw, 84px);
  margin-left: clamp(0px, 11.5vw, 236px);
}
.footer-links a {
  color: #9a9a9a;
  text-decoration: underline;
  text-decoration-color: #cfcfcf;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--ink); }

.footer-mark { display: block; width: 84px; height: 84px; }
.footer-mark svg { display: block; width: 100%; height: 100%; }
.footer-mark .fm-ring { fill: none; stroke: var(--ink); stroke-width: 5; }
.footer-mark .fm-fill { fill: var(--ink); }

.footer-legal {
  justify-self: end;
  display: flex;
  gap: clamp(28px, 4.3vw, 84px);
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .cards {
    flex-direction: column;
    height: auto;
  }
  .card,
  .card.is-open {
    flex: none;
    min-height: 280px;
  }
  .card-toggle,
  .card-icon,
  .card-short { display: none; }
  .card-body,
  .card.is-open .card-body {
    position: relative;
    inset: auto;
    min-height: 280px;
    width: 100%;
    min-width: 0;
    max-width: 640px;
    padding: 33px;
    opacity: 1;
    visibility: visible;
  }
  .card-title { margin-bottom: 40px; }
  .illo,
  .card.is-open .illo {
    width: 46%;
    opacity: .9;
    transform: none;
  }
  .card-body { width: 56%; }
  .card.is-open .card-body { width: 56%; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .wordmark { font-size: 16px; }
  .btn-chip { font-size: 14px; padding: 7px 12px; }

  .hero { min-height: calc(88svh - var(--header-h)); }
  .hero h1 { font-stretch: 106%; letter-spacing: -.035em; }
  .br-wide { display: none; }

  .illo,
  .card.is-open .illo { display: none; }
  .card-body,
  .card.is-open .card-body { width: 100%; min-height: 240px; padding: 26px; }
  .card,
  .card.is-open { min-height: 240px; }

  .sell-head {
    grid-template-columns: 1fr;
    grid-template-areas: "eyebrow" "title" "lede";
  }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 22px 0 32px; }
  .step-n { margin-bottom: 16px; }

  .contact-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "text" "actions";
    row-gap: 28px;
  }
  .contact-actions { flex-wrap: wrap; gap: 18px 24px; }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 28px;
    padding: 56px var(--gutter) 48px;
  }
  .footer-mark { order: -1; width: 64px; height: 64px; }
  .footer-links,
  .footer-legal { justify-self: center; margin-left: 0; gap: 32px; }
}

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