/* ============================
   AgencjaAI — Design Tokens & Styles
   Dark premium theme with gold accents
   ============================ */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Satoshi', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Dark Premium Palette */
  --color-bg: #0a0a12;
  --color-surface: #111120;
  --color-surface-2: #171730;
  --color-surface-3: #1e1e3a;
  --color-border: rgba(212, 175, 55, 0.15);
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-text: #f0ede6;
  --color-text-muted: #9b978e;
  --color-text-faint: #5c5a54;
  --color-primary: #d4af37;
  --color-primary-hover: #e8c84a;
  --color-primary-glow: rgba(212, 175, 55, 0.2);
  --color-accent-blue: #4a7dff;
  --color-accent-blue-glow: rgba(74, 125, 255, 0.15);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.15);
}

/* ============================
   GLOBAL
   ============================ */

body {
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

/* ============================
   HEADER / NAV
   ============================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
  background: rgba(10, 10, 18, 0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
}

.nav__logo svg {
  width: 36px;
  height: 36px;
}

.nav__logo-text span {
  color: var(--color-primary);
}

.nav__links {
  display: none;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-interactive);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}

.nav__links a:hover {
  color: var(--color-text);
}

.nav__links a:hover::after {
  width: 100%;
}

a.nav__cta,
button.nav__cta {
  display: none;
}

@media (min-width: 768px) {
  a.nav__cta,
  button.nav__cta { display: inline-flex; }
}

/* Mobile menu toggle */
.nav__mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav__mobile-toggle { display: none; }
}

.nav__mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(10, 10, 18, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav a {
  font-size: var(--text-xl);
  font-family: var(--font-display);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav a:hover {
  color: var(--color-primary);
}

/* ============================
   BUTTONS
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-interactive);
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #0a0a12;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary-glow);
  border-color: var(--color-primary-hover);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ============================
   HERO SECTION
   ============================ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-32) var(--space-4) var(--space-16);
}

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

.hero__canvas canvas {
  width: 100%;
  height: 100%;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(212, 175, 55, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(74, 125, 255, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, transparent 70%, var(--color-bg) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: var(--space-6);
}

.hero__badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__title .highlight {
  background: linear-gradient(135deg, var(--color-primary) 0%, #f0d060 50%, var(--color-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.hero__trust {
  margin-top: var(--space-10);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.hero__trust svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

/* ============================
   SECTION DEFAULTS
   ============================ */

.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-16));
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  max-width: 600px;
  margin-inline: auto;
}

/* ============================
   SERVICES SECTION
   ============================ */

.services__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  position: relative;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-blue));
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.service-card:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.service-card__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.service-card__features {
  margin-top: var(--space-6);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.service-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.service-card__features li svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================
   WHY ME / ABOUT SECTION
   ============================ */

.about__grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.about__visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 480px;
  margin-inline: auto;
}

.about__visual-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  animation: spin-slow 30s linear infinite;
}

.about__visual-ring:nth-child(2) {
  inset: 15%;
  animation-duration: 20s;
  animation-direction: reverse;
  border-style: dashed;
  border-color: rgba(74, 125, 255, 0.15);
}

.about__visual-ring:nth-child(3) {
  inset: 30%;
  animation-duration: 15s;
  border-color: rgba(212, 175, 55, 0.15);
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.about__visual-center {
  position: absolute;
  inset: 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-gold);
}

.about__visual-center svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
}

/* Floating nodes on rings */
.about__node {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__node svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}

.about__node:nth-child(5) { top: 0; left: 50%; transform: translate(-50%, -50%); }
.about__node:nth-child(6) { top: 50%; right: 0; transform: translate(50%, -50%); }
.about__node:nth-child(7) { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.about__node:nth-child(8) { top: 50%; left: 0; transform: translate(-50%, -50%); }

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.stat-card {
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ============================
   PROCESS SECTION
   ============================ */

.process__steps {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  position: relative;
}

@media (min-width: 768px) {
  .process__steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-step {
  text-align: center;
  position: relative;
  padding: var(--space-6);
}

.process-step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-blue));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: #0a0a12;
  margin-bottom: var(--space-4);
}

.process-step__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.process-step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Connector lines between steps (desktop only) */
@media (min-width: 768px) {
  .process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(var(--space-6) + 28px);
    right: -10%;
    width: 20%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
    opacity: 0.3;
  }
}

/* ============================
   QUOTE / BLOCKQUOTE
   ============================ */

.quote-section {
  padding: clamp(var(--space-12), 8vw, var(--space-20)) 0;
  position: relative;
}

.quote-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(212, 175, 55, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.quote__content {
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
  position: relative;
}

.quote__mark {
  font-family: Georgia, serif;
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--color-primary);
  opacity: 0.15;
  line-height: 0.5;
  display: block;
  margin-bottom: var(--space-4);
}

.quote__text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.4;
  margin-bottom: var(--space-6);
}

.quote__author {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ============================
   CTA SECTION
   ============================ */

.cta-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
}

.cta__box {
  position: relative;
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  text-align: center;
  overflow: hidden;
}

.cta__box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.cta__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text);
  position: relative;
}

.cta__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  position: relative;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  position: relative;
}

/* ============================
   FOOTER
   ============================ */

.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border-subtle);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__attribution a {
  color: var(--color-text-muted);
}

/* ============================
   SCROLL ANIMATIONS
   ============================ */

.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Fallback for browsers without scroll-driven animations */
@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: fadein-fallback 0.8s var(--ease-out) forwards;
  }
  @keyframes fadein-fallback {
    to { opacity: 1; }
  }
}

/* ============================
   PARTICLE CANVAS
   ============================ */

#hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
