/* ═══════════════════════════════════════════════════════════
   AMG Digital Landing — light theme only
   Custom styles on top of Tailwind
   ═══════════════════════════════════════════════════════════ */

:root {
  --grain-opacity: 0.14;
}

html { color-scheme: light; }

body {
  font-feature-settings: "ss01", "cv11";
}

body, body * {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 240ms;
  transition-timing-function: cubic-bezier(.2,.7,.2,1);
}

/* ── Grain overlay ─────────────────────────────────────────── */
.grain-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.grain-overlay-invert::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.32 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.grain-overlay > *,
.grain-overlay-invert > * {
  position: relative;
  z-index: 2;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav-link {
  position: relative;
  color: inherit;
  opacity: 0.7;
  transition: opacity 200ms;
}
.nav-link:hover { opacity: 1; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after { transform: scaleX(1); }

/* ── Highlight underline ──────────────────────────────────── */
.highlight-underline {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.highlight-underline::after {
  content: "";
  position: absolute;
  left: -0.03em;
  right: -0.03em;
  bottom: 0.06em;
  height: 0.12em;
  background: currentColor;
  z-index: -1;
  transform-origin: left;
  animation: underlineIn 1.1s cubic-bezier(.2,.7,.2,1) 0.4s both;
}
@keyframes underlineIn {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ── Hero stats ────────────────────────────────────────────── */
.stat-cell {
  position: relative;
  background: #f2f1ee;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
  justify-content: space-between;
}
.stat-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.stat-sup {
  font-size: 0.4em;
  vertical-align: top;
  margin-left: 0.15em;
  font-weight: 500;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5a5854;
  max-width: 180px;
  line-height: 1.5;
}

/* ── Filter chips ──────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(10,10,10,0.18);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: transparent;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.filter-chip:hover { border-color: #0a0a0a; }
.filter-chip.is-active {
  background: #0a0a0a;
  color: #f2f1ee;
  border-color: #0a0a0a;
}

/* ── Service cards ─────────────────────────────────────────── */
.service-card {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background: #f2f1ee;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 260px;
  transition: background-color 220ms, color 220ms;
  overflow: hidden;
  isolation: isolate;
}
.service-card:hover {
  background: #0a0a0a;
  color: #f2f1ee;
}

.service-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0.5;
}
.service-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-top: 0.25rem;
  text-wrap: balance;
}
.service-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  opacity: 0.72;
  flex: 1;
  font-weight: 400;
}
.service-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(10,10,10,0.1);
}
.service-card:hover .service-foot { border-color: rgba(242,241,238,0.18); }

.service-price {
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.service-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

.service-card.is-featured::after {
  content: "★";
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 14px;
  opacity: 0.35;
  z-index: 2;
}

.service-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.85;
  z-index: 2;
}

.service-card.is-hidden { display: none; }

/* ── Portfolio ─────────────────────────────────────────────── */
.portfolio-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.portfolio-frame {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(10,10,10,0.08);
}

.portfolio-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 700ms;
  filter: saturate(0.95);
}
.portfolio-card:hover .portfolio-frame img {
  transform: scale(1.03);
  filter: saturate(1.08);
}

.portfolio-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.15));
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms;
}
.portfolio-card:hover .portfolio-frame::after { opacity: 1; }

.portfolio-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0.25rem 0;
}
.portfolio-meta-left { display: flex; flex-direction: column; gap: 0.35rem; }
.portfolio-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.portfolio-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}
.portfolio-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  opacity: 0.7;
}
.portfolio-arrow {
  font-family: 'Unbounded', sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  transition: transform 350ms cubic-bezier(.2,.7,.2,1);
  opacity: 0.8;
}
.portfolio-card:hover .portfolio-arrow { transform: translate(6px, -6px); opacity: 1; }

/* ── Process ───────────────────────────────────────────────── */
.process-step {
  position: relative;
  padding: 2.25rem 1.75rem;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 220px;
}
.process-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 3.25rem;
  line-height: 0.9;
  letter-spacing: -0.04em;
  opacity: 0.28;
}
.process-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.process-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.75;
}

/* ── Price rows ────────────────────────────────────────────── */
.price-row td {
  padding: 1rem 0.5rem;
  border-top: 1px solid rgba(10,10,10,0.08);
}
.price-row:hover td { background: rgba(10,10,10,0.03); }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0.25rem;
  cursor: pointer;
  font-family: 'Unbounded', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 1.25rem;
  transition: transform 300ms;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }

.faq-body {
  padding: 0 0.25rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  max-width: 640px;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .faq-summary { font-size: 1.35rem; padding: 1.75rem 0.5rem; }
}

/* ── Contact ───────────────────────────────────────────────── */
.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-width: 240px;
  transition: transform 220ms, background 220ms, color 220ms;
}
.contact-btn-primary {
  background: #0a0a0a;
  color: #f2f1ee;
  border: 1px solid #0a0a0a;
}
.contact-btn-primary:hover { transform: scale(1.02); }

.contact-btn-ghost {
  border: 1px solid rgba(10,10,10,0.25);
  color: #0a0a0a;
}
.contact-btn-ghost:hover {
  border-color: #0a0a0a;
  background: rgba(10,10,10,0.05);
}

.contact-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.25rem;
  background: #f2f1ee;
  transition: background 220ms;
}
.contact-cell:hover { background: #e8e6e1; }

.contact-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}
.contact-value {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer-link {
  position: relative;
  opacity: 0.7;
  transition: opacity 200ms;
}
.footer-link:hover { opacity: 1; }

/* ── Reveal on scroll ──────────────────────────────────────── */
.reveal-init { opacity: 0; transform: translateY(24px); }
.reveal-on { animation: revealUp 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes revealUp {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .animate-marquee { animation: none !important; }
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10,10,10,0.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10,10,10,0.4); }
