/* FilmTexture app page */

:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --white: #ffffff;
  --light: #f5f5f7;
  --black: #000000;
  --dark-text: #f5f5f7;
  --dark-text-2: #a1a1a6;
  --hairline: #d2d2d7;
  --gold: #D4A62A;
  --link: #0066cc;
  --focus: #0071e3;
  --radius: 28px;
  --max: 1200px;
  --measure: 680px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 52px;
  --section-y: clamp(72px, 10vw, 152px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html {
  background: var(--white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a { color: inherit; }

h1, h2, h3 { margin: 0; text-wrap: balance; }

p { margin: 0; text-wrap: pretty; }

ul { margin: 0; padding: 0; list-style: none; }

figure { margin: 0; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.nowrap { white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--white);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { top: 10px; }

section[id] { scroll-margin-top: var(--nav-h); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.nav.is-dark { background: rgba(22, 22, 23, 0.94); }

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
  .nav.is-dark { background: rgba(22, 22, 23, 0.72); }
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.4s ease;
}

.nav-links {
  display: none;
  flex: 1;
  justify-content: center;
  gap: clamp(4px, calc(2.6vw - 16px), 20px);
}

.nav-links a {
  padding: 14px 8px;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #000; }

.nav-pill {
  position: relative;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.nav-pill:hover { background: #000; }
.nav-pill::after { content: ""; position: absolute; inset: -8px -6px; }

.nav.is-dark { border-color: rgba(255, 255, 255, 0.1); }
.nav.is-dark .brand { color: var(--dark-text); }
.nav.is-dark .nav-links a { color: rgba(255, 255, 255, 0.8); }
.nav.is-dark .nav-links a:hover { color: #fff; }
.nav.is-dark .nav-pill { background: var(--dark-text); color: #000; }

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-pill { margin-left: 0; }
}

/* ---------- Type ---------- */

.eyebrow {
  margin-bottom: 14px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.eyebrow-gold { color: var(--gold); }

.h1 {
  max-width: 1000px;
  margin-inline: auto;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.h2 {
  max-width: 900px;
  margin-inline: auto;
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.012em;
}

.lead {
  max-width: var(--measure);
  margin: 20px auto 0;
  font-size: clamp(19px, 1.6vw, 21px);
  line-height: 1.42;
  letter-spacing: -0.016em;
  color: var(--text-2);
}

.small {
  max-width: var(--measure);
  margin: 22px auto 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.text-link { color: var(--link); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  margin-top: 32px;
  border-radius: 12px;
}
.badge img { width: 156px; height: 52px; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }

.tone-white { background: var(--white); }
.tone-light { background: var(--light); }
.tone-dark { background: var(--black); color: var(--dark-text); }
.tone-dark .lead { color: var(--dark-text-2); }

.section-head {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 72px);
}

/* ---------- Media tiles ---------- */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #e8e8ed;
  isolation: isolate;
}

.frame-34 { aspect-ratio: 3 / 4; }
.frame-cmp { aspect-ratio: 1200 / 1283; }
.frame-dark { background: #1d1d1f; }

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.layer.is-active { opacity: 1; }

.vtile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1d1d1f;
  aspect-ratio: 720 / 1412;
  isolation: isolate;
  box-shadow: 0 34px 64px -30px rgba(0, 0, 0, 0.42), 0 10px 24px -14px rgba(0, 0, 0, 0.18);
}

.vtile video,
.vtile > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vtoggle {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}
.vtoggle::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(30, 30, 32, 0.6);
  transition: background-color 0.2s ease;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vtoggle::before {
    background: rgba(30, 30, 32, 0.42);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.vtoggle:hover { opacity: 1; }
.vtoggle:hover::before { background: rgba(30, 30, 32, 0.62); }
.vtoggle:focus-visible { opacity: 1; outline: 2px solid #fff; outline-offset: -3px; box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.95); }
.vtoggle svg { width: 14px; height: 14px; fill: currentColor; }
.vtoggle .i-pause { display: none; }
.vtoggle.is-playing .i-play { display: none; }
.vtoggle.is-playing .i-pause { display: inline; }

/* ---------- 1. Hero ---------- */

.hero {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: var(--section-y);
  background: var(--white);
  text-align: center;
  overflow: hidden;
}

.hero .lead { margin-top: 22px; }

.stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 2.2vw, 32px);
  margin-top: clamp(48px, 6vw, 80px);
  padding-inline: var(--gutter);
}

.stage-main { width: min(320px, 80vw); flex: 0 0 auto; }
.stage-side { display: none; }

@media (min-width: 760px) {
  .stage-main { width: clamp(260px, 30vw, 400px); }
  .stage-side {
    display: block;
    flex: 0 0 auto;
    width: clamp(180px, 21vw, 300px);
    margin-top: clamp(64px, 8vw, 112px);
  }
}

/* ---------- 2. Films ---------- */

.viewer .frame {
  width: min(100%, 500px);
  margin-inline: auto;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.chip {
  min-width: 64px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.chip:hover { background: #e8e8ed; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--white); box-shadow: none; }

.viewer-caption,
.panel-caption {
  max-width: var(--measure);
  min-height: 3em;
  margin: 20px auto 0;
  text-align: center;
  font-size: 17px;
  line-height: 1.47;
  color: var(--text-2);
}

.cap-name { font-weight: 600; color: var(--text); }

/* ---------- 3. Compare ---------- */

.compare { width: min(100%, 500px); margin-inline: auto; }

.compare-stage {
  --pos: 50%;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.compare-base,
.compare-top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-top { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.compare-label {
  position: absolute;
  top: 16px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.compare-label-with { left: 16px; }
.compare-label-without { right: 16px; }
.compare-stage.hide-with .compare-label-with,
.compare-stage.hide-without .compare-label-without { opacity: 0; }

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 3;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  color: var(--text);
}
.compare-knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.compare-stage:has(.compare-range:focus-visible) .compare-knob {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- 4. Moments ---------- */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}

.bento-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(32px, 3.4vw, 48px) clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  text-align: center;
}

.bento-copy h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
}

.bento-copy p {
  max-width: 36ch;
  margin: 10px auto 0;
  font-size: 17px;
  color: var(--text-2);
}

.bento-media {
  width: min(76%, 320px);
  margin-top: clamp(28px, 3vw, 40px);
  margin-bottom: 8px;
  border-radius: 22px;
}

/* ---------- 5. Color panel ---------- */

.panel { width: min(100%, 500px); margin-inline: auto; }

.segments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.segment:hover { background: rgba(255, 255, 255, 0.18); }
.segment[aria-selected="true"] { background: var(--dark-text); color: #000; }

@media (min-width: 600px) {
  .segments {
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
  }
  .segment { background: transparent; padding: 0 20px; }
  .segment:hover { background: rgba(255, 255, 255, 0.08); }
}

.tone-dark .panel-caption { color: var(--dark-text-2); }
.tone-dark .cap-name { color: var(--dark-text); }
.tone-dark :focus-visible { outline-color: var(--dark-text); }

.editor-intro {
  margin-top: clamp(96px, 12vw, 168px);
  margin-bottom: clamp(40px, 5vw, 64px);
  text-align: center;
}

.statement {
  max-width: var(--measure);
  margin-inline: auto;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.014em;
  color: var(--dark-text-2);
}
.statement strong { font-weight: 600; color: var(--dark-text); }

.cards-3 {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.cards-3::-webkit-scrollbar { display: none; }

.cards-3 li {
  flex: 0 0 auto;
  width: min(78vw, 340px);
  scroll-snap-align: start;
}


@media (min-width: 760px) {
  .cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .cards-3 li { width: auto; }
}

.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  color: var(--dark-text);
  text-align: center;
  isolation: isolate;
}
.tcard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.tcard-light::after { display: none; }
.tcard img { width: 100%; }
.tcard figcaption {
  padding: 2px clamp(20px, 2vw, 28px) clamp(26px, 2.6vw, 34px);
}
.tcard h3 {
  font-size: clamp(19px, 1.6vw, 21px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.tcard p {
  max-width: 30ch;
  margin: 6px auto 0;
  font-size: 15px;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--dark-text-2);
}

/* ---------- 6. Camera gallery ---------- */

.gallery { --edge: max(var(--gutter), calc((100% - var(--max)) / 2)); }

.gallery-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--edge) 8px;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline-offset: -2px; border-radius: 8px; }

.gallery-card {
  flex: 0 0 auto;
  width: clamp(260px, 30vw, 400px);
  scroll-snap-align: start;
}


.gallery-controls {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e8e8ed;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.round-btn:hover { background: #dcdce1; }
.round-btn[aria-disabled="true"] { opacity: 0.38; cursor: default; }
.round-btn[aria-disabled="true"]:hover { background: #e8e8ed; }
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (hover: none) and (pointer: coarse) {
  .gallery-controls { display: none; }
}

/* ---------- 7. Ready ---------- */

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 24px);
  max-width: 820px;
  margin-inline: auto;
}

@media (max-width: 599px) {
  .pair .vtile { border-radius: 20px; }
  .pair .vtoggle { right: 2px; bottom: 2px; }
  .pair .vtoggle::before { inset: 7px; }
}

/* ---------- 8. Plans ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.plan {
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--light);
}

.plan h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.012em;
}

.plan p {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-2);
}

.plans-foot {
  margin-top: clamp(32px, 4vw, 48px);
  text-align: center;
}

.footnote {
  font-size: 14px;
  color: var(--text-2);
}

.plans-foot .badge { margin-top: 24px; }

/* ---------- 9. Support ---------- */

.support .section-head { margin-bottom: 0; }

/* ---------- 10. Footer ---------- */

.footer {
  background: var(--light);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.01em;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.footer-inner::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 8px;
  background: var(--hairline);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links li + li::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin: 0 4px;
  vertical-align: -0.1em;
  background: var(--hairline);
}

.footer-links a {
  color: #424245;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 5px; }
.footer-links li:first-child a { padding-left: 0; }

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .footer-inner::before { flex: 0 0 100%; }
}

/* ---------- Reveal ---------- */

.reveal-pending {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal-pending.is-in { opacity: 1; transform: none; }

/* cards in a sideways row are already in place when swiped to */
@media (max-width: 759px) {
  .cards-3 li.reveal-pending { opacity: 1; transform: none; transition: none; }
}

.bento-tile.reveal-pending:nth-child(2n),
.cards-3 li.reveal-pending:nth-child(2),
.plan.reveal-pending:nth-child(2) { transition-delay: 0.08s; }
.cards-3 li.reveal-pending:nth-child(3),
.plan.reveal-pending:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .layer, .chip, .segment, .compare-label, .nav, .brand, .nav-pill, .vtoggle, .vtoggle::before { transition: none; }
  .reveal-pending { opacity: 1; transform: none; transition: none; }
}
