/* ==========================================================================
   Agency ESP — main site stylesheet
   Dark neon (green/blue) glassmorphism, SaaS-style
   ========================================================================== */

:root {
  --bg-0: #060a10;
  --bg-1: #0a121c;
  --bg-2: #0e1a26;
  --neon-green: #39ff9a;
  --neon-green-dim: #1fae6b;
  --neon-blue: #35c9ff;
  --neon-blue-dim: #1c86ad;
  --ink-0: #eaf6f2;
  --ink-1: #a9c2c0;
  --ink-2: #6f8a89;
  --line: rgba(160, 255, 220, 0.14);
  --glass: rgba(16, 30, 38, 0.55);
  --glass-strong: rgba(16, 34, 42, 0.75);
  --danger: #ff5d7a;
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(53, 201, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 800px 600px at 100% 10%, rgba(57, 255, 154, 0.10), transparent 55%),
    var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

::selection { background: var(--neon-green); color: #04140d; }

:focus-visible {
  outline: 2px solid var(--neon-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Grid overlay texture */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57, 255, 154, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 154, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neon-green);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-top: 14px;
  color: var(--ink-0);
}
.section-head p {
  color: var(--ink-1);
  font-size: 1.02rem;
  margin-top: 12px;
}

section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

/* ---------------- Header ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-0);
}
.brand img { width: 34px; height: 34px; }
.nav-links {
  display: flex;
  gap: 30px;
  font-size: 0.92rem;
  color: var(--ink-1);
}
.nav-links a { position: relative; padding: 6px 0; transition: color 0.25s var(--ease); }
.nav-links a:hover { color: var(--neon-green); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--neon-green);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  width: 22px; height: 2px;
  background: var(--neon-green);
  border-radius: 2px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(120deg, var(--neon-green), var(--neon-blue));
  color: #04140d;
  box-shadow: 0 0 0 rgba(57,255,154,0);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(57, 255, 154, 0.35); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-0);
}
.btn-ghost:hover { border-color: var(--neon-green); color: var(--neon-green); }
.btn-outline {
  background: transparent;
  border-color: var(--neon-blue-dim);
  color: var(--neon-blue);
}
.btn-outline:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 8px 26px rgba(53, 201, 255, 0.25);
  transform: translateY(-2px);
}

/* ---------------- Hero (full-bleed background) ---------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(1.15) brightness(0.85);
  animation: hero-zoom 18s var(--ease) infinite alternate;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,10,16,0.35) 0%, rgba(6,10,16,0.55) 45%, rgba(6,10,16,0.95) 100%),
    linear-gradient(90deg, rgba(6,10,16,0.85) 0%, rgba(6,10,16,0.25) 55%, rgba(6,10,16,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  margin-top: 18px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--neon-green), var(--neon-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin-top: 20px;
  color: var(--ink-1);
  font-size: 1.1rem;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-stats {
  display: inline-flex;
  gap: 10px;
  margin-top: 40px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-radius: 999px;
}
.hero-stats span {
  background: rgba(6,10,16,0.4);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--neon-green);
}

/* ---------------- Scroll reveal ---------------- */
.reveal,
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view,
.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .hero-bg img { animation: none; }
}

/* ---------------- Glass card ---------------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------------- Services ---------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.19s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.26s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.33s; }
.service-card {
  padding: 30px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--neon-green-dim);
  box-shadow: 0 20px 50px rgba(57,255,154,0.08);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(57,255,154,0.16), rgba(53,201,255,0.12));
  border: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: 1.3rem;
}
.service-card h3 {
  font-size: 1.15rem;
  color: var(--ink-0);
  margin-bottom: 10px;
}
.service-card p {
  color: var(--ink-1);
  font-size: 0.94rem;
}
.services-media {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.services-media img { width: 100%; object-fit: cover; max-height: 340px; }

/* ---------------- Reviews ---------------- */
.reviews-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: start;
}
.review-form {
  padding: 28px;
  position: sticky;
  top: 100px;
}
.review-form h3 {
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-1);
  margin-bottom: 7px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.6);
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.6);
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s var(--ease);
  cursor: pointer;
}
.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--neon-green);
}
.field input[type="file"] {
  padding: 9px 12px;
  cursor: pointer;
  color: var(--ink-1);
}
.field input[type="file"]::file-selector-button {
  background: linear-gradient(120deg, var(--neon-green), var(--neon-blue));
  color: #04140d;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  margin-right: 12px;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.field input[type="file"]::file-selector-button:hover { transform: translateY(-1px); }
.field .opt-label {
  color: var(--ink-2);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.field textarea { min-height: 100px; }

.tg-link {
  color: var(--neon-blue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tg-link:hover { color: var(--neon-green); border-color: currentColor; }

.form-msg {
  margin-top: 12px;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.form-msg.ok { color: var(--neon-green); }
.form-msg.err { color: var(--danger); }

/* Star picker (review form) */
.star-picker {
  display: flex;
  gap: 6px;
}
.star-picker .star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(160, 255, 220, 0.25);
  padding: 4px;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.star-picker .star:hover { transform: scale(1.15); }
.star-picker .star.active,
.star-picker .star.preview {
  color: var(--neon-green);
  text-shadow: 0 0 12px rgba(57, 255, 154, 0.55);
}

/* Star display (review cards, read-only) */
.stars-display {
  display: inline-flex;
  gap: 2px;
  font-size: 0.95rem;
  color: rgba(160, 255, 220, 0.25);
  letter-spacing: 1px;
}
.stars-display .filled {
  color: var(--neon-green);
  text-shadow: 0 0 8px rgba(57, 255, 154, 0.45);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}
.reviews-list::-webkit-scrollbar { width: 6px; }
.reviews-list::-webkit-scrollbar-thumb { background: var(--neon-green-dim); border-radius: 4px; }

.review-card {
  padding: 22px 24px;
  animation: rise 0.5s var(--ease) both;
}
.review-card .r-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.review-card .r-name {
  font-weight: 600;
  color: var(--ink-0);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #04140d;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.review-card .r-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.review-card p { color: var(--ink-1); font-size: 0.94rem; margin: 0; }

.empty-state {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-2);
  font-size: 0.92rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- News ---------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.news-grid .news-card:nth-child(1) { transition-delay: 0.05s; }
.news-grid .news-card:nth-child(2) { transition-delay: 0.15s; }
.news-grid .news-card:nth-child(3) { transition-delay: 0.25s; }
.news-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.news-card:hover { transform: translateY(-6px); border-color: var(--neon-blue-dim); }
.news-img {
  height: 170px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(57,255,154,0.08), rgba(53,201,255,0.08));
}
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 20px 22px; }
.news-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-blue);
  letter-spacing: 0.05em;
}
.news-body h3 {
  font-size: 1.05rem;
  margin-top: 8px;
  color: var(--ink-0);
}
.news-body p {
  color: var(--ink-1);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ---------------- Contact ---------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: stretch;
}
.contact-info {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-info h3 { font-size: 1.3rem; margin-bottom: 14px; }
.contact-info p { color: var(--ink-1); font-size: 0.95rem; }
.contact-points { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.contact-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-1);
}
.contact-point .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  margin-top: 7px;
  flex-shrink: 0;
}
.contact-form { padding: 34px; }
.contact-form .row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---------------- Footer ---------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  position: relative;
  z-index: 1;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.footer-row a { color: var(--ink-1); }
.footer-row a:hover { color: var(--neon-green); }
.admin-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.admin-link:hover { border-color: var(--neon-green); color: var(--neon-green); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
  background: var(--glass-strong);
  border: 1px solid var(--neon-green-dim);
  color: var(--ink-0);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  backdrop-filter: blur(14px);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-layout { grid-template-columns: 1fr; }
  .review-form { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .contact-form .row2 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

.nav-links.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: rgba(6,10,16,0.97);
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
