/* ============ Tokens ============ */
:root{
  --bg-0:#050810;
  --bg-1:#070c18;
  --bg-2:#0b1424;
  --ice:#00D9FF;
  --mint:#00E676;
  --ice-soft:rgba(0,217,255,.35);
  --mint-soft:rgba(0,230,118,.30);
  --text-0:#eaf6ff;
  --text-1:#9fb3c8;
  --text-2:#6b7d91;
  --border:rgba(0,217,255,.18);
  --card-bg:rgba(14,22,38,.55);
  --font-body:'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:'Space Grotesk', 'Manrope', sans-serif;
  --radius:18px;
  --touch:44px;
  color-scheme:dark;
}

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

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0,217,255,.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(0,230,118,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 100%);
  background-attachment:fixed;
  color:var(--text-1);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

h1,h2,h3{
  font-family:var(--font-head);
  color:var(--text-0);
  margin:0;
}

a{ color:inherit; text-decoration:none; }

.accent{ color:var(--ice); }

.glow-text{
  text-shadow:
    0 0 8px var(--ice-soft),
    0 0 24px var(--ice-soft),
    0 0 48px rgba(0,217,255,.2);
}

/* ============ Frost canvas (cursor / scroll trail) ============ */
#frost-canvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  pointer-events:none;
  opacity:.9;
}

/* ============ Nav ============ */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  background:rgba(5,8,16,.55);
  border-bottom:1px solid var(--border);
}
.nav__inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.nav__logo{
  display:flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-head);
  font-weight:700;
  font-size:1.15rem;
  color:var(--text-0);
}
.snowflake-icon{
  color:var(--ice);
  text-shadow:0 0 10px var(--ice-soft);
  animation:spin-slow 12s linear infinite;
  display:inline-block;
}
.nav__link{
  font-size:.92rem;
  font-weight:600;
  color:var(--text-1);
  padding:10px 14px;
  min-height:var(--touch);
  display:flex;
  align-items:center;
  border-radius:10px;
  transition:color .25s ease, background .25s ease;
}
.nav__link:hover{ color:var(--ice); background:rgba(0,217,255,.08); }

.nav__right{
  display:flex;
  align-items:center;
  gap:6px;
}

/* ============ Language switcher ============ */
.lang-switch{
  position:relative;
}

.lang-switch__trigger{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  display:flex;
  align-items:center;
  gap:6px;
  min-height:var(--touch);
  min-width:var(--touch);
  padding:8px 12px;
  background:rgba(0,217,255,.06);
  border:1px solid var(--border);
  border-radius:10px;
  color:var(--text-1);
  font-family:var(--font-body);
  font-size:.85rem;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:color .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.lang-switch__trigger:hover,
.lang-switch__trigger[aria-expanded="true"]{
  color:var(--ice);
  border-color:var(--ice);
  background:rgba(0,217,255,.10);
  box-shadow:0 0 14px var(--ice-soft);
}
.lang-switch__trigger:focus-visible{
  outline:2px solid var(--ice);
  outline-offset:2px;
}
.lang-switch__icon{ font-size:1rem; line-height:1; }
.lang-switch__current{ letter-spacing:.02em; }
.lang-switch__caret{
  font-size:.7rem;
  opacity:.7;
  transition:transform .25s ease;
}
.lang-switch__trigger[aria-expanded="true"] .lang-switch__caret{ transform:rotate(180deg); }

/* Dropdown panel: custom div/ul, no native <select> anywhere */
.lang-switch__menu{
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  left:auto;
  width:max-content;
  min-width:210px;
  max-width:min(78vw, 260px);
  max-height:min(60vh, 420px);
  overflow-y:auto;
  overflow-x:hidden;
  list-style:none;
  margin:0;
  padding:6px;
  background:rgba(6,10,20,.96);
  border:1px solid var(--border);
  border-radius:14px;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:0 16px 46px rgba(0,0,0,.55), 0 0 24px var(--ice-soft);
  z-index:60;

  transform-origin:top right;
  opacity:0;
  visibility:hidden;
  transform:translateY(-8px) scale(.97);
  transition:opacity .18s ease, transform .18s ease, visibility 0s linear .18s;

  /* dark, neon-tinted scrollbar (Firefox) */
  scrollbar-width:thin;
  scrollbar-color:var(--ice-soft) transparent;
}
.lang-switch__menu.is-open{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
  transition:opacity .2s ease, transform .2s ease;
}
/* small pointer connecting the menu to the trigger */
.lang-switch__menu::before{
  content:"";
  position:absolute;
  top:-6px;
  right:18px;
  width:11px;
  height:11px;
  background:rgba(6,10,20,.96);
  border-left:1px solid var(--border);
  border-top:1px solid var(--border);
  transform:rotate(45deg);
}
/* dark, neon-tinted scrollbar (WebKit) */
.lang-switch__menu::-webkit-scrollbar{ width:8px; }
.lang-switch__menu::-webkit-scrollbar-track{ background:transparent; }
.lang-switch__menu::-webkit-scrollbar-thumb{
  background-color:rgba(0,217,255,.35);
  border-radius:8px;
}

.lang-switch__option{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:var(--touch);
  padding:9px 10px;
  background:transparent;
  border:none;
  border-radius:9px;
  color:var(--text-1);
  font-family:var(--font-body);
  font-size:.92rem;
  text-align:left;
  cursor:pointer;
  transition:color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.lang-switch__option:hover,
.lang-switch__option:focus-visible{
  color:var(--text-0);
  background:rgba(0,217,255,.12);
  box-shadow:0 0 14px rgba(0,217,255,.18) inset;
  transform:translateX(2px);
  outline:none;
}
.lang-switch__option.is-active{
  color:var(--ice);
  background:rgba(0,217,255,.14);
  box-shadow:0 0 16px rgba(0,217,255,.22) inset;
}
.lang-switch__option-flag{
  font-size:1.3rem;
  line-height:1;
  width:1.6em;
  flex:0 0 auto;
  text-align:center;
}
.lang-switch__option-name{
  color:inherit;
  opacity:.9;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:640px){
  .lang-switch__current{ display:none; }
  .lang-switch__trigger{ padding:8px 10px; gap:4px; }
  .lang-switch__menu{
    right:-4px;
    min-width:0;
    width:64vw;
    max-width:250px;
  }
  .lang-switch__menu::before{ right:14px; }
}

@media (max-width:360px){
  .lang-switch__menu{ width:56vw; }
}

/* ============ Layout helpers ============ */
main{ position:relative; z-index:2; }

section{
  position:relative;
  padding:88px 20px;
  max-width:1200px;
  margin:0 auto;
}

.section-head{ text-align:center; margin-bottom:56px; }
.section-title{
  font-size:clamp(1.7rem, 5vw, 2.6rem);
  font-weight:700;
  letter-spacing:-.01em;
}
.section-subtitle{
  margin-top:12px;
  font-size:1.02rem;
  color:var(--text-2);
}

/* frost edge effect for sections */
section::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height:120px;
  background:linear-gradient(180deg, rgba(0,217,255,.06), transparent);
  pointer-events:none;
  filter:blur(6px);
}

/* ============ Hero ============ */
.hero{
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding-top:64px;
  overflow:hidden;
}

.hero__bg-flakes{
  position:absolute;
  inset:0;
  z-index:-1;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(0,217,255,.10) 0, transparent 3%),
    radial-gradient(circle at 82% 15%, rgba(0,230,118,.10) 0, transparent 3%),
    radial-gradient(circle at 25% 78%, rgba(0,217,255,.08) 0, transparent 3%),
    radial-gradient(circle at 70% 65%, rgba(0,230,118,.08) 0, transparent 3%),
    radial-gradient(circle at 92% 85%, rgba(0,217,255,.09) 0, transparent 3%);
}

.hero__badge{
  display:inline-block;
  padding:8px 18px;
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.02em;
  color:var(--ice);
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(0,217,255,.06);
  margin-bottom:26px;
}

.hero__title{
  font-size:clamp(3rem, 13vw, 6.5rem);
  font-weight:700;
  letter-spacing:-.03em;
  line-height:1;
}

.hero__subtitle{
  max-width:560px;
  margin:24px auto 0;
  font-size:clamp(1rem, 2.4vw, 1.15rem);
  color:var(--text-1);
}
.hero__subtitle strong{ color:var(--mint); font-weight:700; }

.hero__cta{
  margin-top:38px;
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  justify-content:center;
}

.hero__note{
  margin-top:22px;
  font-size:.82rem;
  color:var(--text-2);
}

.hero__scroll-hint{
  position:absolute;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  width:26px;
  height:42px;
  border:2px solid var(--border);
  border-radius:14px;
}
.hero__scroll-hint span{
  position:absolute;
  top:6px; left:50%;
  width:4px; height:8px;
  background:var(--ice);
  border-radius:2px;
  transform:translateX(-50%);
  box-shadow:0 0 8px var(--ice-soft);
  animation:scroll-hint 1.8s ease-in-out infinite;
}

/* ============ Buttons ============ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:var(--touch);
  padding:12px 26px;
  font-family:var(--font-body);
  font-size:.98rem;
  font-weight:700;
  border-radius:12px;
  border:1.5px solid var(--ice);
  cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
  color:var(--text-0);
  background:rgba(0,217,255,.06);
}

.btn--primary{
  color:#04121a;
  background:linear-gradient(135deg, var(--ice), var(--mint));
  border-color:transparent;
  box-shadow:0 0 18px var(--ice-soft), 0 0 40px rgba(0,230,118,.15);
}
.btn--primary[disabled]{
  cursor:not-allowed;
  opacity:.92;
}
.btn--primary:not([disabled]):hover{
  transform:translateY(-2px);
  box-shadow:0 0 26px var(--ice-soft), 0 0 60px rgba(0,230,118,.25);
}

.btn--pulse{ animation:pulse-glow 2.6s ease-in-out infinite; }

.btn--ghost{
  background:transparent;
  border-color:var(--border);
  color:var(--text-1);
}
.btn--ghost:hover{
  color:var(--ice);
  border-color:var(--ice);
  box-shadow:0 0 16px var(--ice-soft);
  transform:translateY(-2px);
}

/* ============ Feature cards ============ */
.features__grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
}

.card{
  position:relative;
  padding:30px 26px;
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  overflow:hidden;
  transition:transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.card::after{
  content:"";
  position:absolute;
  top:0; left:-60%;
  width:40%; height:100%;
  background:linear-gradient(115deg, transparent, rgba(255,255,255,.10), transparent);
  transform:skewX(-18deg);
  transition:left .7s ease;
  pointer-events:none;
}

.card:hover{
  transform:translateY(-8px);
  border-color:var(--ice);
  box-shadow:0 12px 40px rgba(0,217,255,.15), 0 0 0 1px rgba(0,217,255,.15) inset;
}
.card:hover::after{ left:120%; }

.card__icon-wrap{
  width:56px; height:56px;
  display:flex; align-items:center; justify-content:center;
  border-radius:14px;
  background:rgba(0,217,255,.08);
  border:1px solid var(--border);
  margin-bottom:18px;
}
.card__icon{
  font-size:1.6rem;
  filter:drop-shadow(0 0 6px var(--ice-soft));
}
.card__title{
  font-size:1.15rem;
  font-weight:700;
  margin-bottom:10px;
}
.card__text{
  font-size:.92rem;
  color:var(--text-2);
}

/* ============ Screenshots gallery ============ */
.screenshots__track{
  display:flex;
  gap:22px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding:8px 4px 20px;
  margin:0 -4px;
}
.screenshots__track::-webkit-scrollbar{ height:8px; }
.screenshots__track::-webkit-scrollbar-track{ background:transparent; }
.screenshots__track::-webkit-scrollbar-thumb{
  background-color:rgba(0,217,255,.35);
  border-radius:8px;
}

.phone-card{
  flex:0 0 auto;
  width:200px;
  scroll-snap-align:start;
  margin:0;
  text-align:center;
}

.phone-frame{
  position:relative;
  padding:10px 10px 16px;
  border-radius:32px;
  background:linear-gradient(160deg, #101a2c, #070b14);
  border:1px solid var(--border);
  box-shadow:0 14px 34px rgba(0,0,0,.5);
  transition:transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.phone-frame::before{
  content:"";
  position:absolute;
  top:5px;
  left:50%;
  transform:translateX(-50%);
  width:36%;
  height:12px;
  background:#070b14;
  border-radius:0 0 10px 10px;
  z-index:2;
}
.phone-frame img{
  display:block;
  width:100%;
  height:auto;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.06);
}

.phone-card:hover .phone-frame{
  transform:translateY(-6px);
  border-color:var(--ice);
  box-shadow:0 18px 46px rgba(0,0,0,.55), 0 0 26px var(--ice-soft);
}

.phone-card__caption{
  margin-top:14px;
  font-size:.88rem;
  font-weight:600;
  color:var(--text-1);
  transition:color .3s ease;
}
.phone-card:hover .phone-card__caption{ color:var(--ice); }

@media (min-width:860px){
  .screenshots__track{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
    overflow-x:visible;
    gap:28px;
    padding:8px 0 0;
    margin:0;
  }
  .phone-card{ width:auto; }
}

@media (max-width:640px){
  .phone-card{ width:172px; }
  .screenshots__track{ gap:16px; }
}

/* ============ Roadmap timeline ============ */
.timeline{
  position:relative;
  max-width:720px;
  margin:0 auto;
  padding-left:34px;
}
.timeline::before{
  content:"";
  position:absolute;
  left:9px; top:6px; bottom:6px;
  width:2px;
  background:linear-gradient(180deg, var(--ice), var(--mint), transparent);
  opacity:.35;
}
.timeline::after{
  content:"";
  position:absolute;
  left:9px; top:6px;
  width:2px;
  height:var(--line-progress, 0%);
  background:linear-gradient(180deg, var(--ice), var(--mint));
  box-shadow:0 0 10px var(--ice-soft);
  transition:height .4s ease;
}

.timeline__item{
  position:relative;
  margin-bottom:44px;
}
.timeline__item:last-child{ margin-bottom:0; }

.timeline__dot{
  position:absolute;
  left:-34px;
  top:6px;
  width:20px; height:20px;
  border-radius:50%;
  background:var(--bg-1);
  border:2px solid var(--border);
  transition:border-color .4s ease, box-shadow .4s ease, background .4s ease;
}
.timeline__dot--active,
.timeline__item.in-view .timeline__dot{
  border-color:var(--ice);
  background:radial-gradient(circle, var(--ice), var(--mint));
  box-shadow:0 0 14px var(--ice-soft), 0 0 28px rgba(0,230,118,.25);
}

.timeline__card{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px 24px;
  transition:border-color .4s ease, box-shadow .4s ease;
}
.timeline__item.in-view .timeline__card{
  border-color:var(--ice-soft);
  box-shadow:0 8px 30px rgba(0,217,255,.10);
}

.timeline__stage{
  display:inline-block;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--mint);
  margin-bottom:8px;
}
.timeline__title{
  font-size:1.3rem;
  margin-bottom:8px;
}
.timeline__text{
  font-size:.92rem;
  color:var(--text-2);
}

/* ============ Footer ============ */
.footer{
  position:relative;
  z-index:2;
  border-top:1px solid var(--border);
  padding:40px 20px 50px;
  text-align:center;
}
.footer__inner{ max-width:1200px; margin:0 auto; }
.footer__logo{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-head);
  font-weight:700;
  font-size:1.05rem;
  color:var(--text-0);
  margin-bottom:14px;
}
.footer__contact{
  font-size:.88rem;
  color:var(--text-2);
  margin:0 0 6px;
}
.footer__copy{
  font-size:.78rem;
  color:var(--text-2);
  opacity:.7;
  margin:0;
}

/* ============ Scroll reveal ============ */
.reveal{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .7s ease, transform .7s ease;
}
.reveal.in-view{
  opacity:1;
  transform:translateY(0);
}

/* staggered delays for cards within a grid/timeline */
.features__grid .card:nth-child(1){ transition-delay:0s; }
.features__grid .card:nth-child(2){ transition-delay:.08s; }
.features__grid .card:nth-child(3){ transition-delay:.16s; }
.features__grid .card:nth-child(4){ transition-delay:.24s; }
.features__grid .card:nth-child(5){ transition-delay:.32s; }
.features__grid .card:nth-child(6){ transition-delay:.4s; }

.phone-card:nth-child(1){ transition-delay:0s; }
.phone-card:nth-child(2){ transition-delay:.06s; }
.phone-card:nth-child(3){ transition-delay:.12s; }
.phone-card:nth-child(4){ transition-delay:.18s; }
.phone-card:nth-child(5){ transition-delay:.24s; }
.phone-card:nth-child(6){ transition-delay:.3s; }
.phone-card:nth-child(7){ transition-delay:.36s; }

.timeline__item:nth-child(1){ transition-delay:0s; }
.timeline__item:nth-child(2){ transition-delay:.12s; }
.timeline__item:nth-child(3){ transition-delay:.24s; }
.timeline__item:nth-child(4){ transition-delay:.36s; }

/* ============ Keyframes ============ */
@keyframes spin-slow{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

@keyframes pulse-glow{
  0%,100%{ box-shadow:0 0 18px var(--ice-soft), 0 0 40px rgba(0,230,118,.15); }
  50%{ box-shadow:0 0 30px var(--ice-soft), 0 0 60px rgba(0,230,118,.3); }
}

@keyframes scroll-hint{
  0%{ opacity:0; transform:translate(-50%, 0); }
  30%{ opacity:1; }
  100%{ opacity:0; transform:translate(-50%, 16px); }
}

/* ============ Responsive ============ */
@media (max-width:900px){
  .features__grid{ grid-template-columns:repeat(2, 1fr); }
}

@media (max-width:640px){
  section{ padding:64px 18px; }
  .features__grid{ grid-template-columns:1fr; gap:18px; }
  .hero__cta{ flex-direction:column; width:100%; }
  .hero__cta .btn{ width:100%; }
  .timeline{ padding-left:30px; }
  .timeline__dot{ left:-30px; width:16px; height:16px; }
}

/* Reduce motion for users who prefer it, and for perf on small screens */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .snowflake-icon, .btn--pulse, .hero__scroll-hint span{ animation:none; }
  .reveal{ transition:opacity .3s ease; transform:none; }
}

@media (max-width:640px){
  #frost-canvas{ opacity:.5; }
}
