/* Proffer home page: base styles and variables. */

:root {
  /* dark stage */
  --d-bg: #0b0b0b;
  --d-card: #151515;
  --d-line: #2b2b29;
  --d-text: #f4f2ec;
  --d-mut: #a5a39c;
  --d-accent: #f23a2f;
  /* light sections */
  --l-bg: #f6f6f4;
  --l-card: #ffffff;
  --l-line: #e6e6e1;
  --l-ink: #0f0f0f;
  --l-mut: #6a6a66;
  --l-tan: #a3a39c;
  --l-accent: #e02a1f;

  --sans: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
}

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

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

body {
  margin: 0;
  background: var(--d-bg);
  color: var(--d-text);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--d-accent);
  outline-offset: 4px;
  border-radius: 4pt;
}

/* ---------- shared pieces ---------- */

.label {
  font: 400 11px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label b {
  font: 500 18px/1 var(--mono);
  letter-spacing: -0.02em;
  margin-right: 10px;
  vertical-align: -2px;
}

.two-tone {
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

.rule {
  display: block;
  width: 62pt;
  height: 3pt;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pmark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 500 16px/1 var(--mono);
}

.wordmark {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 26px;
}

.btn {
  display: inline-block;
  font: 600 15px/1 var(--sans);
  padding: 15px 22px;
  border-radius: 9pt;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.gold {
  background: var(--d-accent);
  color: var(--d-bg);
}

.btn.gold:hover {
  background: #ff5247;
}

.btn.black {
  background: var(--l-ink);
  color: #fff;
}

.lnk {
  font: 500 15px/1.2 var(--sans);
  padding-bottom: 2px;
  border-bottom: 2px solid;
}

/* ---------- the dark stage ---------- */

.hz {
  position: relative;
  background: var(--d-bg);
}

/* The scroll story runs only once the script has taken over. */
.hz-live .hz {
  height: 300vh;
}

.hz-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--d-text);
}

.hz-live .hz-stage {
  position: sticky;
  top: 0;
}

.hz-fallback,
.hz-canvas,
.hz-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* CSS horizon: shows when WebGL is unavailable or before the scene starts. */
.hz-fallback {
  background:
    radial-gradient(55% 34% at 50% 74%, rgba(242, 58, 47, 0.2), transparent 70%),
    var(--d-bg);
}

.hz-fallback::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 72%;
  width: 280vmax;
  height: 280vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, #0b0b0b 97%, #100e09 100%);
  border-top: 1.5px solid var(--d-accent);
  box-shadow:
    0 -1px 26px rgba(242, 58, 47, 0.5),
    0 -24px 110px rgba(242, 58, 47, 0.14);
}

.hz-canvas {
  display: block;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hz-gl .hz-canvas {
  opacity: 1;
}

.hz-nogl .hz-canvas {
  display: none;
}

/* CSS vignette, used when post-processing is off (mobile, no WebGL). */
.hz-vignette {
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

.hz-fx .hz-vignette {
  display: none;
}

.hz-nav {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px var(--gutter);
}

.hz-nav .pmark {
  background: var(--d-accent);
  color: var(--d-bg);
}

.nav-link {
  font: 500 15px/1.2 var(--sans);
  padding-bottom: 2px;
  border-bottom: 2px solid var(--d-accent);
}

.hz-s1,
.hz-s2,
.hz-s3 {
  position: absolute;
  z-index: 3;
}

/* Stage 1: the headline sits just above the horizon line. */
.hz-s1 {
  left: var(--gutter);
  right: var(--gutter);
  top: 17vh;
  top: 17svh;
  max-width: 880px;
}

.hz-s1 h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
}

.hz-s1 h1 .mut,
.hz-s3 h2 .mut {
  color: var(--d-mut);
}

.hz-stage .rule {
  background: var(--d-accent);
  margin: 26px 0 22px;
}

.hz-s1 .sub {
  max-width: 30em;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  color: var(--d-mut);
}

.hz-s1 .cta-row {
  margin-top: 30px;
}

.hz-stage .lnk {
  border-color: var(--d-accent);
}

/* The stage-1 buttons are for the static layouts only; the scroll story ends on its own. */
.hz-live .static-only {
  display: none;
}

/* Word-by-word reveal. Words are wrapped by the script. */
.js:not(.hz-ready) .hz-s1 h1,
.js:not(.hz-ready) .hz-s1 .rule,
.js:not(.hz-ready) .hz-s1 .sub,
.js:not(.hz-ready) .hz-s1 .cta-row {
  visibility: hidden;
}

.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.wi {
  display: inline-block;
  will-change: transform;
}

/* Stage 2 caption. */
.hz-s2 {
  left: var(--gutter);
  bottom: 14vh;
  max-width: 22em;
  visibility: hidden;
  opacity: 0;
}

.hz-s2 .label {
  color: var(--d-mut);
}

.hz-s2 .label b {
  color: var(--d-accent);
}

.hz-s2 .line {
  margin-top: 14px;
  font: 500 clamp(1.5rem, 2.6vw, 2.25rem) / 1.1 var(--sans);
  letter-spacing: -0.03em;
}

/* Stage 3: product window and the two calls to action. */
.hz-s3 {
  inset: 0;
  padding: 96px var(--gutter) 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  pointer-events: none;
}

.hz-s3 > * {
  pointer-events: auto;
}

.s3-copy > *,
.window {
  visibility: hidden;
  opacity: 0;
}

.hz-s3 h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.hz-s3 .sub {
  max-width: 26em;
  color: var(--d-mut);
}

.hz-s3 .cta-row {
  margin-top: 30px;
}

.window {
  justify-self: end;
  width: min(100%, 560px);
  background: var(--d-card);
  border: 1px solid var(--d-line);
  border-radius: 13pt;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(244, 242, 236, 0.02) inset;
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--d-line);
  color: var(--d-text);
}

.win-bar .dim {
  margin-left: auto;
  color: var(--d-mut);
}

.dots {
  display: inline-flex;
  gap: 6px;
}

.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--d-line);
}

.win-body {
  padding: 22px 22px 24px;
}

.win-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.window .name {
  font: 600 1.45rem/1.1 var(--sans);
  letter-spacing: -0.03em;
}

.window .note {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--d-mut);
}

.pill {
  flex: none;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 9px 5px;
  border-radius: 4pt;
  border: 1px solid var(--d-line);
  color: var(--d-text);
  white-space: nowrap;
}

.window dl {
  margin-top: 18px;
  border-top: 1px solid var(--d-line);
}

.window dl div {
  display: grid;
  grid-template-columns: 7.2em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--d-line);
  font-size: 0.92rem;
}

.window dt {
  color: var(--d-mut);
}

.window .flag {
  margin-top: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--d-accent);
  font-size: 0.86rem;
  color: var(--d-mut);
}

.window .flag b {
  display: block;
  font-weight: 500;
  color: var(--d-text);
}

.hz-cue {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 30px;
  color: var(--d-mut);
  display: none;
}

.hz-live .hz-cue {
  display: block;
}

.hz-cue::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: var(--d-accent);
}

/* ---------- the light section ---------- */

.light {
  position: relative;
  z-index: 5;
  background: var(--l-bg);
  color: var(--l-ink);
  padding: clamp(40px, 7vw, 96px) var(--gutter) 40px;
}

/* A light horizon that rises over the dark stage as the pin releases. */
.light::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  top: calc(-6vw + 1px);
  height: 6vw;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--l-bg);
}

.light .wrap {
  position: relative;
  max-width: 1296px;
  margin: 0 auto;
}

.light h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.light h2 .mut {
  color: var(--l-tan);
}

.light .rule {
  background: var(--l-accent);
  margin: 24px 0 20px;
}

.light .sub {
  max-width: 36em;
  font-size: 1.1rem;
  color: var(--l-mut);
}

.cards {
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--l-card);
  border: 1px solid var(--l-line);
  border-radius: 13pt;
  padding: 22px 22px 26px;
}

.card .label {
  color: var(--l-mut);
}

.card .label b {
  color: var(--l-accent);
}

.card h3 {
  margin: 18px 0 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--l-line);
  font: 500 1.35rem/1.15 var(--sans);
  letter-spacing: -0.025em;
}

.card p:last-child {
  color: var(--l-mut);
  font-size: 0.98rem;
}

.light .cta-row {
  margin-top: 44px;
}

.light .lnk {
  border-color: var(--l-accent);
}

.light a:focus-visible {
  outline-color: var(--l-accent);
}

.foot {
  margin-top: 88px;
  padding-top: 24px;
  border-top: 1px solid var(--l-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--l-mut);
}

.foot .brand {
  color: var(--l-ink);
}

.foot .pmark {
  background: var(--l-ink);
  color: var(--l-accent);
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hz-nav {
    padding: 20px var(--gutter);
  }

  .hz-s1 {
    top: 15vh;
    top: 15svh;
  }

  .hz-stage .rule {
    margin: 20px 0 18px;
  }

  .hz-s2 {
    bottom: 12vh;
  }

  .hz-s3 {
    padding: 80px var(--gutter) 28px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 22px;
    align-content: center;
  }

  .window {
    order: -1;
    justify-self: stretch;
    width: 100%;
  }

  .win-body {
    padding: 16px 16px 18px;
  }

  .window .name {
    font-size: 1.2rem;
  }

  .window dl {
    margin-top: 12px;
  }

  .window dl div {
    padding: 7px 0;
    font-size: 0.84rem;
    grid-template-columns: 6.4em 1fr;
  }

  .window .flag {
    display: none;
  }

  .hz-s3 h2 {
    font-size: 1.75rem;
  }

  .hz-s3 .rule {
    margin: 14px 0 12px;
  }

  .hz-s3 .sub {
    font-size: 0.95rem;
  }

  .hz-s3 .cta-row {
    margin-top: 18px;
  }

  .hz-cue {
    display: none !important;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .light::before {
    top: calc(-8vw + 1px);
    height: 8vw;
  }
}

@media (max-height: 700px) and (max-width: 860px) {
  .window dl div:nth-child(n + 3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .hz-canvas {
    transition: none;
  }
}
