/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:    #2a2420;
  --sage:   #4a6741;
  --tan:    #9b7845;
  --rust:   #8b3a2a;
  --cream:  #f0e8d8;
  --parchm: #faf5eb;
  --white:  #ffffff;
  --shadow: rgba(42,36,32,.12);

  --font-title: 'Cinzel', Georgia, serif;
  --font-body:  'Inter', system-ui, sans-serif;

  --max-w: 1100px;
  --radius: 8px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

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

/* ─── CONTAINER ─────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--tan); color: var(--white); }
.btn-primary:hover { background: #b08850; }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(240,232,216,.35);
}
.btn-ghost:hover { border-color: var(--cream); }

.btn-sm { padding: 10px 20px; font-size: .875rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

.btn-disabled { opacity: .6; cursor: default; pointer-events: none; }

.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── NAV ────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(30,24,20,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-img { width: 32px; height: 32px; }
.nav-logo-text { font-family: var(--font-title); font-size: 1.1rem; letter-spacing: .04em; }

.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  background: transparent; border: 1px solid rgba(240,232,216,.3);
  border-radius: 20px; padding: 5px 12px;
  color: var(--cream); font-size: .8rem;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: border-color .2s;
}
.lang-toggle:hover { border-color: var(--cream); }
.lang-sep { opacity: .4; }
.lang-toggle span.active { color: var(--tan); font-weight: 600; }

/* ─── SECTION COMMON ─────────────────────────────────────────── */
.section { padding: 100px 0; }

.section-label {
  font-size: .75rem; letter-spacing: .15em; font-weight: 600;
  color: var(--tan); margin-bottom: 14px; text-transform: uppercase;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600; line-height: 1.2;
  margin-bottom: 56px; color: var(--cream);
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 80px;
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(155,120,69,.08) 0%, transparent 70%),
    linear-gradient(160deg, #1e1410 0%, #2a2420 60%, #1a1208 100%);
  overflow: hidden; position: relative;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z' fill='none' stroke='rgba(155,120,69,.04)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-w); margin: 0 auto;
  flex: 1; z-index: 1;
  padding-right: 40px;
}

.hero-badge {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(155,120,69,.4);
  font-size: .7rem; letter-spacing: .18em; color: var(--tan);
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700; line-height: 1; letter-spacing: .03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--cream) 30%, var(--tan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem); line-height: 1.7;
  color: rgba(240,232,216,.8); margin-bottom: 40px;
}

.hero-cta-group { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-mockup {
  flex: 0 0 auto; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.phone-frame {
  width: 240px; height: 480px;
  background: var(--ink);
  border: 3px solid rgba(155,120,69,.4);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(155,120,69,.1);
}
.phone-screen { width: 100%; height: 100%; object-fit: cover; }

/* ─── CONCEPT ────────────────────────────────────────────────── */
.concept { background: var(--parchm); }
.concept .section-label,
.concept .section-title { color: var(--ink); }
.concept .section-label { color: var(--sage); }

.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  background: var(--white);
  border: 1px solid rgba(42,36,32,.1);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px var(--shadow); }

.card-icon { width: 48px; height: 48px; margin-bottom: 20px; }
.card-icon svg { width: 100%; height: 100%; }

.card-title {
  font-family: var(--font-title);
  font-size: 1.1rem; font-weight: 600;
  color: var(--ink); margin-bottom: 12px;
}

.card-text { font-size: .9rem; color: #5a4e44; line-height: 1.6; }

/* ─── HOW IT WORKS ───────────────────────────────────────────── */
.how { background: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }

.step {
  padding: 40px;
  border-bottom: 1px solid rgba(240,232,216,.08);
  transition: background .2s;
}
.step:nth-child(odd) { border-right: 1px solid rgba(240,232,216,.08); }
.step:hover { background: rgba(155,120,69,.05); }

.step-num {
  font-family: var(--font-title);
  font-size: 3rem; font-weight: 700;
  color: rgba(155,120,69,.2); line-height: 1;
  margin-bottom: 16px;
}

.step-title {
  font-family: var(--font-title);
  font-size: 1.05rem; font-weight: 600;
  color: var(--cream); margin-bottom: 10px;
}

.step-text { font-size: .9rem; color: rgba(240,232,216,.65); }

/* ─── GALLERY ────────────────────────────────────────────────── */
.gallery { background: #1a1410; }

.gallery-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-separator { margin: 72px 0 56px; border-top: 1px solid rgba(240,232,216,.08); }

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(240,232,216,.08);
  transition: transform .2s;
}
.gallery-item:hover { transform: scale(1.02); }

.gallery-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery-placeholder::after {
  content: '';
  display: block; width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, #2a2420 0%, #3a3028 100%);
}

.gallery-caption {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: .85rem; color: rgba(240,232,216,.7);
  font-style: italic;
}
.gallery-world-name { font-family: var(--font-title); font-size: .9rem; color: var(--cream); font-style: normal; }
.gallery-world-desc { font-size: .78rem; color: var(--tan); font-style: normal; }

/* ─── FEATURES ───────────────────────────────────────────────── */
.features { background: var(--parchm); }
.features .section-label { color: var(--sage); }
.features .section-title { color: var(--ink); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feat {
  background: var(--white);
  border: 1px solid rgba(42,36,32,.08);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform .2s, box-shadow .2s;
}
.feat:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--shadow); }

.feat-icon {
  width: 40px; height: 40px;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--cream); border-radius: var(--radius);
}
.feat-icon svg { width: 100%; height: 100%; }

.feat-title {
  font-family: var(--font-title);
  font-size: .95rem; font-weight: 600;
  color: var(--ink); margin-bottom: 8px;
}

.feat-text { font-size: .85rem; color: #5a4e44; line-height: 1.55; }

/* ─── DOWNLOAD ───────────────────────────────────────────────── */
.download {
  background: linear-gradient(135deg, #1e1410 0%, #2a2420 100%);
  text-align: center;
}

.download-inner { max-width: 600px; margin: 0 auto; }

.download-badge {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 16px; border-radius: 20px;
  border: 1px solid rgba(155,120,69,.4);
  font-size: .7rem; letter-spacing: .18em; color: var(--tan);
}

.download-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; margin-bottom: 16px;
}

.download-sub { color: rgba(240,232,216,.7); margin-bottom: 40px; font-size: 1.05rem; }

.download-note { margin-top: 20px; font-size: .8rem; color: rgba(240,232,216,.4); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: #0f0c09;
  padding: 48px 24px;
  text-align: center;
}

.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo-img { width: 28px; height: 28px; }
.footer-logo-text { font-family: var(--font-title); font-size: 1rem; }

.footer-copy { font-size: .8rem; color: rgba(240,232,216,.4); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: .8rem; color: rgba(240,232,216,.55); transition: color .2s; }
.footer-links a:hover { color: var(--tan); }

.footer-ai { font-size: .72rem; color: rgba(240,232,216,.25); max-width: 400px; line-height: 1.5; }

/* ─── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,12,9,.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--parchm);
  border: 1px solid rgba(155,120,69,.3);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 720px;
  max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(16px);
  transition: transform .25s;
  color: var(--ink);
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid rgba(42,36,32,.12);
  position: relative;
}
.modal-eyebrow {
  display: block; font-size: .7rem; letter-spacing: .15em;
  color: var(--sage); font-weight: 600; margin-bottom: 6px;
}
.modal-title {
  font-family: var(--font-title);
  font-size: 1.3rem; font-weight: 600; color: var(--ink);
}
.modal-close {
  position: absolute; top: 24px; right: 24px;
  background: none; border: none; cursor: pointer;
  padding: 4px; color: var(--ink); opacity: .5;
  transition: opacity .2s;
}
.modal-close:hover { opacity: 1; }
.modal-close svg { width: 20px; height: 20px; }

.modal-body {
  overflow-y: auto; padding: 24px 32px 32px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(42,36,32,.2) transparent;
}

.modal-section { margin-bottom: 28px; }
.modal-section h3 {
  font-family: var(--font-title);
  font-size: .95rem; font-weight: 600;
  color: var(--ink); margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(42,36,32,.1);
}
.modal-section p { font-size: .88rem; color: #4a3e34; margin-bottom: 8px; line-height: 1.6; }
.modal-section ul { padding-left: 18px; }
.modal-section li { font-size: .88rem; color: #4a3e34; margin-bottom: 4px; line-height: 1.6; }
.modal-section a { color: var(--tan); text-decoration: underline; }
.modal-section .modal-sub { font-size: .78rem; font-weight: 600; color: var(--sage); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .08em; }
.modal-updated { font-size: .78rem; color: rgba(42,36,32,.45); margin-bottom: 24px; }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-right {
  opacity: 0; transform: translateX(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(-90%); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; gap: 48px; text-align: center; padding-top: 120px; }
  .hero-content { padding-right: 0; }
  .hero-cta-group { justify-content: center; }
  .hero-mockup { display: none; }
  .cards-row { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(odd) { border-right: none; }
  .gallery-grid--3 { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .nav-right .btn-sm { display: none; }
  .modal-header { padding: 20px; }
  .modal-body { padding: 16px 20px 24px; }
  .footer-links { flex-direction: column; gap: 12px; }
}
