/* ===================================================
   Inner Vine — Design System
   Dark, bold, tech-forward with an organic "vine" motif.
=================================================== */

:root {
  --bg: #0a0e0d;
  --bg-alt: #0f1513;
  --surface: #121917;
  --surface-border: #1f2a26;
  --text: #eef4f1;
  --text-dim: #9fb0aa;
  --text-faint: #6b7a74;

  --vine: #4ade80;        /* core brand green */
  --vine-bright: #86efac;
  --vine-dark: #1f7a4d;
  --accent: #7c5cff;      /* tech violet, used sparingly */

  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1180px;

  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

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

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

/* ---------- Utility ---------- */
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vine);
  margin-bottom: 14px;
  font-weight: 600;
}

.section-sub {
  color: var(--text-dim);
  max-width: 560px;
  margin-top: 14px;
  font-size: 1.02rem;
}

.highlight {
  color: var(--vine-bright);
  position: relative;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--vine) 0%, #22c55e 100%);
  color: #06120a;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -6px rgba(74, 222, 128, 0.55);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--surface-border);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--vine); color: var(--vine-bright); transform: translateY(-2px); }

.btn-small { padding: 9px 18px; font-size: 0.85rem; }
.btn-large { padding: 17px 34px; font-size: 1.05rem; }

/* ===================================================
   LOADER
=================================================== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#loader.loader-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#vine-svg {
  width: 180px;
  height: 180px;
  overflow: visible;
}

.vine-path {
  fill: none;
  stroke: var(--vine);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.55));
}

.vine-node {
  fill: var(--vine-bright);
  filter: drop-shadow(0 0 8px rgba(134, 239, 172, 0.9));
}

#loader-text {
  font-family: var(--font-head);
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0;
  animation: fadeInText 0.6s var(--ease) 1.6s forwards;
}

@keyframes fadeInText {
  to { opacity: 1; }
}

/* ===================================================
   HEADER / NAV
=================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 13, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-tree {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.32));
}
.logo-tree path {
  fill: none;
  stroke: var(--vine);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo-tree .logo-tree-stem { stroke-width: 3.5; }
.logo-tree circle { fill: var(--vine-bright); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:not(.btn) { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--vine-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }

/* ===================================================
   HERO
=================================================== */
.hero {
  position: relative;
  padding: 170px 0 110px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 20%, transparent 80%);
}

.hero-vine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.hero-vine-path {
  fill: none;
  stroke: var(--vine-dark);
  stroke-width: 2;
  stroke-dasharray: 6 10;
  animation: vineDrift 40s linear infinite;
}
@keyframes vineDrift {
  to { stroke-dashoffset: -400; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stats > div { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--vine-bright);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===================================================
   WORK / SHOWCASE
=================================================== */
.work { padding: 100px 0; background: var(--bg-alt); }

.work h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 4px; }

.showcase-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 40px 4px 10px;
  scroll-snap-type: x mandatory;
}
.showcase-track::-webkit-scrollbar { height: 6px; }
.showcase-track::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 4px; }

.showcase-card {
  flex: 0 0 auto;
  width: 340px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.showcase-card:hover { transform: translateY(-6px); border-color: var(--vine-dark); }

.showcase-frame-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  background: #06090a;
  overflow: hidden;
}
/* Live previews render at a laptop-sized viewport (1280px wide) and are scaled down
   to fit the card, so each site shows its desktop layout rather than its phone one.
   --frame-scale = card width / 1280, and the iframe height is the frame height / scale. */
.showcase-card { --frame-scale: 0.2656; } /* 340px card */
.showcase-frame-wrap iframe {
  width: 1280px;
  height: calc(220px / var(--frame-scale));
  border: 0;
  transform: scale(var(--frame-scale));
  transform-origin: top left;
  pointer-events: none;
}
.showcase-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.45s var(--ease);
}
.showcase-card:hover .showcase-preview-image { transform: scale(1.025); }
.placeholder-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(74,222,128,0.12), transparent 70%);
}
.placeholder-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  font-family: var(--font-head);
  letter-spacing: 0.04em;
}

.showcase-meta { padding: 18px 20px 22px; }
.showcase-meta h3 { font-size: 1.05rem; margin-bottom: 6px; }
.showcase-meta p { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 12px; }
.showcase-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vine);
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.showcase-link {
  font-size: 0.85rem;
  color: var(--vine-bright);
  font-weight: 600;
}
.showcase-link:hover { text-decoration: underline; }

/* ===================================================
   SERVICES
=================================================== */
.services { padding: 100px 0; }
.services h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 600px; margin-bottom: 50px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.service-card:hover { border-color: var(--vine-dark); transform: translateY(-4px); }
.service-icon { font-size: 1.6rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.service-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ===================================================
   PROCESS
=================================================== */
.process { padding: 100px 0; background: var(--bg-alt); }
.process h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 50px; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.process-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vine-dark);
  margin-bottom: 14px;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { color: var(--text-dim); font-size: 0.92rem; }

/* ===================================================
   CTA / CONTACT
=================================================== */
.cta {
  padding: 130px 0;
  text-align: center;
  position: relative;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(74,222,128,0.08), transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 620px; margin-bottom: 4px; }
.cta .section-sub { text-align: center; margin-bottom: 36px; }

/* ===================================================
   FOOTER
=================================================== */
.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--surface-border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ===================================================
   REVEAL ON SCROLL
=================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 13, 0.97);
    border-bottom: 1px solid var(--surface-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 28px;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 140px 0 80px; }
  .hero-stats { gap: 30px; }
  .showcase-card { width: 280px; --frame-scale: 0.21875; } /* 280px card */
}
