/* ==========================================================================
   RimLight landing — built from the "RimLight Website" Sketch comp.
   The hero is a fixed 1440x900 composition reproduced with container units
   (1 design px = 100/1440 cqw), so the whole layout scales exactly; below
   760px it reflows into a phone composition instead of shrinking.
   ========================================================================== */

html { background: #000; }

.rl {
  --u: 0.0694444cqw;
  --ink: #ffffff;
  --muted: #868383;
  --track-off: #333644;
  --track-on: #232d4f;
  --knob: #c9cedb;
  --knob-ink: #1e2430;
  --face: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;

  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #000;
  color: var(--ink);
  font-family: var(--face);
  -webkit-font-smoothing: antialiased;
}

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

.rl img { display: block; max-width: 100%; }

.rl a { color: inherit; }

.rl a.rl-cta { color: #24262a; }

.rl a.rl-skip { color: #0a0d12; }

::selection { background: #ffffff; color: #0a0d12; }

.rl :focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 4px;
}

.rl-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 30;
  background: #fff;
  color: #0a0d12;
  padding: 10px 16px;
  font-weight: 600;
}

.rl-skip:focus { left: 12px; top: 12px; }

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

.rl-hero {
  position: relative;
  width: 100%;
  flex: none;
  container-type: inline-size;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  background: #05070a;
  isolation: isolate;
}

.rl-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 700ms ease;
}

.rl-bg--on { opacity: 0; }

.rl[data-state='on'] .rl-bg--off { opacity: 0; }
.rl[data-state='on'] .rl-bg--on { opacity: 1; }

/* the rim light on the display */

.rl-rim {
  position: absolute;
  left: calc(97 * var(--u));
  top: calc(133 * var(--u));
  width: calc(1247 * var(--u));
  height: calc(721 * var(--u));
  border: calc(60 * var(--u)) solid #fff;
  border-radius: calc(114 * var(--u));
  box-shadow:
    0 0 calc(72 * var(--u)) rgba(255, 255, 255, 0.85),
    inset 0 0 calc(72 * var(--u)) rgba(255, 255, 255, 0.7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 700ms ease;
}

.rl[data-state='on'] .rl-rim { opacity: 1; }

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

.rl-bar {
  position: absolute;
  left: 50%;
  top: calc(23 * var(--u));
  transform: translateX(-50%);
  width: calc(434 * var(--u));
  height: calc(83 * var(--u));
  padding: 0 calc(16 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(20 * var(--u));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: calc(28 * var(--u));
  background: rgba(10, 12, 16, 0.5);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

.rl-brand {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  text-decoration: none;
}

.rl-brand img {
  width: calc(57 * var(--u));
  height: calc(57 * var(--u));
  border-radius: calc(13 * var(--u));
}

.rl-brand span {
  font-size: calc(43 * var(--u));
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1;
  color: #fff;
}

/* switch */

.rl-switch {
  position: relative;
  flex: none;
  width: calc(94 * var(--u));
  height: calc(36 * var(--u));
  padding: 0;
  border: 0;
  border-radius: calc(18.14 * var(--u));
  background: linear-gradient(180deg, #282b38 0%, #333644 46%, #383b49 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 320ms ease, box-shadow 320ms ease;
}

.rl[data-state='on'] .rl-switch {
  background: linear-gradient(180deg, #192142 0%, #212b4c 50%, #333e6c 100%);
  box-shadow: inset 0 0 0 1px rgba(130, 160, 235, 0.5);
}

.rl-switch__knob {
  position: absolute;
  top: calc(4.42 * var(--u));
  left: calc(5.31 * var(--u));
  width: calc(42.48 * var(--u));
  height: calc(26.96 * var(--u));
  display: grid;
  place-items: center;
  border-radius: calc(13.27 * var(--u));
  background: linear-gradient(180deg, #ffffff 0%, #e8eaf1 22%, #c7cbd9 64%, #9ca2b7 100%);
  box-shadow: 0 calc(1 * var(--u)) calc(1 * var(--u)) rgba(0, 0, 0, 0.35);
  color: var(--knob-ink);
  font-family: var(--face);
  font-size: calc(15 * var(--u));
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rl[data-state='on'] .rl-switch__knob { transform: translateX(calc(42 * var(--u))); }

/* ------------------------------------------------------------- copy ------- */

.rl-copy {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(479 * var(--u));
  text-align: center;
  padding: 0 calc(40 * var(--u));
}

.rl-h {
  font-size: calc(66 * var(--u));
  line-height: 1.53;
  font-weight: 700;
  letter-spacing: -0.014em;
  margin: 0;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.45);
}

.rl-sub {
  margin: calc(12 * var(--u)) auto 0;
  max-width: calc(640 * var(--u));
  font-size: calc(18.5 * var(--u));
  line-height: calc(28 * var(--u));
  font-weight: 400;
  letter-spacing: 0.027em;
  color: #fff;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.4);
}

/* the two states cross-fade inside one reserved block */

.rl-state {
  display: grid;
}

.rl-state > * {
  grid-area: 1 / 1;
  transition: opacity 500ms ease, visibility 500ms;
}

.rl-state__on { opacity: 0; visibility: hidden; }

.rl[data-state='on'] .rl-state__off { opacity: 0; visibility: hidden; }
.rl[data-state='on'] .rl-state__on { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------- cta -------- */

.rl-cta {
  position: absolute;
  left: 50%;
  top: calc(712 * var(--u));
  transform: translateX(-50%);
  height: calc(41 * var(--u));
  padding: 0 calc(20 * var(--u));
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  border-radius: calc(21 * var(--u));
  background: linear-gradient(180deg, #ffffff 0%, #e9eaee 55%, #d3d6dd 100%);
  color: #24262a;
  text-decoration: none;
  box-shadow: 0 calc(2 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.35);
}

.rl-cta__icon {
  width: calc(24 * var(--u));
  height: calc(25 * var(--u));
  flex: none;
}

.rl-cta span {
  font-size: calc(16.5 * var(--u));
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

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

.rl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  height: 100px;
  padding: 0 40px;
  background: #000;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.048em;
}

.rl-foot a { color: inherit; text-decoration: none; }
.rl-foot a:hover { color: #d6d3d3; text-decoration: underline; }

.rl-foot__meta { margin: 0; }

.rl-foot nav {
  display: flex;
  gap: 32px;
}

/* --------------------------------------------------------- responsive ---- */

@media (max-width: 760px) {
  /* the copy sits over the subject's face on a phone crop, so it gets its own ground */
  .rl-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(
      122% 46% at 50% 52%,
      rgba(4, 6, 10, 0.78) 0%,
      rgba(4, 6, 10, 0.5) 44%,
      rgba(4, 6, 10, 0) 74%
    );
  }

  .rl-bar {
    z-index: 3;
  }

  .rl-hero {
    aspect-ratio: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 92px 20px 40px;
  }

  .rl-bar {
    position: absolute;
    top: 18px;
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
    height: 62px;
    padding: 0 12px;
    border-radius: 20px;
    gap: 12px;
  }

  .rl-brand img { width: 40px; height: 40px; border-radius: 10px; }
  .rl-brand span { font-size: 30px; }

  .rl-switch {
    width: 78px;
    height: 30px;
    border-radius: 15px;
  }

  .rl-switch__knob {
    width: 35px;
    height: 22px;
    top: 4px;
    left: 4px;
    border-radius: 11px;
    font-size: 13px;
  }

  .rl[data-state='on'] .rl-switch__knob { transform: translateX(35px); }

  .rl-rim {
    z-index: 2;
    left: 14px;
    right: 14px;
    top: 22%;
    bottom: 22%;
    width: auto;
    height: auto;
    border-width: 16px;
    border-radius: 34px;
    box-shadow:
      0 0 28px rgba(255, 255, 255, 0.85),
      inset 0 0 28px rgba(255, 255, 255, 0.7);
  }

  .rl-copy {
    position: relative;
    z-index: 3;
    /* clears the rim's bars, which sit closer to the edge than the hero padding */
    padding: 0 14px;
    width: 100%;
    max-width: 30rem;
  }

  .rl-h {
    font-size: clamp(34px, 10.5vw, 46px);
    line-height: 1.14;
    letter-spacing: -0.045em;
  }

  .rl-sub {
    margin-top: 14px;
    max-width: 30rem;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.02em;
  }

  .rl-cta {
    position: relative;
    left: auto;
    z-index: 2;
    transform: none;
    height: 46px;
    padding: 0 22px;
    gap: 9px;
    border-radius: 23px;
  }

  .rl-cta__icon { width: 24px; height: 25px; }
  .rl-cta span { font-size: 15px; }

  .rl-foot {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: auto;
    padding: 22px 20px 30px;
    text-align: center;
  }

  .rl-foot nav { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .rl *, .rl *::before, .rl *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
