/* ==========================================================================
   Gremza — Landing Page
   Dark + premium gold/purple
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f17;
  --surface: #12121a;
  --surface-2: #1a1a26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f5f7;
  --text-muted: #9a9aa8;
  --text-dim: #6b6b78;

  --gold: #d4af37;
  --gold-soft: #e8c366;
  --purple: #8b5cf6;
  --purple-soft: #a78bfa;

  --gradient: linear-gradient(135deg, #e8c366 0%, #d4af37 35%, #8b5cf6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(232, 195, 102, 0.15), rgba(139, 92, 246, 0.15));

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.6);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Backgrounds ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
}
.orb--gold {
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, #d4af37, transparent 60%);
}
.orb--purple {
  top: 20%;
  right: -200px;
  background: radial-gradient(circle, #8b5cf6, transparent 60%);
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Utility ---------- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shine 8s ease infinite;
}
@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  min-height: 48px;
  white-space: nowrap;
}
.btn--primary {
  background: var(--gradient);
  color: #0a0a0f;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(139, 92, 246, 0.6); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.btn--ghost:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.btn--lg { padding: 18px 36px; font-size: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand__logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.nav__list {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav__link {
  display: inline-flex;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav__link--cta {
  color: var(--text);
  border: 1px solid var(--border-strong);
  margin-left: 8px;
}
.nav__link--cta:hover {
  background: var(--gradient);
  color: #0a0a0f;
  border-color: transparent;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 10vw, 140px) 0 clamp(60px, 10vw, 120px);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
  align-items: center;
}
.hero__content > * + * { margin-top: 24px; }
.hero__title {
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hero__lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-muted);
  max-width: 520px;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero__meta {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  margin-top: 40px !important;
  border-top: 1px solid var(--border);
}
.hero__meta div { display: flex; flex-direction: column; gap: 4px; }
.hero__meta strong {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
}
.hero__meta span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__visual {
  position: relative;
  perspective: 1600px;
}
.device {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #1a1a26, #0f0f17);
  border: 1px solid var(--border-strong);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.device:hover { transform: rotateY(-2deg) rotateX(2deg) translateY(-6px); }
.device__bar {
  display: flex;
  gap: 6px;
  padding: 0 4px 10px;
}
.device__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a2a36;
}
.device__bar span:first-child { background: #ff5f56; }
.device__bar span:nth-child(2) { background: #ffbd2e; }
.device__bar span:nth-child(3) { background: #27c93f; }
.device__screen {
  width: 100%;
  height: calc(100% - 20px);
  border-radius: 10px;
  display: block;
  object-fit: cover;
  object-position: center;
}
.device__glow {
  position: absolute;
  inset: -40px;
  background: var(--gradient);
  filter: blur(80px);
  opacity: 0.2;
  z-index: -1;
  border-radius: 50%;
}

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 9vw, 130px) 0; }
.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}
.section__head > * + * { margin-top: 16px; }
.section__title {
  font-size: clamp(32px, 4.5vw, 56px);
  letter-spacing: -0.03em;
}

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

.card {
  position: relative;
  padding: 36px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--gold-soft);
  margin-bottom: 24px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Philosophy ---------- */
.philosophy { text-align: center; }
.philosophy__inner {
  max-width: 900px;
  margin: 0 auto;
}
.philosophy__quote {
  margin-top: 28px;
  font-family: var(--font-head);
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---------- Showcase ---------- */
.showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.showcase__card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  cursor: pointer;
  transition: transform .4s ease;
}
.showcase__card--tall { aspect-ratio: 16/10; }
.showcase__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, filter .6s ease;
  filter: saturate(0.9) brightness(0.9);
}
.showcase__card:hover img { transform: scale(1.05); filter: saturate(1.1) brightness(1); }
.showcase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8));
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.showcase__overlay span {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.showcase__cta { text-align: center; margin-top: 48px; }

/* ---------- AI Editor ---------- */
.aieditor { position: relative; overflow: hidden; }
.aieditor__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 72px;
  align-items: center;
}
.aieditor__content > * + * { margin-top: 24px; }
.aieditor__title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.aieditor__lead {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-muted);
  max-width: 540px;
}
.aieditor__features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.aieditor__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
.aieditor__features .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
  flex-shrink: 0;
}

.aieditor__visual {
  position: relative;
  perspective: 1800px;
}
.aieditor__frame {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #1a1a26, #0f0f17);
  border: 1px solid var(--border-strong);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  transform: rotateY(-8deg) rotateX(5deg);
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  animation: aieditor-float 7s ease-in-out infinite;
}
.aieditor__frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .6;
  pointer-events: none;
  animation: aieditor-border 4s ease-in-out infinite;
}
.aieditor__visual:hover .aieditor__frame {
  transform: rotateY(-3deg) rotateX(2deg) translateY(-8px);
}
.aieditor__frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 12px;
}
.aieditor__frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a2a36;
}
.aieditor__frame-bar span:first-child { background: #ff5f56; }
.aieditor__frame-bar span:nth-child(2) { background: #ffbd2e; }
.aieditor__frame-bar span:nth-child(3) { background: #27c93f; }
.aieditor__frame-bar em {
  margin-left: 14px;
  font-style: normal;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.aieditor__img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
.aieditor__scanline {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 40px;
  height: 80px;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.25), transparent);
  filter: blur(8px);
  border-radius: 8px;
  animation: aieditor-scan 5s ease-in-out infinite;
  pointer-events: none;
}

.aieditor__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.6);
  white-space: nowrap;
  z-index: 2;
  opacity: 0;
  animation: aieditor-chip 8s ease-in-out infinite;
}
.aieditor__chip .chip__spark { font-size: 15px; }
.aieditor__chip--1 {
  top: 8%;
  left: -28px;
  animation-delay: 0.4s;
}
.aieditor__chip--2 {
  top: 44%;
  right: -32px;
  animation-delay: 2.2s;
}
.aieditor__chip--3 {
  bottom: 10%;
  left: 8%;
  animation-delay: 4.4s;
}

.aieditor__glow {
  position: absolute;
  inset: -60px;
  background: var(--gradient);
  filter: blur(100px);
  opacity: 0.18;
  z-index: -1;
  border-radius: 50%;
  animation: aieditor-pulse 6s ease-in-out infinite;
}

@keyframes aieditor-float {
  0%, 100% { transform: rotateY(-8deg) rotateX(5deg) translateY(0); }
  50%      { transform: rotateY(-6deg) rotateX(3deg) translateY(-10px); }
}
@keyframes aieditor-border {
  0%, 100% { opacity: .35; }
  50%      { opacity: .85; }
}
@keyframes aieditor-scan {
  0%   { top: 40px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: calc(100% - 100px); opacity: 0; }
}
@keyframes aieditor-chip {
  0%, 100% { opacity: 0; transform: translateY(10px) scale(.95); }
  10%, 30% { opacity: 1; transform: translateY(0) scale(1); }
  40%      { opacity: 0; transform: translateY(-6px) scale(.98); }
}
@keyframes aieditor-pulse {
  0%, 100% { opacity: .15; transform: scale(1); }
  50%      { opacity: .28; transform: scale(1.05); }
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 760px; margin: 0 auto; }
.contact__title {
  font-size: clamp(36px, 5vw, 64px);
  margin: 20px 0 20px;
  letter-spacing: -0.03em;
}
.contact__lead {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}
.contact__socials {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.social {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  transition: transform .25s ease, color .25s ease, border-color .25s ease, background .25s ease;
}
.social svg { width: 20px; height: 20px; }
.social:hover {
  color: #0a0a0f;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-3px);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__logo {
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}
.site-footer p {
  color: var(--text-dim);
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__visual { max-width: 560px; margin: 0 auto; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .aieditor__inner { grid-template-columns: 1fr; gap: 60px; }
  .aieditor__visual { max-width: 620px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 32px;
    transform: translateY(-120%);
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav__link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
  }
  .nav__link--cta { margin-left: 0; margin-top: 8px; text-align: center; justify-content: center; }

  .grid--3 { grid-template-columns: 1fr; }
  .showcase__grid { grid-template-columns: 1fr; }
  .hero__meta { gap: 24px; flex-wrap: wrap; }
  .hero__meta strong { font-size: 24px; }
  .device { transform: none; }
  .orb { width: 420px; height: 420px; }
  .aieditor__frame { transform: none; animation: none; }
  .aieditor__features { grid-template-columns: 1fr; }
  .aieditor__chip--1 { left: -8px; top: -18px; }
  .aieditor__chip--2 { right: -8px; }
  .aieditor__chip--3 { left: 4px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .section__head { margin-bottom: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
