:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --ink: #17181c;
  --muted: rgba(23, 24, 28, 0.58);
  --hairline: rgba(23, 24, 28, 0.1);
  --shadow: 0 24px 80px rgba(17, 18, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(180deg, #fafbfd 0%, #eef1f4 100%);
}

a {
  color: inherit;
  text-decoration-color: rgba(23, 24, 28, 0.3);
  text-underline-offset: 0.18em;
}

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

.page-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar,
.site-footer,
.hero,
.info-band,
.policy-layout {
  width: min(1200px, calc(100vw - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(22px) saturate(1.05);
  border: 1px solid rgba(23, 24, 28, 0.08);
  border-radius: 18px;
  box-shadow:
    0 14px 34px rgba(18, 21, 28, 0.08),
    0 2px 10px rgba(18, 21, 28, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.brand span {
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: 0.38em;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.94rem;
}

.topnav a,
.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.topnav a:hover,
.footer-links a:hover,
.info-block a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: stretch;
  gap: 24px;
  min-height: calc(100vh - 150px);
  padding: 24px 0 14px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 32px 6px 24px 6px;
}

.eyebrow,
.section-label,
.overlay-label,
.policy-meta {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(23, 24, 28, 0.4);
}

.hero-copy h1,
.policy-header h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  font-weight: 300;
  line-height: 1.02;
}

.hero-text,
.policy-header p,
.policy-card p,
.policy-card li,
.info-block p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.app-store-badge {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
}

.app-store-badge img {
  width: 246px;
  max-width: min(100%, 246px);
  height: auto;
  object-fit: contain;
}

.hero-stage {
  display: flex;
  align-items: stretch;
  min-height: 680px;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 680px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.3)),
    linear-gradient(180deg, rgba(224, 230, 238, 0.48), rgba(235, 239, 244, 0.24));
}

#sift-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 680px;
  touch-action: none;
}

.canvas-fallback {
  position: absolute;
  inset: auto 24px 24px 24px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: rgba(23, 24, 28, 0.45);
  font-size: 0.9rem;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.canvas-controls {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0;
  pointer-events: none;
}

.grain-button {
  appearance: none;
  border: 1px solid rgba(23, 24, 28, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(23, 24, 28, 0.82);
  padding: 11px 16px;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(18, 21, 28, 0.08);
  pointer-events: auto;
}

.grain-button:hover {
  background: rgba(255, 255, 255, 0.98);
}

.grain-button:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

.grain-count {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  color: rgba(23, 24, 28, 0.48);
  font-size: 0.92rem;
}

.support-band,
.policy-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(17, 18, 23, 0.06);
}

.home-features {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px 0 6px;
}

.home-features-intro,
.home-feature-item {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(17, 18, 23, 0.06);
}

.home-features-intro {
  padding: 24px;
}

.home-features-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 350;
  line-height: 1.05;
}

.home-features-intro p:last-child,
.home-feature-item p:last-child {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-feature-item {
  padding: 22px;
}

.home-feature-item h3 {
  margin: 8px 0 10px;
  font-size: 1.25rem;
  font-weight: 400;
}

.feature-gallery {
  padding: 18px 0 6px;
}

.feature-gallery-intro {
  max-width: 760px;
  padding: 0 0 18px;
}

.feature-gallery-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 350;
  line-height: 1.04;
}

.feature-gallery-intro p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.gallery-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  padding: 0 2px 12px;
  color: rgba(23, 24, 28, 0.45);
  font-size: 0.92rem;
}

.gallery-scroll-arrows {
  letter-spacing: 0.16em;
  color: rgba(23, 24, 28, 0.38);
}

.phone-gallery {
  display: flex;
  gap: 16px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
  overscroll-behavior-x: contain;
}

.feature-gallery {
  position: relative;
}

.phone-shot {
  flex: 0 0 clamp(150px, 18vw, 180px);
  min-width: 150px;
  margin: 0;
  padding: 14px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(17, 18, 23, 0.06);
  scroll-snap-align: center;
}

.phone-gallery::-webkit-scrollbar {
  display: none;
}

.phone-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 1179 / 2556;
  object-fit: contain;
  object-position: center top;
  border-radius: 18px;
  border: 1px solid rgba(23, 24, 28, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.phone-shot figcaption {
  padding: 14px 4px 2px;
}

.phone-shot figcaption p {
  margin: 8px 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

.support-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  margin: 18px auto 6px;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.support-links a {
  color: var(--muted);
  text-decoration: none;
}

.features-layout {
  width: min(1200px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 34px 0 20px;
}

.features-hero {
  max-width: 760px;
  padding: 8px 0 26px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.feature-panel {
  padding: 24px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(17, 18, 23, 0.06);
}

.feature-panel h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 400;
}

.feature-panel p:last-child {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 0 10px;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(23, 24, 28, 0.5);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.policy-body .topbar {
  position: relative;
}

.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 24px;
  padding: 32px 0 20px;
}

.policy-header {
  position: sticky;
  top: 110px;
  align-self: start;
  padding: 8px 0;
}

.policy-card {
  padding: 30px;
}

.policy-card h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 500;
}

.policy-card p + h2,
.policy-card ul + h2 {
  margin-top: 30px;
}

.policy-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.policy-card li + li {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-stage {
    order: 1;
    min-height: 560px;
  }

  .hero-copy {
    order: 2;
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .info-band,
  .policy-layout {
    grid-template-columns: 1fr;
  }

  .support-band {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .phone-gallery {
    gap: 14px;
  }

  .phone-shot {
    flex-basis: clamp(170px, 26vw, 200px);
    min-width: 170px;
  }

  .support-links {
    justify-content: flex-start;
  }

  .policy-header {
    position: static;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 12px;
  }

  .topbar,
  .site-footer,
  .hero,
  .support-band,
  .policy-layout,
  .features-layout {
    width: min(1200px, calc(100vw - 24px));
  }

  .topbar,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand span {
    letter-spacing: 0.32em;
  }

  .brand img {
    width: 62px;
    height: 62px;
  }

  .brand span {
    font-size: 1.28rem;
  }

  .topnav {
    justify-content: flex-start;
    gap: 12px 16px;
    font-size: 0.92rem;
  }

  .canvas-wrap,
  #sift-canvas,
  .hero-stage {
    min-height: 430px;
  }

  .canvas-controls {
    left: 18px;
    right: 18px;
    top: 18px;
    align-items: flex-start;
    flex-direction: row;
  }

  .hero-copy h1,
  .policy-header h1 {
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .hero-text {
    font-size: 0.98rem;
  }

  .app-store-badge img {
    width: min(246px, 72vw);
  }

  .home-features-intro,
  .home-feature-item,
  .support-band {
    padding: 16px 18px;
  }

  .phone-gallery {
    gap: 14px;
    padding: 2px 50vw 10px;
    scroll-padding-inline: 50vw;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(
      to right,
      transparent 0,
      rgba(0, 0, 0, 0.28) 12%,
      rgba(0, 0, 0, 1) 24%,
      rgba(0, 0, 0, 1) 76%,
      rgba(0, 0, 0, 0.28) 88%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      rgba(0, 0, 0, 0.28) 12%,
      rgba(0, 0, 0, 1) 24%,
      rgba(0, 0, 0, 1) 76%,
      rgba(0, 0, 0, 0.28) 88%,
      transparent 100%
    );
  }

  .phone-shot {
    flex-basis: clamp(190px, 76vw, 220px);
    min-width: 190px;
    padding: 14px;
  }

  .phone-shot img {
    height: auto;
  }

  .gallery-scroll-hint {
    padding-bottom: 10px;
    font-size: 0.88rem;
  }

  .support-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .feature-panel {
    padding: 20px;
  }

  .policy-card {
    padding: 22px;
  }
}
