/* ==========================================================================
   JAGY — LUXURY CYBERNETIC EDITORIAL DESIGN SYSTEM
   Human-Crafted, Restrained, Confident, Kinetic
   Google UI/UX Designer & Motion Web Standards
   Fully Responsive for iPhone, Android, Tablet & Desktop
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Manrope:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #050506;
  --bg-subtle: #090a0d;
  --ink: #edeff3;
  --mute: #8c919c;
  --line: #1c1e24;
  --line-light: #2d303a;
  --acc: #00f0ff;
  --acc-glow: rgba(0, 240, 255, 0.3);
  --acc-soft: rgba(0, 240, 255, 0.08);
  --soft: #0e0f13;
  --chr: linear-gradient(180deg, #ffffff 0%, #b8bec9 50%, #6e7582 100%);
  --chr-reverse: linear-gradient(180deg, #6e7582 0%, #b8bec9 50%, #ffffff 100%);

  --font-title: 'Michroma', -apple-system, sans-serif;
  --font-body: 'Manrope', -apple-system, system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --w: 1160px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

/* Subtle Film Grain Noise Overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Magnetic Glowing Cursor */
#customCursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 12px var(--acc);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, opacity 0.2s ease;
  will-change: transform;
}

#customCursorRing {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.4);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  will-change: transform;
}

body.cursor-hover #customCursor {
  width: 6px;
  height: 6px;
  background: #ffffff;
}

body.cursor-hover #customCursorRing {
  width: 54px;
  height: 54px;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(2px);
}

/* Dynamic Ambient Mouse Follower Spotlight */
#ambientSpotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.035) 0%, rgba(20, 30, 48, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* Typography Headings */
h1, h2, h3, .logo, .price, .btn {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1, .price {
  background: var(--chr);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  font-size: clamp(1.65rem, 4.4vw, 3.6rem);
  line-height: 1.18;
  margin: 0 0 1.2rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
  line-height: 1.3;
  margin: 0 0 0.8rem;
  color: var(--ink);
  word-break: break-word;
}

p {
  margin: 0 0 1.2rem;
  color: var(--mute);
  font-size: 1.05rem;
  line-height: 1.7;
}

.w {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 2.8rem);
  position: relative;
  z-index: 2;
  width: 100%;
}

.lead {
  font-size: 1.15rem;
  color: #a4abb8;
  max-width: 52ch;
  line-height: 1.65;
}

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

/* Navigation Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 6, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s ease;
  width: 100%;
}

header .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  letter-spacing: 0.28em;
  color: var(--ink);
  flex-shrink: 0;
}

.logo img {
  height: 38px;
  width: 38px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}

nav {
  display: flex;
  gap: 1.8rem;
  font-size: 0.92rem;
  align-items: center;
}

nav a, .ln {
  text-decoration: none;
  color: var(--mute);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s;
  white-space: nowrap;
}

nav a::after, .ln::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--acc);
  box-shadow: 0 0 8px var(--acc);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover, nav a.active, .ln:hover {
  color: var(--ink);
}

nav a:hover::after, nav a.active::after, .ln:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd2dd 50%, #9ba3b2 100%);
  color: #050506;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px -6px rgba(255, 255, 255, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, background 0.3s;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 35px -8px rgba(0, 240, 255, 0.45), 0 0 20px -2px var(--acc-glow);
  background: linear-gradient(180deg, #ffffff 0%, #d8eaff 50%, #a4c9ff 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--line-light);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--acc);
  box-shadow: 0 8px 25px -8px rgba(0, 240, 255, 0.25);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  align-items: center;
  margin-top: 2rem;
}

/* Hero Section with Live Three.js Robot Canvas */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
  min-height: calc(100vh - 75px);
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 25%;
  right: 5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, rgba(20, 24, 34, 0.04) 50%, transparent 75%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}

.stage {
  position: relative;
  height: min(76vh, 680px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#botCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
  touch-action: pan-y;
}

#botCanvas:active {
  cursor: grabbing;
}

/* Stage Micro Telemetry Overlay */
.stage-hud {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mute);
  background: rgba(14, 16, 20, 0.75);
  border: 1px solid var(--line);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.hud-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 8px var(--acc);
  animation: hud-blink 2s infinite ease-in-out;
}

@keyframes hud-blink {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Minimalist Editorial Split Section */
.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.split > div {
  padding: 2.8rem 0;
}

.split > div + div {
  padding-left: clamp(2rem, 5vw, 4rem);
  border-left: 1px solid var(--line);
}

.split p {
  color: var(--mute);
  max-width: 52ch;
  margin-bottom: 1.2rem;
}

.split b {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Meet / Social Proof Section with Instagram DM Widget */
.meet {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.meet p {
  color: var(--mute);
  max-width: 54ch;
}

.chat {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 1.3rem;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(0, 240, 255, 0.08);
  position: relative;
}

.chat .top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  line-height: 1.2;
}

.chat .top small {
  display: block;
  font-weight: 400;
  color: var(--mute);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--chr);
  color: #050506;
  display: grid;
  place-items: center;
  font: 1.05rem var(--font-title);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.m {
  max-width: 86%;
  padding: 0.72rem 1rem;
  margin: 0 0 0.7rem;
  border-radius: 18px;
  font-size: 0.94rem;
  line-height: 1.5;
  transition: transform 0.3s ease;
  word-break: break-word;
}

.m.me {
  margin-left: auto;
  background: linear-gradient(180deg, #eceef2 0%, #b8beca 100%);
  color: #050506;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.m.ai {
  background: #171920;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom-left-radius: 4px;
}

.cap {
  font-size: 0.82rem;
  color: var(--mute);
  margin: 1.1rem 0 0;
  text-align: center;
}

/* Staggered Pop Animation for Chat */
.js .chat:not(.in) .m {
  opacity: 0;
}

.chat.in .m {
  animation: pop 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
  animation-delay: calc(var(--d) * 1s + 0.3s);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Restaurant-Style Dotted Menu Pricing */
.page {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.menu {
  list-style: none;
  margin: 2.5rem 0;
  padding: 0;
}

.menu li {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.menu li:last-child {
  border-bottom: 1px solid var(--line);
}

.menu li:hover {
  padding-left: 1rem;
}

.menu .hd {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
}

.menu h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--ink);
}

.dots {
  flex: 1;
  border-bottom: 2px dotted var(--line-light);
  transform: translateY(-0.35em);
  transition: border-color 0.4s, transform 0.4s ease;
}

.menu li:hover .dots {
  border-color: var(--acc);
}

.price {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1;
}

.menu p {
  color: var(--mute);
  max-width: 60ch;
  margin: 0.8rem 0 0;
  font-size: 1.02rem;
}

/* Large Contact Rows */
.big {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}

.big:last-of-type {
  border-bottom: 1px solid var(--line);
}

.big:hover {
  padding-left: 1rem;
  color: var(--acc);
}

.big small {
  font-size: 0.95rem;
  color: var(--mute);
}

.big span {
  font: 400 clamp(1.1rem, 3.6vw, 1.95rem)/1.2 var(--font-title);
  overflow-wrap: anywhere;
}

/* Legal Documents (Privacy & Terms) */
.doc {
  max-width: 70ch;
}

.doc h1 {
  margin-bottom: 0.5rem;
}

.doc .when {
  font-size: 0.92rem;
  font-family: var(--font-mono);
  color: var(--mute);
  margin-bottom: 2.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.doc h2 {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.5rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.doc p, .doc li {
  color: #9ea5b2;
  font-size: 1.02rem;
  line-height: 1.8;
}

.doc ul {
  margin: 0 0 1.5rem 1.4rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

/* Global Footer */
footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  z-index: 2;
  width: 100%;
}

footer .w {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.8rem;
  padding-bottom: 2.2rem;
  color: var(--mute);
  font-size: 0.95rem;
}

footer span {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

/* Scroll Reveal Classes */
.js .rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE PERFECTION
   ========================================================================== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }

  .stage {
    order: -1;
    height: clamp(260px, 42vh, 340px);
    width: 100%;
    margin-bottom: 0.5rem;
  }

  #botCanvas {
    touch-action: pan-y;
  }

  .stage-hud {
    bottom: 0.7rem;
    right: 0.7rem;
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
  }

  .split {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
  }

  .split > div {
    padding: 1.8rem 0;
  }

  .split > div + div {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .meet {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2.8rem;
    padding-bottom: 2.8rem;
  }

  .chat {
    justify-self: stretch;
    max-width: 100%;
    padding: 1.1rem;
    border-radius: 20px;
  }

  #customCursor, #customCursorRing, #ambientSpotlight {
    display: none !important;
  }
}

@media (max-width: 640px) {
  header .w {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .logo {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    gap: 0.55rem;
  }

  .logo img {
    height: 30px;
    width: 30px;
  }

  nav {
    gap: 0.85rem;
    font-size: 0.82rem;
  }

  h1 {
    font-size: clamp(1.5rem, 6.5vw, 2.2rem);
    line-height: 1.22;
    margin-bottom: 0.9rem;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 1.4rem;
  }

  .row .btn {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 0.76rem;
    text-align: center;
    justify-content: center;
  }

  .row .ln {
    text-align: center;
    display: inline-block;
    padding: 0.35rem 0;
  }

  /* Dotted Menu Pricing Mobile Adaptation */
  .menu {
    margin: 1.8rem 0;
  }

  .menu li {
    padding: 1.5rem 0;
  }

  .menu li:hover {
    padding-left: 0;
  }

  .menu .hd {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .menu .dots {
    display: none;
  }

  .menu h2 {
    font-size: 1.22rem;
  }

  .price {
    font-size: 1.85rem;
    margin-top: 0.15rem;
  }

  .menu p {
    font-size: 0.95rem;
    margin-top: 0.5rem;
  }

  /* Contact Big Rows Mobile Adaptation */
  .big {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1.3rem 0;
  }

  .big small {
    font-size: 0.85rem;
  }

  .big span {
    font-size: clamp(1.05rem, 4.8vw, 1.45rem);
    word-break: break-all;
  }

  /* Footer Mobile Adaptation */
  footer .w {
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  footer span {
    gap: 1rem;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .rv {
    opacity: 1;
    transform: none;
  }
  .js .chat:not(.in) .m {
    opacity: 1;
  }
}
