/* =========================================================================
   copipi — styles
   ========================================================================= */

:root {
  --bg:        #06070a;
  --bg-soft:   #0a0c10;
  --surface:   #111317;
  --line:      rgba(255,255,255,0.09);
  --line-2:    rgba(255,255,255,0.14);
  --mint:      #5EE8F0;
  --mint-soft: rgba(94,232,240,0.10);
  --ink:       #ffffff;
  --dim:       rgba(255,255,255,0.62);
  --faint:     rgba(255,255,255,0.40);
  --glow-mint: 0 0 26px rgba(94,232,240,0.55), 0 0 56px rgba(94,232,240,0.28);
  --font-round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font-jp:    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1180px;
  --radius: 28px;
  --glow-white: 0 0 38px rgba(255,255,255,0.22);
}

/* =========================================================================
   SCROLL PROGRESS BAR
   ========================================================================= */
@keyframes scroll-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
body::before {
  content: "";
  position: fixed; top: 0; left: 0; z-index: 101;
  width: 100%; height: 2px;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(94,232,240,0.7);
  transform-origin: left;
  animation: scroll-progress linear both;
  animation-timeline: scroll();
}

/* =========================================================================
   RESET / BASE
   ========================================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* =========================================================================
   NAV
   ========================================================================= */
@keyframes nav-scroll {
  from { border-bottom-color: transparent; background: rgba(6,7,10,0.6); }
  to   { border-bottom-color: var(--line); background: rgba(6,7,10,0.82); }
}
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(6,7,10,0.6);
  border-bottom: 1px solid transparent;
  animation: nav-scroll linear both;
  animation-timeline: scroll();
  animation-range: 0px 80px;
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand .name { font-family: var(--font-round); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; color: var(--ink); }

/* lang toggle */
.lang-toggle {
  background: none; border: 1px solid var(--line-2); border-radius: 999px;
  padding: 5px 12px; cursor: pointer; display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--faint); text-decoration: none;
}
.lang-toggle .lang-opt { transition: color .2s; }
.lang-toggle .lang-opt.active { color: var(--ink); }
.lang-toggle .lang-sep { color: var(--line-2); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { border-top: 1px solid rgba(255,255,255,0.09); padding-block: 24px; text-align: center; }
.footer .wrap { padding: 0 24px; }
.footer .copy { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; color: rgba(255,255,255,0.40); letter-spacing: 0.1em; margin: 0 0 10px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; }
.footer .eula { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: rgba(255,255,255,0.22); letter-spacing: 0.08em; text-decoration: none; transition: color .2s; }
.footer .eula:hover { color: rgba(255,255,255,0.62); }

/* appstore badge */
.appstore-badge { display: inline-block; transition: transform .2s, opacity .2s; }
.appstore-badge:hover { transform: translateY(-2px); opacity: 0.85; }
.appstore-badge img { display: block; height: 44px; width: auto; }

/* =========================================================================
   LAYOUT
   ========================================================================= */
main { max-width: 480px; margin-inline: auto; }
.wrap { width: 100%; padding-inline: 24px; }

/* =========================================================================
   BACKGROUND
   ========================================================================= */
.bg-field {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -8%, rgba(94,232,240,0.12), transparent 60%),
    radial-gradient(900px 600px at 85% 18%, rgba(94,232,240,0.05), transparent 55%),
    linear-gradient(180deg, #06070a 0%, #06070a 100%);
}
.bg-field::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 500px at 10% 80%, rgba(94,232,240,0.05), transparent 60%);
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
.h1 {
  font-family: var(--font-round); font-weight: 900;
  font-size: clamp(36px, 9vw, 48px); line-height: 1.16;
  letter-spacing: -0.01em; margin: 0; text-shadow: var(--glow-white);
}
.mint { color: var(--mint); text-shadow: var(--glow-mint); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding-top: clamp(100px, 12vw, 140px); padding-bottom: clamp(24px, 5vw, 40px); }
.hero-grid {
  display: grid; grid-template-columns: 1fr; align-items: center; text-align: center;
}
.hero-cta {
  display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 40px;
}
.hero-copy .h1 { font-size: clamp(14px, 4vw, 17px); font-weight: 500; line-height: 1.8; }
.icon-lg { width: 80px; height: 80px; border-radius: 20px; box-shadow: 0 12px 40px rgba(94,232,240,0.25); }

/* =========================================================================
   USE CASES
   ========================================================================= */
.use-cases { padding-block: clamp(16px, 5vw, 32px); }
.uc-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.25em; color: var(--mint); text-transform: uppercase;
  margin: 0 0 14px;
}
.uc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.uc-list li {
  font-size: 13px; line-height: 1.6; color: var(--dim);
  padding-left: 1.2em; position: relative;
}
.uc-list li::before { content: "•"; position: absolute; left: 0; color: var(--mint); }

/* =========================================================================
   GALLERY
   ========================================================================= */
.gallery-section {
  width: 100vw; position: relative;
  left: 50%; transform: translateX(-50%);
  padding-block: clamp(32px, 6vw, 60px) clamp(40px, 7vw, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.gallery-slider {
  position: relative;
  width: 100%;
  display: flex; align-items: center;
}
.gallery-track {
  display: flex; gap: 16px;
  padding-inline: max(20px, calc(50% - 140px));
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  contain: layout;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-btn {
  position: absolute; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(30,30,30,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  backdrop-filter: blur(6px);
  flex-shrink: 0;
}
.gallery-btn:hover { background: rgba(60,60,60,0.85); }
.gallery-btn:disabled { opacity: 0; pointer-events: none; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-dots {
  display: flex; justify-content: center; gap: 8px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.dot.active {
  background: #fff;
  transform: scale(1.4);
}
.shot {
  scroll-snap-align: center;
  flex: 0 0 auto; width: min(72vw, 280px);
  aspect-ratio: 1242 / 2688;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  background: #000;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =========================================================================
   CTA BOTTOM
   ========================================================================= */
.cta-bottom {
  display: flex; justify-content: center;

  padding-block-end: clamp(64px, 12vw, 100px);
}

/* =========================================================================
   HOWTO SECTION
   ========================================================================= */
.howto-section { padding-block: clamp(64px, 12vw, 100px); }
.howto-section .wrap { padding-inline: 24px; }
.howto-title {
  font-family: var(--font-round); font-weight: 900;
  font-size: clamp(28px, 6vw, 40px); margin: 0 0 40px; color: var(--mint);
}
.feature-list { display: flex; flex-direction: column; gap: 14px; }
.feature-item {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.feature-index {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--faint); letter-spacing: 0.1em; padding-top: 3px;
  flex-shrink: 0; width: 24px;
  transition: color 0.2s;
}
.feature-index.counting { color: var(--ink); }
.feature-index.done { color: var(--mint); }
.feature-body { flex: 1; }
.feature-name {
  font-family: var(--font-round); font-weight: 700;
  font-size: 17px; color: var(--ink); margin: 0 0 6px;
}
.feature-desc { font-size: 14px; color: var(--dim); margin: 6px 0 0; line-height: 1.7; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--faint); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 6px;
  padding: 2px 8px;
}
.feature-item--featured {
  background: linear-gradient(135deg, rgba(94,232,240,0.08), var(--surface) 60%);
  border-color: rgba(94,232,240,0.35);
}
.feature-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.feature-name-row .feature-name { margin: 0; }
.feature-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bg); background: var(--mint);
  border-radius: 999px; padding: 2px 8px; flex-shrink: 0;
}

/* =========================================================================
   REVEAL ANIMATION
   ========================================================================= */
@keyframes fade-in {
  from { opacity: 0; filter: blur(8px); }
  to   { opacity: 1; filter: blur(0); }
}
@keyframes fade-out {
  from { opacity: 1; filter: blur(0); }
  to   { opacity: 0; filter: blur(12px); }
}
@supports (animation-timeline: view()) {
  .reveal-fade {
    animation: fade-in linear both, fade-out linear both;
    animation-timeline: view(), view();
    animation-range: entry 5% entry 40%, exit 0% exit 80%;
  }
}
@keyframes item-exit {
  from { opacity: 1; transform: translateY(0); filter: blur(0); }
  to   { opacity: 0; transform: translateY(-24px); filter: blur(12px); }
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal-in linear both, item-exit linear both;
    animation-timeline: view(), view();
    animation-range: entry 5% entry 40%, exit 0% exit 80%;
  }
}

@media (min-width: 560px) {
  .gallery-slider { max-width: 380px; margin-inline: auto; }
}

@media (max-width: 360px) {
  .wrap { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { display: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
}
