/* Wilbr landing page. Desktop values are taken from Figma frame "Desktop - 59" (1440 wide). */

/* MagdaClean: add its web font file here and it replaces DM Mono:
@font-face { font-family: "MagdaClean"; src: url("assets/fonts/MagdaClean-Regular.woff2") format("woff2"); font-display: swap; }
*/

:root {
  --ink: #0d0d0d;
  --rust-deep: #681b0b;
  --rust: #b85029;
  --yellow: #ffef16;
  --line: rgba(255, 255, 255, 0.14);
  --font-display: "Nunito", system-ui, sans-serif;
  --font-ui: "Nunito Sans", system-ui, sans-serif;
  --font-body: "SF Pro Text", "SF Pro", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-label: "MagdaClean", "DM Mono", ui-monospace, monospace;
  --gutter: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
h1, h2, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared pieces ---------- */

.eyebrow {
  font-family: var(--font-label);
  font-size: 15px;
  line-height: 25px;
  letter-spacing: 0.15px;
  text-transform: uppercase;
}
.eyebrow-yellow { color: var(--yellow); }
.eyebrow-dim { opacity: 0.43; }

.logo {
  position: relative;
  display: block;
  width: 140px;
  height: 46px;
  flex: none;
}
.logo-mark { position: absolute; left: 0; top: 9.5px; width: 47.093px; height: 32.993px; }
.logo-word {
  position: absolute;
  left: 53.39px;
  top: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 33.83px;
  letter-spacing: -1.015px;
  line-height: normal;
}
.logo-tm {
  position: absolute;
  left: 127.78px;
  top: 3.33px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: 18.494px;
  line-height: normal;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 11px 24px;
  border-radius: 65px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.48px;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #ececec; }
.btn-light:active { transform: translateY(1px); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 52px;
  line-height: 53px;
  letter-spacing: -1.56px;
  max-width: 521px;
}
.section-lede {
  font-size: 19px;
  line-height: 25px;
  letter-spacing: -0.76px;
  --o: 0.5; /* resting opacity; the scroll reveal fades to this, not to 1 */
  opacity: var(--o);
  max-width: 468px;
}

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

.site-header {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  z-index: 5;
}
.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.header-row .logo { margin-top: 1px; }

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

.hero {
  position: relative;
  /* 52vw floor keeps the whole phone in frame on screens wider than ~2000px */
  height: max(clamp(660px, 71.18vw, 1025px), 52vw);
  overflow: hidden;
  background: var(--rust-deep);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero-shade { position: absolute; top: 0; bottom: 0; width: 42.64%; pointer-events: none; }
.hero-shade-left {
  left: 0;
  background: linear-gradient(to right, var(--rust-deep), rgba(104, 27, 11, 0));
}
.hero-shade-right {
  right: -1.04%;
  background: linear-gradient(to left, var(--rust) 0%, rgba(184, 80, 41, 0.9) 39%, rgba(184, 80, 41, 0) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 183px;
}
.hero-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 112px;
  line-height: 103px;
  letter-spacing: -6.72px;
}
.hero-lede {
  margin-top: 24px;
  max-width: 315px; /* Figma box is 324; browser text runs narrower, so 315 reproduces her line breaks */
  font-size: 19px;
  line-height: 25px;
  letter-spacing: -0.76px;
  text-wrap: pretty;
}

.appstore {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 11.689px;
  padding: 7.793px 11.689px;
  background: #fff;
  border-radius: 4.87px;
  transition: transform 0.15s ease;
}
.appstore:hover { transform: translateY(-1px); }
.appstore-icon { width: 25.36px; height: 31.171px; }
.appstore-text { position: relative; width: 95.574px; height: 31.174px; }
.appstore-download { position: absolute; left: 1.58px; top: 0; width: 88.038px; height: 7.911px; }
.appstore-name { position: absolute; left: 0; top: 11.74px; width: 95.574px; height: 19.434px; }

/* ---------- Lower half: included + CTA, over the hand photo ---------- */

.lower {
  position: relative;
  overflow: hidden;
  background: #000;
}

/* Desktop photo: same box as the Figma (left 176, 2056 x 1255 at a 1440 frame), scaled with the frame. */
.team-photo-desk {
  position: absolute;
  top: 0;
  left: max(0px, calc((100% - 1440px) / 2));
  width: min(100%, 1440px);
  pointer-events: none;
}
.team-photo-box {
  position: absolute;
  left: 12.222%;
  top: 0;
  width: 142.778%;
  aspect-ratio: 2056 / 1255;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
  mask-composite: intersect;
}
.team-photo-box img {
  position: absolute;
  left: -0.01%;
  top: -9.24%;
  width: 100.01%;
  height: 109.24%;
  max-width: none;
}
.team-photo-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(227.83deg, rgba(0, 0, 0, 0) 49.144%, #000 85.191%);
}

.included {
  position: relative;
  z-index: 1;
  padding-top: 130px;
}
.included .section-title { margin-top: 16px; }
.included .section-lede { margin-top: 21px; max-width: 445px; }

.team-photo-mob { display: none; }

.accordion {
  margin-top: 105px;
  width: 512px;
  max-width: 100%;
  display: grid;
  gap: 16px;
}
.accordion details {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.accordion details[open] { border-radius: 12px; }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 21px 0 25px;
  font-size: 15px;
  letter-spacing: -0.45px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:focus-visible { outline-offset: -2px; border-radius: inherit; }
.accordion details:has(summary:focus-visible) { border-radius: 24px; }
.accordion details[open]:has(summary:focus-visible) { border-radius: 12px; }
.accordion summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: url("assets/chevron-a.svg") center / 8px 8px no-repeat;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}
.accordion details[open] summary::after { transform: rotate(-90deg); }
.accordion summary:hover { color: rgba(255, 255, 255, 0.8); }
.accordion details p {
  padding: 1.5px 43px 17px 25px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.56px;
  opacity: 0.5;
}
.accordion details p.copy-needed {
  color: var(--yellow);
  opacity: 0.7;
  font-style: italic;
}

.cta {
  position: relative;
  z-index: 1;
  padding-top: 153px;
  text-align: center;
}
.logo-center { margin-inline: auto; }
.cta-title { margin: 21px auto 0; }
.cta-lede { margin: 21px auto 0; max-width: 440px; }
.btn-cta { margin-top: 24px; min-width: 191px; }

.site-footer {
  text-wrap: balance;
  position: relative;
  z-index: 1;
  padding: 74px 24px 87px;
  text-align: center;
}

/* ---------- Narrower desktops: photo moves into the flow so it never sits behind the list ---------- */

@media (max-width: 1179px) {
  .team-photo-desk { display: none; }
  .team-photo-mob {
    display: block;
    position: relative;
    margin: 48px calc(var(--gutter) * -1) 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }
  .team-photo-mob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 42% 45%;
  }
  .team-photo-mob::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0) 60%, #000 100%);
  }
  .accordion { margin-top: 24px; }
  .cta { padding-top: 120px; }
}

/* ---------- Phones and small tablets ---------- */

@media (max-width: 1023px) {
  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--rust-deep);
  }
  .hero-copy { background: linear-gradient(to bottom, var(--rust-deep), #7b2811); }
  .hero-copy { order: 1; padding-top: 150px; padding-bottom: 48px; }
  .hero-media {
    order: 2;
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 3;
  }
  .hero-media img { position: absolute; inset: 0; }
  .hero-shade { display: none; }
  .hero-media::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 18%;
    z-index: 1;
    background: linear-gradient(to bottom, #7b2811, rgba(123, 40, 17, 0));
  }
}

@media (max-width: 819px) {
  :root { --gutter: 24px; }

  .site-header { top: 20px; }
  .header-row { align-items: center; }
  .header-row .logo { margin-top: 0; transform: scale(0.82); transform-origin: left center; }
  .site-header .btn { height: 40px; padding: 0 16px; font-size: 14px; }

  .hero-title { font-size: 84px; line-height: 80px; letter-spacing: -5px; }
  .hero-lede { font-size: 18px; }

  .section-title { font-size: 38px; line-height: 42px; letter-spacing: -1.1px; }
  .section-lede { font-size: 17px; line-height: 24px; }

  .included { padding-top: 88px; }
  .team-photo-mob { margin-top: 32px; aspect-ratio: 1 / 1; }
  .team-photo-mob img { object-position: 40% 45%; }

  .cta { padding-top: 96px; padding-inline: var(--gutter); }
  .site-footer { padding-top: 64px; padding-bottom: 56px; }
  .site-footer .eyebrow { font-size: 12px; letter-spacing: 0.1px; }
}

@media (max-width: 559px) {
  .hero-media { aspect-ratio: 4 / 5; }
  .cta-title { font-size: 34px; line-height: 38px; letter-spacing: -1px; }
}

/* ---------- Motion ---------- */
/* Everything here is gated on .js (set in <head>), so with scripts off the page shows fully. */

:root { interpolate-size: allow-keywords; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { transform: scale(1.06); } }
@keyframes fade { from { opacity: 0; } }

.js .hero-copy > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.js .hero-copy > :nth-child(1) { animation-delay: 0.1s; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.2s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.35s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.5s; }
.js .hero-media img { animation: settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.js .site-header { animation: fade 0.8s 0.4s backwards; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js .team-photo-box[data-reveal] { transform: none; transition-duration: 1.6s; }
.js [data-reveal].is-in { opacity: var(--o, 1); transform: none; }
/* Keyboard focus shows the element at once, even if its scroll fade has not run yet. */
.js [data-reveal]:focus-within { opacity: var(--o, 1); transform: none; transition: none; }

/* Accordion slides open where the browser supports it (Chrome, Edge, Safari 18.4+); elsewhere it opens instantly. */
.accordion details { transition: border-radius 0.25s ease, border-color 0.25s ease; }
.accordion details:hover { border-color: rgba(255, 255, 255, 0.28); }
.accordion details::details-content {
  height: 0;
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), content-visibility 0.35s allow-discrete;
}
.accordion details[open]::details-content { height: auto; }

.btn-light, .appstore { transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.btn-light:hover, .appstore:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: var(--o, 1); transform: none; }
}
