/* ========================================
   Design Tokens — Dark Modern Theme
   ======================================== */

: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-full: 9999px;

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

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

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

/* ========================================
   Dark Mode (Default)
   ======================================== */

:root, [data-theme="dark"] {
  --color-bg:             #111518;
  --color-surface:        #181d22;
  --color-surface-2:      #1e2429;
  --color-surface-offset: #1a1f25;
  --color-border:         #2a3038;
  --color-divider:        #222830;

  --color-text:           #f5f0e8;
  --color-text-muted:     #a09882;
  --color-text-faint:     #5c5647;
  --color-text-inverse:   #111518;

  --color-primary:        #c9a84c;
  --color-primary-hover:  #dfc06b;
  --color-primary-active: #b89a3e;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* ========================================
   Light Mode
   ======================================== */

[data-theme="light"] {
  --color-bg:             #faf8f4;
  --color-surface:        #f0ece4;
  --color-surface-2:      #e8e2d8;
  --color-surface-offset: #ede7dd;
  --color-border:         #d4cfc5;
  --color-divider:        #e0dbd1;

  --color-text:           #1a1610;
  --color-text-muted:     #5c5647;
  --color-text-faint:     #8a8272;
  --color-text-inverse:   #faf8f4;

  --color-primary:        #a8892e;
  --color-primary-hover:  #8f7525;
  --color-primary-active: #76611d;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.12);
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:             #faf8f4;
    --color-surface:        #f0ece4;
    --color-surface-2:      #e8e2d8;
    --color-surface-offset: #ede7dd;
    --color-border:         #d4cfc5;
    --color-divider:        #e0dbd1;
    --color-text:           #1a1610;
    --color-text-muted:     #5c5647;
    --color-text-faint:     #8a8272;
    --color-text-inverse:   #faf8f4;
    --color-primary:        #a8892e;
    --color-primary-hover:  #8f7525;
    --color-primary-active: #76611d;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.06);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.08);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.12);
  }
}

/* ========================================
   Global Layout
   ======================================== */

.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: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s var(--ease-out);
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

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

.header__logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

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

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

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

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

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

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* Mobile menu toggle */
.mobile-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}

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

.mobile-toggle:hover { color: var(--color-text); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 100;
  padding: var(--space-8) var(--space-4);
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav__close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.mobile-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: 600;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
}

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
  padding: clamp(var(--space-12), 8vw, var(--space-20)) 0 clamp(var(--space-8), 5vw, var(--space-16));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, oklch(from var(--color-primary) l c h / 0.08), transparent 70%);
  pointer-events: none;
}

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

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

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

.hero__tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.05;
  max-width: 16ch;
  margin-bottom: var(--space-6);
}

.hero__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
  min-height: 44px;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

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

/* ========================================
   Services Section
   ======================================== */

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

.section-header {
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

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

.section-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.section-desc {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 52ch;
}

/* Services grid: 1 large + 1 large stacked, then 2 smaller below */
.services__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: 1fr 1fr;
  }
  .service-card--wide {
    grid-column: 1 / -1;
  }
  .service-card--wide .service-card__items {
    columns: 2;
    column-gap: var(--space-8);
  }
}

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

.service-card:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  box-shadow: var(--shadow-md);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

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

.service-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

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

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

.service-card__items li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.55em;
}

/* ========================================
   Process Section
   ======================================== */

.process {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.process__steps {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  counter-reset: step-counter;
}

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

.process-step {
  counter-increment: step-counter;
  position: relative;
}

.process-step__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.process-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.process-step p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Connector line on desktop */
@media (min-width: 768px) {
  .process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.2rem;
    right: calc(-1 * var(--space-2));
    width: calc(var(--space-4));
    height: 1px;
    background: var(--color-divider);
  }
}

/* ========================================
   About Section
   ======================================== */

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

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

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

.about__text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.about__text p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

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

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}

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

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

.contact__info h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.contact__info > p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
}

.contact-item:hover {
  color: var(--color-primary);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Contact Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

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

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8994' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

/* ========================================
   Footer
   ======================================== */

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

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  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-4);
  list-style: none;
}

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

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

/* ========================================
   Scroll Animations
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
