/*
  Shared styles for the secondary pages (About us, Privacy Policy, Terms of Service).
  The base, header, curtain, button and perks rules are the same as in index.html; keep
  them in step when the home page changes.
*/

:root {
  --bg: #000;
  --fg: #fff;
  --fg-muted: rgba(255, 255, 255, 0.85);
  --orange: #fb5607;
  --purple: #8338ec; /* 3.7:1 on black: large text only (WCAG 1.4.3) */
  --focus: #fff;

  /* Side margin: as designed up to 1440px; on wider screens it grows so the content
     stays a 1290px column in the middle instead of stretching to the screen edges */
  --gutter: max(clamp(1rem, 5.2vw, 4.6875rem), (100vw - 80.625rem) / 2);
  --font-sans: "Questrial", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Fluid type: rem bounds so it follows browser zoom and text-size settings */
  --step-brand: clamp(1.125rem, 0.9rem + 0.8vw, 1.5625rem);  /* 25px @1440 */
  --step-mono: clamp(0.8125rem, 0.7rem + 0.3vw, 0.9375rem);  /* 15px @1440 */

  --header-h: calc(clamp(1.5rem, 4vw, 3.5rem) + 2.75rem);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-space, var(--header-h));   /* anchors land below the fixed header */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

img,
video { display: block; max-width: 100%; }

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

/* main only receives focus programmatically ("skip to content"), so no outline */
main[tabindex="-1"]:focus { outline: none; }

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

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  border-radius: 0.375rem;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* ---------- Page shell ---------- */

.page {
  padding-top: var(--header-space, var(--header-h));
  position: relative;
  overflow: clip;
  isolation: isolate;
}

/* Each band of sections gets its own light curtain (right side up top, left side below) */
.band {
  position: relative;
  isolation: isolate;
}

/* Decorative diagonal "light curtain" */
.curtain {
  position: absolute;
  inset: 0 0 0 auto;
  width: 85%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 30% at 45% 55%, rgba(200, 50, 110, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 30%, rgba(131, 56, 236, 0.85), transparent 70%),
    linear-gradient(180deg, #3a0f5a 0%, #2a0a36 100%);
  /* Diagonal shape, then soft fades on the inner side, top and bottom so no box edge shows */
  -webkit-mask-image:
    linear-gradient(150deg, transparent 22%, #000 40%),
    linear-gradient(210deg, #000 45%, transparent 78%),
    linear-gradient(90deg, transparent, #000 30%),
    linear-gradient(180deg, transparent, #000 15%, #000 75%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(150deg, transparent 22%, #000 40%),
    linear-gradient(210deg, #000 45%, transparent 78%),
    linear-gradient(90deg, transparent, #000 30%),
    linear-gradient(180deg, transparent, #000 15%, #000 75%, transparent);
  mask-composite: intersect;
}

.curtain__stripes {
  position: absolute;
  inset: 0 -76px 0 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0.07) 18px,
    rgba(255, 255, 255, 0) 36px,
    rgba(0, 0, 0, 0.35) 56px,
    rgba(255, 255, 255, 0) 76px
  );
  animation: drift 14s ease-in-out infinite alternate;
}

/* Top curtain also sits behind the header, as in the design */
.band--top > .curtain { top: calc(-1 * var(--header-space, var(--header-h))); }

/* Mirrored copy for the lower sections */
.curtain--left {
  inset: 0 auto 0 0;
  transform: scaleX(-1);
}

.motion-paused .curtain__stripes { animation-play-state: paused; }

@keyframes drift {
  from { transform: translateX(-76px); }
  to   { transform: translateX(0); }
}

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

/* Always on screen. At the top it looks as designed; once scrolled it slims down and
   gets a dark frosted background so content passing under it stays readable. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) 0;
  transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  background: rgba(8, 8, 10, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: var(--step-brand);
  line-height: 1.2;
}

.brand__logo {
  width: clamp(2rem, 1.2rem + 1.5vw, 2.625rem);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: 0.4375rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4.5vw, 4rem);
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 4.5vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-block;
  padding: 0.5rem 0.25rem;           /* ≥24px target (WCAG 2.5.8) */
  font-size: 1rem;                   /* 16px */
  line-height: 1.2;
  transition: color 0.2s;
}

.nav__link:hover { color: var(--orange); }

.nav__toggle { display: none; }


/* 24px text = "large text", so white on orange (3.3:1) passes WCAG 1.4.3 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(2.75rem, 3.9vw, 3.5rem);
  margin-top: clamp(0.75rem, 1.1vw, 1rem);
  padding: 0 1.375rem;
  background: var(--orange);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 0.625rem;
  transition: background-color 0.2s;
}

.button:hover { background: #e14a00; }

/* ---------- Section intro (shared by content sections) ---------- */

.section-intro {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 1.2rem + 2.6vw, 3.5rem);  /* 56px @1440 */
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-lede {
  margin: clamp(0.5rem, 1vw, 0.75rem) 0 0;
  font-size: clamp(1.0625rem, 0.85rem + 0.7vw, 1.5rem);  /* 24px @1440 */
  line-height: 1.25;
  color: var(--fg-muted);
}

/* ---------- Perks strip (same as the home page's) ---------- */

/* Benefits strip under the step cards: colored bar on top, thin dividers between columns */
.perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 77.125rem;
  margin: clamp(2.5rem, 4vw, 3.5rem) auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.perk {
  position: relative;
  padding: clamp(1.25rem, 2vw, 1.5rem) clamp(0.75rem, 1.6vw, 1.5rem) clamp(1.5rem, 2.6vw, 2.25rem);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.perk:first-child { border-left: 0; }

/* Bar spans the divider too, so the four bars meet edge to edge */
.perk::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  right: 0;
  height: 0.375rem;
  background: var(--orange);
}

.perk:first-child::before { left: 0; }

.perk:nth-child(even)::before { background: var(--purple); }

.perk__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.95rem + 0.65vw, 1.5rem);  /* 24px @1440 */
  font-weight: 700;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.perk__text {
  max-width: 12em;                /* narrow measure, as in the design */
  margin: clamp(0.625rem, 1vw, 0.875rem) auto 0;
  font-size: clamp(1rem, 0.85rem + 0.4vw, 1.25rem);  /* 20px @1440 */
  line-height: 1.12;
}

/* ---------- Motion control (in the header, after Contact) ---------- */

.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0 0.875rem;
  color: var(--fg);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  cursor: pointer;
}

.motion-toggle:hover { border-color: var(--fg); }

.motion-toggle__icon { width: 0.75rem; height: 0.75rem; fill: currentColor; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: block; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }

/* No JS → videos never start, so the control is pointless */
html:not(.js) .motion-toggle { display: none; }

/* Short pages (the legal ones) still keep the footer at the bottom of the screen */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

/* ---------- Page content width ---------- */

/* 1260px of content at 1440, as in the design */
.wrap {
  width: min(78.75rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.title-lg {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.1rem + 3.9vw, 4.25rem);   /* 68px @1440 */
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.body-copy {
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.3125rem);   /* 21px @1440 */
  line-height: 1.25;
}

.body-copy p { margin: 0; }

.body-copy p + p { margin-top: 1em; }

/* ---------- About: behind the cut ---------- */

.about-intro {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.about-intro__eyebrow {
  margin: 0 0 clamp(0.5rem, 1vw, 0.875rem);
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  line-height: 1.5;
  color: var(--fg-muted);
}

.about-intro__lede {
  max-width: 30em;
  margin: clamp(0.75rem, 1.4vw, 1.25rem) 0 0;
  font-size: clamp(1.0625rem, 0.85rem + 0.7vw, 1.5rem);   /* 24px @1440 */
  line-height: 1.25;
}

/* ---------- About: why renderline ---------- */

.why {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: start;
  gap: 2.5rem clamp(2rem, 4.5vw, 4rem);
  margin-top: clamp(2.5rem, 4.5vw, 4rem);
}

/* Before → after clip (the "BEFORE" title is part of the video) */
.before {
  margin: 0;
  overflow: hidden;
  border-radius: clamp(1rem, 1.8vw, 1.5rem);
  aspect-ratio: 16 / 9;
  background: #1b1b1b;
}

.before__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why__copy { padding-top: clamp(0rem, 1vw, 0.5rem); }

.why__copy .title-lg { text-align: right; }

.why__copy .body-copy { margin-top: clamp(0.75rem, 1.4vw, 1.25rem); }

/* ---------- About: the editor behind it ---------- */

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 23vw, 21rem);
  align-items: start;
  gap: 2rem clamp(2rem, 8vw, 9rem);
  margin-top: clamp(3rem, 5vw, 4.5rem);
}

.editor__quote {
  max-width: 37em;
  margin: clamp(0.75rem, 1.4vw, 1.25rem) 0 0;
}

.editor__quote blockquote { margin: 0; }

.editor__quote figcaption { margin-top: 1.5em; }

.editor__portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 332 / 410;
  object-fit: contain;
  background: #fff8d6;
  border-radius: clamp(1rem, 1.8vw, 1.5rem);
}

.about-perks { margin-top: clamp(3rem, 6vw, 5.5rem); }

/* ---------- About: trusted by clients ---------- */

.trusted { margin-top: clamp(4rem, 7vw, 6rem); }

.trusted__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.trusted__where {
  margin: 0;
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
}

.reviews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  padding: 0;
  list-style: none;
}

.reviews > li { display: grid; }        /* cards in a row share one height */

.review {
  margin: 0;
  padding: clamp(1rem, 1.7vw, 1.5rem);
  color: #111;
  background: #fff;
  border-radius: clamp(1rem, 1.8vw, 1.5rem);
}

.review__who {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 0.625rem;
}

.review__icon {
  width: 1.75rem;
  height: 1.75rem;
  color: #6b6b6b;
}

.review__name {
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.375rem);   /* 22px @1440 */
  line-height: 1.2;
}

.review__role {
  grid-column: 1 / -1;
  font-size: 1rem;
  line-height: 1.3;
  color: #6a1fd6;                  /* darker violet: 6.8:1 on white */
}

.review blockquote {
  margin: 0.5rem 0 0;
  font-size: clamp(1rem, 0.95rem + 0.15vw, 1.0625rem);
  line-height: 1.3;
}

.review blockquote p { margin: 0; }

/* ---------- About: closing call to action ---------- */

.about-cta {
  padding: clamp(4rem, 7vw, 6rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.about-cta__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.2rem + 4.4vw, 4.75rem);   /* 76px @1440 */
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.about-cta__lede {
  margin: 0.25rem 0 0;
  font-size: clamp(1.0625rem, 0.85rem + 0.7vw, 1.5rem);
  line-height: 1.3;
}

.about-cta .button { margin-top: clamp(1rem, 1.6vw, 1.5rem); }

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

.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 3vw, 2.5rem);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr) minmax(0, 0.9fr);
  gap: 2rem clamp(2rem, 4vw, 3rem);
}

.site-footer__tagline {
  margin: 0.875rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-block;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--orange); }

.site-footer__contact p { margin: 0.25rem 0 0.75rem; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  list-style: none;
}

.site-footer__legal li + li::before {
  content: "·";
  margin-right: 0.75rem;
}

/* ---------- Legal documents (Privacy Policy, Terms of Service) ---------- */

.doc {
  max-width: 58.5rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.doc__meta {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  color: var(--fg-muted);
}

.doc__body {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.3125rem);   /* 21px @1440 */
  line-height: 1.6;
}

.doc__body p,
.doc__body ul { margin: 0; }

.doc__body p + p,
.doc__body ul + p,
.doc__table + p { margin-top: 1.1em; }

.doc__body h2 {
  margin: 1.4em 0 0.15em;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 0.6vw, 1.625rem);   /* 26px @1440 */
  font-weight: 700;
  line-height: 1.3;
}

.doc__body ul { padding-left: 1.4em; }

.doc__body a { color: var(--orange); }
.doc__body a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.doc__table {
  margin: 1.1em 0;
  overflow-x: auto;
}

.doc__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.35;
}

.doc__table th,
.doc__table td {
  padding: 0.55em 0.75em 0.7em;
  border: 1px solid rgba(255, 255, 255, 0.75);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.doc__table thead th {
  background: var(--orange);
  border-color: var(--orange);
}

.doc__table tbody th { width: 34%; }

/* Three-column tables */
.doc__table tbody th:nth-last-child(3) { width: 28%; }
.doc__table tr > :nth-child(2):nth-last-child(2) { width: 24%; }

/* ---------- Tablet ---------- */

@media (max-width: 60em) {
  .why,
  .editor { grid-template-columns: minmax(0, 1fr); }

  .why__copy .title-lg { text-align: left; }

  .editor__portrait { max-width: 18rem; }

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

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

  .perk:nth-child(odd) { border-left: 0; }

  .perk:nth-child(odd)::before { left: 0; }

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

  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- Mobile ---------- */

@media (max-width: 45em) {
  .nav__toggle {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 2.75rem;                  /* 44px touch target */
    height: 2.75rem;
    margin-right: -0.5rem;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    border-radius: 0.375rem;
    cursor: pointer;
  }

  .nav__toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s;
  }

  .nav { gap: 0.5rem; }

  .motion-toggle {
    order: -1;                       /* before the menu button */
    width: 2.75rem;                  /* 44px touch target */
    min-height: 2.75rem;
    padding: 0;
  }

  .motion-toggle__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  /* Without JS the list simply stays visible */
  .js .nav__list {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    background: #0c0c0e;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.75rem;
    visibility: hidden;                /* removes links from tab order + a11y tree */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s;
  }

  .js .nav__list.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s, transform 0.2s;
  }

  .js .nav__link {
    display: block;
    padding: 0.875rem 1.25rem;
  }

  .js .nav__link:focus-visible { outline-offset: -4px; }

  .curtain { width: 130%; }
}

@media (max-width: 30em) {
  .reviews { grid-template-columns: minmax(0, 1fr); }

  .perks {
    grid-template-columns: minmax(0, 1fr);
    max-width: 24rem;
  }

  .perk { border-left: 0; }

  .perk::before { left: 0; }

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

/* The drifting curtain keeps moving (like the videos); "Pause motion" stops it */
@media (prefers-reduced-motion: reduce) {
  *:not(.curtain__stripes),
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .curtain { display: none; }
  .button { border: 1px solid ButtonText; }
  .review { border: 1px solid CanvasText; }
  .nav__toggle-bar { background: CanvasText; }
  .js .nav__list { border-color: CanvasText; }
}
