/* ==========================================================
   filmcam.bkhalid.dev: FilmCam. Always dark (data-theme="dark").
   Loads after base.css.
   ========================================================== */

:root[data-theme="dark"] {
  --bg: #09090a;
  --bg-2: #101012;
  --surface: #121214;
  --surface-2: #19191c;
  --accent: #f2a33a;
  --accent-ink: #160d02;
  --warm: #ff6a2b;
  --glow: rgba(242, 163, 58, .1);
  --nav-bg: rgba(9, 9, 10, .66);
}

/* ---------- film grain over everything ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: .075;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 -.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-3%, 2%); } 33% { transform: translate(2%, -4%); }
  50% { transform: translate(-4%, -1%); } 67% { transform: translate(3%, 3%); } 83% { transform: translate(-1%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 150px 40px; overflow: hidden; isolation: isolate; text-align: center; }
.leak { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.leak i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 18s ease-in-out infinite alternate; }
.leak i:nth-child(1) { width: 46vmax; height: 46vmax; left: -18vmax; top: -16vmax; background: radial-gradient(circle, rgba(255, 106, 43, .55), transparent 65%); }
.leak i:nth-child(2) { width: 40vmax; height: 40vmax; right: -16vmax; top: 10vmax; background: radial-gradient(circle, rgba(242, 163, 58, .4), transparent 65%); animation-delay: -6s; }
.leak i:nth-child(3) { width: 36vmax; height: 36vmax; left: 30%; top: 60%; background: radial-gradient(circle, rgba(200, 40, 60, .28), transparent 65%); animation-delay: -12s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vmax, 4vmax) scale(1.12); } }

.hero__inner { display: grid; justify-items: center; gap: 26px; }
.hero__inner .h-display { max-width: 13ch; }
.hero__inner .lead { margin-inline: auto; }
.warm .w > span { background: linear-gradient(100deg, #ffd8a8, var(--accent) 45%, var(--warm)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.no-split .warm, html:not(.js) .warm { background: linear-gradient(100deg, #ffd8a8, var(--accent) 45%, var(--warm)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

.hero__stage { position: relative; display: grid; justify-items: center; margin-top: clamp(56px, 8vw, 88px); }
.hero__stage .phone { --pw: min(320px, 72vw); transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .9s var(--ease); box-shadow: inset 0 0 0 1.5px #2a2a2e, inset 0 0 0 5px #0d0d0f, inset 0 0 0 6px #3a3a3f, 0 60px 120px -40px rgba(255, 106, 43, .35), 0 40px 80px -30px #000; }
.frame-marks { position: absolute; top: -36px; bottom: 30px; left: 50%; width: min(520px, 94vw); translate: -50% 0; pointer-events: none; }
.frame-marks i { position: absolute; width: 34px; height: 34px; border: 1.5px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.frame-marks i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.frame-marks i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.frame-marks i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.frame-marks i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.js .frame-marks i { opacity: 0; scale: 1.4; }
.loaded .frame-marks i { opacity: 1; scale: 1; transition: opacity .8s var(--ease) 1.1s, scale 1s var(--ease) 1.1s; }
.hud { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.hud i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.6s ease-in-out infinite; }
.hud span { transition: opacity .4s; }
.hud span.swap { opacity: 0; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.stat strong { font-size: clamp(52px, 7vw, 88px); font-weight: 600; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }

/* ---------- looks ---------- */
.looks__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.looks__copy .head { margin-bottom: 36px; }
.picker { display: grid; gap: 8px; max-width: 420px; }
.look {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 16px 10px 10px; border-radius: 20px;
  border: 1px solid transparent; text-align: left; transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.look:hover { background: var(--surface); }
.look i {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--a) 0 25%, var(--b) 0 50%, var(--c) 0 75%, var(--d) 0);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2); transition: box-shadow .4s, rotate .8s var(--ease);
}
.look span { display: grid; gap: 2px; }
.look b { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.look small { font: 400 12px/1.2 var(--mono); color: var(--muted); letter-spacing: .04em; }
.look.is-on { background: var(--surface); border-color: var(--line-2); }
.look.is-on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--warm); }

.looks__view { display: grid; justify-items: center; }
.viewer { position: relative; width: min(360px, 100%); aspect-ratio: 1 / 2; border-radius: 40px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 50px 100px -40px rgba(255, 106, 43, .3), 0 30px 60px -30px #000; }
.viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.025); transition: opacity .7s var(--ease), transform 1.4s var(--ease); }
.viewer img.is-on { opacity: 1; transform: none; }
.viewer__bar { position: absolute; left: 22%; right: 22%; top: 10px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.viewer__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.viewer__bar.run i { animation: fill var(--dur, 3.6s) linear forwards; }
.viewer__bar.off { opacity: 0; transition: opacity .4s; }
@keyframes fill { to { transform: none; } }

/* ---------- collections ---------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col { display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 32px); }
.col:hover { translate: 0 -3px; border-color: var(--line-2); }
.col__n { font-size: 13px; color: var(--accent); }
.col h3 { font-size: 28px; letter-spacing: -.04em; }
.col p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags li { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); transition: border-color .3s, color .3s; }
.col:hover .tags li { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.cols__note { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* ---------- features ---------- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 32px; }
.feat { display: grid; gap: 10px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.feat__ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); margin-bottom: 10px; transition: transform .6s var(--ease); }
.feat:hover .feat__ico { transform: rotate(-8deg) scale(1.06); }
.feat h3 { font-size: 19px; letter-spacing: -.025em; }
.feat p { color: var(--muted); font-size: 15.5px; }

/* ---------- privacy ---------- */
.privacy__panel {
  display: grid; justify-items: center; gap: 24px; text-align: center;
  padding: clamp(36px, 7vw, 96px) clamp(20px, 5vw, 72px); border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(70% 90% at 50% 0%, rgba(242, 163, 58, .1), transparent 70%), var(--bg-2);
}
.privacy__panel .h-section { max-width: 18ch; }
.privacy__panel .lead { margin-inline: auto; }

/* ---------- get ---------- */
.get__inner { display: grid; justify-items: center; gap: 22px; text-align: center; }
.get__icon { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 0 0 1px var(--line), 0 30px 70px -20px rgba(255, 106, 43, .5); margin-bottom: 10px; }
.get .lead { margin-inline: auto; }
.get__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.get__talk { color: var(--muted); font-size: 15px; }
.get__talk a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.get__talk a:hover { text-decoration-color: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .looks__grid { grid-template-columns: 1fr; gap: 28px; }
  .looks__copy { display: contents; }
  .looks__copy .head { order: 1; margin-bottom: 0; }
  .looks__view { order: 2; }
  .picker { order: 3; max-width: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-snap-type: x mandatory; }
  .picker::-webkit-scrollbar { display: none; }
  .look { flex: none; flex-direction: column; gap: 10px; width: auto; min-width: 92px; padding: 12px 8px; text-align: center; scroll-snap-align: start; }
  .look span { justify-items: center; }
  .look b { font-size: 13px; white-space: nowrap; }
  .look small { display: none; }
  .viewer { width: min(320px, 82vw); }
  .cols { grid-template-columns: 1fr; }
  .feats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding-top: 120px; }
  .feats { grid-template-columns: 1fr; gap: 32px; }
  .frame-marks i { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .leak i, .hud i { animation: none; }
  .js .frame-marks i { opacity: 1; scale: 1; }
  .viewer__bar { display: none; }
}
