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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Figtree', sans-serif;
  background: #fff;
  color: #111;
}

#wave-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ── Hero block ── */

.hero-text {
  position: fixed;
  bottom: 56px;
  left: 60px;
  max-width: 520px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  transition: pointer-events 0s;
}

body.scrolled .hero-text {
  pointer-events: none;
}

/* Supporting copy: slogan + description + button */

.hero-body {
  margin-bottom: 20px;
  transition: opacity 0.22s ease;
}

body.scrolled .hero-body {
  opacity: 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-body .slogan,
.hero-body .description,
.hero-body .btn-primary {
  opacity: 0;
  animation: fadeUp 1.4s ease-out forwards;
}

.hero-body .slogan      { animation-delay: 0.3s; }
.hero-body .description { animation-delay: 0.55s; }
.hero-body .btn-primary { animation-delay: 0.8s; }

.slogan {
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 12px;
}

.description {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  color: #555;
  margin-bottom: 28px;
}

/* Big logo at the top of the hero block */

@keyframes logoReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-logo {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 0em;
  line-height: 1;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  /* origin at top-left so scale + translate lands at pill brand position */
  transform-origin: left top;
  /* JS clears this animationend so transitions work cleanly afterward */
  animation: logoReveal 1.4s ease-out 0.2s both;
}

.app-icon {
  height: 0.82em;
  width: auto;
  fill: currentColor;
  flex-shrink: 0;
}

/*
  On scroll: translate to pill brand position then scale to near-zero.
  --logo-tx / --logo-ty are set by nav.js before the class is applied.
  translate() runs in viewport space (applied after scale in matrix order).
*/
body.scrolled .hero-logo {
  opacity: 0;
  transform: translate(var(--logo-tx, 0px), var(--logo-ty, 0px)) scale(0.15);
  transition: opacity 0.3s ease,
              transform 0.46s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Pill nav ── */

.pill-nav {
  position: fixed;
  bottom: 56px;
  left: 60px;
  z-index: 10;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 100px;
  /* Doubled height: was ~10px padding, now ~22px */
  padding: 22px 24px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
  /* Materialise from the same bottom-left anchor */
  transform-origin: left bottom;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  transition: opacity 0.38s ease 0.14s,
              transform 0.42s cubic-bezier(0.34, 1.3, 0.64, 1) 0.14s;
}

body.scrolled .pill-nav {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Bigger brand with generous horizontal breathing room */
.pill-brand {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.18em;
  padding: 0 18px 0 6px;
  color: #111;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pill-brand .app-icon {
  height: 28px;
}

.pill-sep {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.13);
  flex-shrink: 0;
}

/* Links stay as plain nav links */
.pill-nav a:not(.pill-brand) {
  font-size: 13px;
  font-weight: 300;
  color: #111;
  text-decoration: none;
  opacity: 0.55;
  margin-left: 18px;
  transition: opacity 0.2s;
}


.pill-nav a:not(.pill-brand):hover {
  opacity: 1;
}

/* ── Hero spacer (creates the full-viewport first section) ── */

.hero-spacer {
  min-height: 100vh;
  position: relative;
  z-index: 0;
}

/* Sits above the fixed canvas, blocking particles for all content sections */
.content-sections {
  position: relative;
  z-index: 1;
  background: #fff;
}

/* ── Buttons ── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111;
  color: #fff;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.75;
}

.apple-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ── Shared layout ── */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 60px;
}

/* ── Features ── */

.features {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 100px 0;
}

.features h2 {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.feature-card {
  padding: 32px;
  background: #f7f7f7;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: #555;
}

/* ── FAQ ── */

.faq {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 100px 0;
}

.faq h2 {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.4px;
  margin-bottom: 56px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid #eee;
}

.faq-item:first-child {
  border-top: 1px solid #eee;
}

.faq-item h3 {
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 10px;
}

.faq-item p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: #555;
}

/* ── Download CTA ── */

.cta-section {
  position: relative;
  z-index: 1;
  background: #f7f7f7;
  padding: 100px 0 0;
  overflow: hidden;
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}

.cta-sub {
  font-size: 15px;
  font-weight: 300;
  color: #555;
  margin-bottom: 32px;
}

.requirements {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 300;
  color: #aaa;
}

/* ── Shared section typography ── */

.section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 20px;
  text-align: center;
}

.section-title {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.4px;
  line-height: 1.2;
  text-align: center;
}

/* ── Reveal on scroll ── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ── About ── */

.about {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 100px 0;
}

.about .section-title {
  margin-top: 0;
  margin-bottom: 32px;
}

.section-body {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: #444;
  max-width: 620px;
  text-align: center;
  margin: 0 auto;
}


/* ── Disciplines (pinned horizontal scroll) ── */

.disciplines {
  position: relative;
  z-index: 1;
  background: #fff;
  overflow: hidden;
}

.disciplines-heading {
  padding-top: 100px;
  padding-bottom: 48px;
}

.disciplines-gallery {
  display: flex;
  gap: 3px;
  padding-bottom: 80px;
  will-change: transform;
}

.discipline-card {
  flex-shrink: 0;
  width: 400px;
  background: #f7f7f7;
}

.discipline-card-body {
  padding: 36px 36px 40px;
}

.discipline-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 12px;
}

.discipline-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
}

/* ── Philosophy ── */

.philosophy {
  position: relative;
  z-index: 1;
  background: #f7f7f7;
  padding: 100px 0;
}

.philosophy-quote {
  font-size: 26px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: #111;
  margin-top: 24px;
  margin-bottom: 28px;
  max-width: 640px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.philosophy-sub {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: #555;
  max-width: 560px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ── How It Works (stacking cards) ── */

.how {
  position: relative;
  z-index: 1;
  background: #fff;
  padding-bottom: 80px;
}

.how-heading {
  padding-top: 100px;
  padding-bottom: 48px;
}

.steps-track {
  position: relative;
  height: 340px;
  margin: 0 60px;
  overflow: hidden;
  border-radius: 15px;
}

.step {
  position: absolute;
  inset: 0;
  background: #f0f0f0;
  padding: 48px 60px 52px;
  border-radius: 15px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.step:nth-child(1) { background: #f5f5f5; }
.step:nth-child(2) { background: #ebebeb; }
.step:nth-child(3) { background: #dedede; }
.step:nth-child(4) { background: #d0d0d0; }

.step-num {
  font-size: 64px;
  font-weight: 300;
  color: #111;
  line-height: 1;
  margin-bottom: 24px;
}

.step-title {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 14px;
}

.step-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: #555;
  max-width: 520px;
}

/* ── Footer wordmark ── */

.footer-wordmark-wrap {
  margin-top: -54px;
  padding-bottom: 40px;
}

.footer-wordmark {
  display: block;
  font-size: 18vw;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #ebebeb;
  text-align: center;
  user-select: none;
}

.footer-credit {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-size: 12px;
  font-weight: 300;
  color: #aaa;
  z-index: 2;
}

.footer-credit a {
  color: #666;
  text-decoration: none;
}

.footer-credit a:hover {
  color: #111;
}

/* ── Download panel animation ── */

#app {
  clip-path: inset(0 0% 0 0);
  transition: clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

html.panel-open {
  overflow: hidden;
}

html.panel-open #app {
  clip-path: inset(0 50% 0 0);
}

html.panel-open body .pill-nav,
html.panel-open body .hero-text {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ── Download panel ── */

#download-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  background: #111;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

html.panel-open #download-panel {
  transform: translateX(0);
}

.panel-close {
  position: absolute;
  top: 28px;
  right: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 8px;
  line-height: 0;
  transition: color 0.2s;
}

.panel-close:hover {
  color: #fff;
}

.panel-inner {
  padding: 60px;
  max-width: 400px;
  width: 100%;
}

.panel-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}

.panel-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: #999;
  margin-bottom: 36px;
}

.panel-form-wrap {
  position: relative;
}

.panel-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

#panel-form[hidden] {
  display: flex !important;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
}

.panel-input {
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #fff;
  background: #1c1c1c;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.panel-input:focus {
  border-color: #888;
}

.panel-input::placeholder {
  color: #999;
}

.panel-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.panel-submit {
  width: 100%;
  justify-content: center;
  background: #fff;
  color: #111;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.panel-submit:hover {
  background: #e8e8e8;
  opacity: 1;
}

.panel-error {
  font-size: 13px;
  font-weight: 300;
  color: #e57373;
  margin-bottom: 12px;
}

.panel-success {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 15px;
  font-weight: 300;
  color: #fff;
}

.panel-skip {
  display: inline-block;
  font-size: 13px;
  font-weight: 300;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
  margin-top: 4px;
}

.panel-skip:hover {
  color: #fff;
}

.panel-brand {
  position: absolute;
  bottom: 28px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0em;
}

.panel-brand svg {
  width: 20px;
  height: auto;
  flex-shrink: 0;
}

/* ── Responsive ── */

@media (max-width: 760px) {
  .hero-text {
    bottom: 40px;
    left: 24px;
    right: 24px;
    max-width: none;
  }

  .pill-nav {
    bottom: 24px;
    left: 24px;
    padding: 18px 20px;
  }

  .pill-brand {
    font-size: 16px;
    padding: 0 14px 0 4px;
  }

  .pill-nav a {
    margin-left: 14px;
  }

  .container {
    padding: 0 24px;
  }

  .features,
  .faq,
  .cta-section {
    padding: 72px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    font-size: 36px;
  }

  .features h2,
  .faq h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .cta-inner h2 {
    font-size: 30px;
  }
}
