:root {
  --bg: #0e0a08;
  --surface: rgb(255 255 255 / 0.06);
  --line: rgb(255 255 255 / 0.12);
  --text: #f6efe8;
  --muted: rgb(246 239 232 / 0.66);
  --accent: #e06a3c;
  --accent-2: #f59a5b;
  --display: "Fraunces", "Noto Sans Georgian", Georgia, serif;
  --body: "Inter", "Noto Sans Georgian", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
html[lang="ka"] h1, html[lang="ka"] h2 { letter-spacing: 0; }

/* soft colour glows drifting behind everything */
.glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 26s ease-in-out infinite alternate; }
.glow i:nth-child(1) { width: 60vmax; height: 60vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, hsl(22 85% 50%), transparent 65%); }
.glow i:nth-child(2) { width: 55vmax; height: 55vmax; right: -22vmax; top: 30vh; background: radial-gradient(circle, hsl(285 55% 38%), transparent 65%); animation-duration: 32s; }
.glow i:nth-child(3) { width: 45vmax; height: 45vmax; left: 20vw; bottom: -25vmax; background: radial-gradient(circle, hsl(345 70% 42%), transparent 65%); opacity: 0.32; animation-duration: 38s; }
@keyframes drift { to { transform: translate(5vw, 6vh) scale(1.1); } }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem clamp(1rem, 4vw, 3rem); padding-top: max(0.9rem, env(safe-area-inset-top)); background: rgb(14 10 8 / 0.62); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--line); }
.lockup { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.lockup img { width: 2.3rem; height: 2.3rem; border-radius: 0.6rem; box-shadow: 0 8px 22px -10px rgb(224 106 60 / 0.8); }
.word { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.8rem; letter-spacing: -0.04em; line-height: 1; }
.word span { color: var(--accent); }
.lockup.small img { width: 1.9rem; height: 1.9rem; }
.lockup.small .word { font-size: 1.45rem; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.lang { padding: 0.45rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 0.8rem var(--body); cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.95rem 1.5rem; border-radius: 16px; border: 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; font-weight: 800; font-size: 1rem; text-decoration: none; box-shadow: 0 18px 40px -16px rgb(224 106 60 / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.3); transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -16px rgb(224 106 60 / 1), inset 0 1px 0 rgb(255 255 255 / 0.3); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; background: rgb(255 255 255 / 0.1); }
.btn-small { padding: 0.55rem 1rem; border-radius: 12px; font-size: 0.88rem; box-shadow: none; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; max-width: 1240px; margin: 0 auto; padding: clamp(2rem, 6vh, 5rem) clamp(1rem, 4vw, 3rem) 3rem; min-height: calc(100svh - 4.5rem); }
.kicker { margin: 0 0 1rem; color: var(--accent-2); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
html[lang="ka"] .kicker { letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.lead { max-width: 34rem; margin: 1.3rem 0 2rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-cta.center { justify-content: center; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 2rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.hero-points li::before { content: "✓ "; color: var(--accent-2); font-weight: 900; }
.hero-3d { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback { position: absolute; inset: 22%; width: 56%; opacity: 0; border-radius: 22%; box-shadow: 0 40px 80px -30px rgb(224 106 60 / 0.8); transition: opacity 0.4s; }
.no-webgl .hero-fallback { opacity: 1; }
.float-card { position: absolute; display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; border-radius: 16px; background: rgb(28 22 19 / 0.72); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 40px -20px #000; font-weight: 700; font-size: 0.88rem; white-space: nowrap; animation: bob 6s ease-in-out infinite; }
.float-card b { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: rgb(255 255 255 / 0.1); }
.fc-1 { left: 0; top: 14%; }
.fc-2 { right: -2%; top: 44%; animation-delay: -2s; }
.fc-3 { left: 8%; bottom: 10%; animation-delay: -4s; }
.fc-3 b { background: rgb(116 207 147 / 0.25); color: #74cf93; }
@keyframes bob { 50% { transform: translateY(-12px); } }

/* sections */
.section { max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 9vh, 6.5rem) clamp(1rem, 4vw, 3rem); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 3rem; }
.section h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 0; padding: 0; list-style: none; }
.step, .card { padding: 1.8rem; border-radius: 24px; background: linear-gradient(160deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08); }
.step-n { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.1rem; border-radius: 14px; background: linear-gradient(150deg, var(--accent-2), var(--accent)); font: 800 1.3rem var(--display); box-shadow: 0 12px 26px -12px rgb(224 106 60 / 0.9); }
.step h3, .card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.step p, .card p { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 3rem; }
.split.reverse .split-text { order: 2; }
.ticks { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.85rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--muted); font-size: 1.05rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff 0 22%, transparent 24%), linear-gradient(150deg, var(--accent-2), var(--accent)); }

/* 3D phones */
.phones { position: relative; height: clamp(460px, 62vw, 640px); perspective: 1600px; }
.phone { position: absolute; margin: 0; width: clamp(190px, 24vw, 280px); aspect-ratio: 390 / 844; border-radius: 40px; border: 9px solid #1d1714; background: #000; overflow: hidden; box-shadow: 0 50px 90px -35px #000, 0 0 0 1px rgb(255 255 255 / 0.12), inset 0 0 0 1px rgb(255 255 255 / 0.06); transform-style: preserve-3d; transition: transform 0.6s var(--ease); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phones .phone { left: 50%; top: 50%; transform: translate(-30%, -50%) rotateY(-20deg) rotateX(6deg) rotateZ(1deg); z-index: 2; }
.phones .phone-back { transform: translate(-105%, -46%) rotateY(-20deg) rotateX(6deg) translateZ(-140px); z-index: 1; filter: brightness(0.82); }
.phones.three .phone { transform: translate(-50%, -50%) rotateY(-18deg) rotateX(6deg); }
.phones.three .phone-back { transform: translate(-125%, -44%) rotateY(-18deg) rotateX(6deg) translateZ(-160px); }
.phones.three .phone-third { transform: translate(25%, -46%) rotateY(-18deg) rotateX(6deg) translateZ(-160px); filter: brightness(0.82); z-index: 1; }

/* 3D screens */
.screens { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.6rem; perspective: 1800px; }
.screen { margin: 0; border-radius: 18px; overflow: hidden; background: #1a1411; border: 1px solid var(--line); box-shadow: 0 50px 90px -40px #000; transform: rotateY(10deg) rotateX(4deg); transition: transform 0.6s var(--ease); }
.screen-2 { transform: rotateY(-10deg) rotateX(4deg); margin-top: 3rem; }
.screen-bar { display: flex; gap: 6px; padding: 10px 12px; background: rgb(255 255 255 / 0.05); }
.screen-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.2); }
.screen-bar i:first-child { background: #ff6b5b; }
.screen-bar i:nth-child(2) { background: #f5c04a; }
.screen-bar i:nth-child(3) { background: #74cf93; }
.screen figcaption { padding: 0.9rem 1.1rem 1.1rem; color: var(--muted); font-size: 0.92rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card b { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: 14px; background: rgb(255 255 255 / 0.08); font-size: 1.4rem; }

.cta { max-width: 860px; margin: 2rem auto 5rem; padding: clamp(2.4rem, 6vw, 4rem) clamp(1.2rem, 4vw, 3rem); text-align: center; border-radius: 32px; background: radial-gradient(120% 120% at 50% 0%, rgb(224 106 60 / 0.35), transparent 60%), linear-gradient(160deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02)); border: 1px solid var(--line); }
.cta-icon { width: 4.5rem; margin: 0 auto 1.4rem; border-radius: 1.1rem; box-shadow: 0 20px 44px -16px rgb(224 106 60 / 0.9); }
.cta h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.cta p { max-width: 36rem; margin: 1rem auto 2rem; color: var(--muted); }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; max-width: 1240px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) calc(2rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 1.4rem; }
.footer a { color: var(--muted); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: center; padding-top: 2rem; }
  .hero-text { order: 2; }
  .hero-3d { order: 1; max-width: 420px; }
  .lead { margin-inline: auto; }
  .hero-cta, .hero-points { justify-content: center; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 1rem; }
  .split.reverse .split-text { order: 0; }
  .steps, .grid { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr; }
  .screen, .screen-2 { transform: none; margin-top: 0; }
  .phones { height: 520px; }
}
@media (max-width: 520px) {
  .fc-2 { right: 0; }
  .float-card { font-size: 0.76rem; padding: 0.55rem 0.8rem; }
  .phones { height: 470px; }
  .phone { width: 200px; border-radius: 32px; border-width: 7px; }
  .footer { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .glow i, .float-card { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
/* Georgian words are longer: a slightly smaller headline keeps it to two or three lines */
html[lang="ka"] .hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
html[lang="ka"] .section h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
/* waiter section: three phones kept clear of the text column */
.split-text { position: relative; z-index: 3; }
.phones.three .phone { transform: translate(-66%, -50%) rotateY(-18deg) rotateX(6deg); }
.phones.three .phone-back { transform: translate(-128%, -44%) rotateY(-18deg) rotateX(6deg) translateZ(-160px) scale(0.92); }
.phones.three .phone-third { transform: translate(-12%, -46%) rotateY(-18deg) rotateX(6deg) translateZ(-160px) scale(0.92); }
@media (max-width: 960px) {
  .phones.three .phone { transform: translate(-50%, -50%) rotateY(-14deg) rotateX(5deg); }
  .phones.three .phone-back { transform: translate(-115%, -45%) rotateY(-14deg) rotateX(5deg) translateZ(-160px) scale(0.9); }
  .phones.three .phone-third { transform: translate(15%, -45%) rotateY(-14deg) rotateX(5deg) translateZ(-160px) scale(0.9); }
}
/* Phones switch on tap; the group tilts as one (perspective comes from the section) */
.split { perspective: 1600px; }
.phones, .screens { transform-style: preserve-3d; transition: transform 0.4s var(--ease); }
.phone { cursor: pointer; transition: transform 0.7s var(--ease), filter 0.7s var(--ease); }
.phone:not(.phone-back):not(.phone-third) { filter: none; z-index: 2; }
.phone:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 4px; }
.phones .phone-back, .phones .phone-third { z-index: 1; }
/* The back phones sit behind the group's plane in 3D: let taps pass through the group to them */
.phones { pointer-events: none; }
.phones .phone { pointer-events: auto; }
/* Small screens: three phones fanned out so the side ones show enough to tap */
@media (max-width: 520px) {
  .phones.three .phone { transform: translate(-50%, -50%) rotateY(-10deg) rotateX(4deg); width: 180px; }
  .phones.three .phone-back { transform: translate(-112%, -47%) rotateY(-10deg) rotateX(4deg) scale(0.86); }
  .phones.three .phone-third { transform: translate(12%, -47%) rotateY(-10deg) rotateX(4deg) scale(0.86); }
}
/* Images: a soft shimmer in the right shape while loading, then a fade-in; no alt text flashing */
.phone img, .screen img { color: transparent; background: linear-gradient(110deg, #1d1714 30%, #2a211c 50%, #1d1714 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; opacity: 0; transition: opacity 0.5s var(--ease); }
.phone img.loaded, .screen img.loaded { opacity: 1; animation: none; background: none; }
.screen img { width: 100%; height: auto; aspect-ratio: 1400 / 875; }
@keyframes shimmer { to { background-position: -300% 0; } }
/* Kitchen section: the same board on a phone, leaning out of the kitchen screen's corner */
.screen-wrap { position: relative; transform-style: preserve-3d; }
.screens .kitchen-phone { position: absolute; top: 1.2rem; right: -2.2rem; width: clamp(120px, 12vw, 160px); border-radius: 26px; border-width: 6px; z-index: 3; cursor: default; transform: rotateY(-14deg) rotateX(4deg) translateZ(60px); }
@media (max-width: 960px) {
  .screens .kitchen-phone { top: -1.6rem; right: 0.4rem; width: 112px; border-radius: 22px; border-width: 5px; transform: rotateZ(3deg); }
}
/* Live demo: the real guest menu and waiter app in two phone frames, plus a QR to try it on your own phone */
.demo .section-head { text-align: center; }
.demo-lead { color: var(--muted); max-width: 40rem; margin: 0.8rem auto 0; }
.demo-tabs { display: none; }
.demo-stage { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2.4rem; }
.demo-phone { margin: 0; display: grid; justify-items: center; gap: 0.8rem; }
.demo-phone figcaption { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.demo-frame { position: relative; width: 360px; height: 740px; border-radius: 46px; border: 10px solid #1d1714; background: #111; overflow: hidden; box-shadow: 0 60px 100px -40px #000, 0 0 0 1px rgb(255 255 255 / 0.12), 0 0 80px -20px rgb(224 106 60 / 0.35); }
.demo-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #111; }
.demo-badge { position: absolute; top: 7px; left: 50%; translate: -50% 0; padding: 0.2rem 0.55rem; border-radius: 999px; background: #e0533c; color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; pointer-events: none; box-shadow: 0 0 0 3px rgb(224 83 60 / 0.25); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgb(224 83 60 / 0); } }
.demo-flow { display: flex; gap: 0.5rem; }
.demo-flow i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #e06a3c); opacity: 0.25; animation: flow 1.5s ease-in-out infinite; }
.demo-flow i:nth-child(2) { animation-delay: 0.2s; }
.demo-flow i:nth-child(3) { animation-delay: 0.4s; }
@keyframes flow { 30% { opacity: 1; transform: scale(1.3); } }
.demo-qr { display: flex; align-items: center; gap: 1.1rem; margin: 2.4rem auto 0; padding: 1rem; border-radius: 22px; border: 1px solid var(--line); background: rgb(255 255 255 / 0.03); max-width: 34rem; }
.demo-qr img { width: 132px; height: 132px; flex: none; padding: 8px; border-radius: 16px; background: #fff; }
.demo-qr p { margin: 0; display: grid; gap: 0.35rem; }
.demo-qr span { color: var(--muted); font-size: 0.92rem; }
.demo-qr a { color: var(--accent-2, #ffb38a); font-weight: 700; text-decoration: none; }
@media (max-width: 960px) {
  /* one phone at a time, switched with tabs */
  .demo-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; max-width: 360px; margin: 1.6rem auto 0; padding: 0.3rem; border-radius: 16px; border: 1px solid var(--line); background: rgb(255 255 255 / 0.03); }
  .demo-tabs button { padding: 0.65rem; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
  .demo-tabs button.active { background: #f6efe8; color: #1c1210; }
  .demo-stage { margin-top: 1.2rem; }
  .demo-flow { display: none; }
  .demo-stage[data-show="guest"] .demo-waiter, .demo-stage[data-show="waiter"] .demo-guest { display: none; }
  .demo-frame { width: min(100%, 360px); height: 640px; border-radius: 40px; border-width: 8px; }
  .demo-phone { width: 100%; }
}
@media (max-width: 520px) {
  .demo-qr img { width: 104px; height: 104px; }
}
