/* ============================================
   TACANNI — Design System
   Dark Executive Aesthetic
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-elevated: #1e1e2a;

  --gold: #c8a55c;
  --gold-light: #dfc07a;
  --gold-dark: #a8883e;
  --gold-subtle: rgba(200, 165, 92, 0.1);
  --gold-glow: rgba(200, 165, 92, 0.15);

  --text-primary: #f0f0f0;
  --text-secondary: #9a9aaa;
  --text-muted: #5a5a6e;
  --text-inverse: #0a0a0f;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(200, 165, 92, 0.3);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-hero: clamp(3rem, 8vw, 6rem);
  --fs-h1: clamp(2rem, 4vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.1rem, 2vw, 1.5rem);
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 900;

  --lh-tight: 1.1;
  --lh-normal: 1.6;
  --lh-relaxed: 1.8;

  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-hero: 0.12em;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-section: clamp(4rem, 10vw, 8rem);

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --nav-height: 72px;

  /* Effects */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(200, 165, 92, 0.08);

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-hero);
  text-transform: uppercase;
  color: var(--text-primary);
}

.hero-title .gold { color: var(--gold); }

.section-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 640px;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-section) 0;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-primary);
}

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

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

.nav__link {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-inverse);
  background: var(--gold);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.nav__cta:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 165, 92, 0.3);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 2px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  padding: 16px 36px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn--primary {
  background: var(--gold);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 165, 92, 0.3);
}

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

.btn--outline:hover {
  background: var(--gold-subtle);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 0;
}

.btn--ghost:hover { color: var(--gold); }

.btn--ghost .arrow {
  transition: transform var(--transition-base);
}

.btn--ghost:hover .arrow {
  transform: translateX(4px);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

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

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-subtle);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

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

.hero__bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -25%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero__subtitle {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 600px;
  line-height: var(--lh-relaxed);
}

.hero__cta-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* --- Metrics Bar --- */
.metrics {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metrics__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
}

.metric {
  text-align: center;
}

.metric__value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--fw-bold);
  color: var(--gold);
  letter-spacing: var(--ls-tight);
}

.metric__label {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* --- Divider --- */
.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: var(--space-md) 0;
}

.divider--center { margin: var(--space-md) auto; }

/* --- Testimonials --- */
.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  position: relative;
}

.testimonial__quote {
  font-size: var(--fs-body-lg);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-md);
}

.testimonial__quote::before {
  content: '"';
  font-size: 3rem;
  color: var(--gold);
  font-family: Georgia, serif;
  line-height: 1;
  display: block;
  margin-bottom: var(--space-sm);
}

.testimonial__author {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.testimonial__role {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

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

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.form__input,
.form__textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: var(--fs-body);
  transition: all var(--transition-base);
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-muted);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

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

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

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

.footer__link {
  font-size: var(--fs-small);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover { color: var(--gold); }

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

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.footer__social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Industry Tags --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-md);
}

.tag {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  transition: all var(--transition-base);
}

.tag:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

/* --- Accordion (Tools page) --- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion__item {
  border-bottom: 1px solid var(--border);
}

.accordion__item:last-child { border-bottom: none; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  transition: all var(--transition-base);
  text-align: left;
}

.accordion__trigger:hover {
  background: var(--bg-card-hover);
}

.accordion__icon {
  font-size: 1.25rem;
  color: var(--gold);
  transition: transform var(--transition-base);
}

.accordion__item.open .accordion__icon {
  transform: rotate(45deg);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.accordion__body {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* --- Calculator --- */
.calc__input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc__input-group label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.calc__input-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  outline: none;
}

.calc__input-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(200, 165, 92, 0.4);
}

.calc__value {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--gold);
  text-align: right;
}

.calc__results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.calc__result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}

.calc__result-value {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--gold);
}

.calc__result-label {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    gap: var(--space-sm);
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .metrics__inner {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .metric { flex: 1; min-width: 120px; }

  .hero-title { letter-spacing: var(--ls-wide); }

  .hero__cta-group { flex-direction: column; align-items: flex-start; }

  .form__row { grid-template-columns: 1fr; }

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

  .calc__results { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }

  .container { padding: 0 var(--space-md); }

  .testimonial { padding: var(--space-lg); }

  /* Fix card rendering on mobile */
  .card {
    padding: var(--space-md);
  }

  .card__title {
    font-size: 1.25rem;
  }

  .card__text {
    font-size: var(--fs-small);
    line-height: var(--lh-normal);
  }

  /* Fix button text wrapping on narrow screens */
  .btn {
    padding: 14px 24px;
    font-size: var(--fs-small);
    white-space: nowrap;
  }

  .card .btn {
    white-space: normal;
    text-align: center;
  }
}
