/* ==========================================================================
   Kowaa Labs — Design System & Styles
   Earthy tones, minimalist layout, Igbo cultural line-art motifs
   ========================================================================== */

/* --- Google Fonts loaded in HTML --- */

/* ==========================================================================
   1. CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Earthy Palette */
  --stone:      #E8E2D8;
  --clay:       #D4C5B0;
  --terracotta: #B85C3A;
  --ochre:      #C6923A;
  --indigo:     #2C3E6B;
  --earth:      #3D2E1F;
  --ash:        #6B6358;
  --white:      #FAF8F5;
  --sand:       #F2EDE6;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing Scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  3rem;
  --space-xl:  5rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-width: 960px;
  --nav-height: 64px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.4s;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-md));
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--earth);
  background-color: var(--stone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

a:hover {
  color: var(--ochre);
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--earth);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  max-width: 65ch;
}

.text-ash {
  color: var(--ash);
}

.font-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   4. LAYOUT CONTAINERS
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

section {
  padding-block: var(--space-xl);
}

/* ==========================================================================
   5. NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(232, 226, 216, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 46, 31, 0.08);
  transition: background var(--duration) var(--ease-out);
}

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

.nav__wordmark {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--earth);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav__wordmark:hover {
  color: var(--terracotta);
}

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

.nav__link {
  font-size: 0.9rem;
  color: var(--ash);
  text-decoration: none;
  position: relative;
  transition: color var(--duration) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--terracotta);
  transition: width var(--duration) var(--ease-out);
}

.nav__link:hover {
  color: var(--earth);
}

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

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav__toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--earth);
  margin-block: 5px;
  transition: all 0.3s var(--ease-out);
  border-radius: 2px;
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--space-lg));
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Subtle warm gradient wash like zukwo.com hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    165deg,
    rgba(200, 190, 175, 0.3) 0%,
    transparent 50%,
    rgba(184, 92, 58, 0.04) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--terracotta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.hero__title {
  margin-bottom: var(--space-md);
}

.hero__title em {
  font-style: italic;
  color: var(--terracotta);
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ash);
  max-width: 52ch;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--terracotta);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1.5px solid var(--terracotta);
  transition: all var(--duration) var(--ease-out);
}

.hero__cta:hover {
  color: var(--ochre);
  border-color: var(--ochre);
  padding-right: 0.5rem;
}

.hero__cta-arrow {
  transition: transform var(--duration) var(--ease-out);
}

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

/* ==========================================================================
   7. ULI DIVIDER — Igbo-inspired geometric line art
   ========================================================================== */
.uli-divider {
  width: 100%;
  padding-block: var(--space-sm);
  overflow: hidden;
}

.uli-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   8. SERVICES SECTION
   ========================================================================== */
.services {
  background: var(--sand);
  position: relative;
}

/* Subtle Igbo compound wall pattern — repeating horizontal lines */
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(61, 46, 31, 0.03) 80px,
      rgba(61, 46, 31, 0.03) 81px
    );
  pointer-events: none;
}

.services__header {
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--terracotta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  display: block;
}

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

.service-card {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  border: 1px solid rgba(61, 46, 31, 0.08);
  border-radius: 2px;
  background: var(--white);
  transition: all var(--duration) var(--ease-out);
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--terracotta);
  transition: height var(--duration) var(--ease-out);
}

.service-card:hover {
  border-color: rgba(184, 92, 58, 0.15);
  box-shadow: 0 4px 20px rgba(61, 46, 31, 0.06);
}

.service-card:hover::before {
  height: 100%;
}

.service-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.service-card__desc {
  font-size: 0.92rem;
  color: var(--ash);
  line-height: 1.65;
}

/* ==========================================================================
   9. PORTFOLIO / WORKS SECTION
   ========================================================================== */
.works {
  position: relative;
}

.works__header {
  margin-bottom: var(--space-lg);
}

.work-item {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-lg);
  align-items: start;
  padding-block: var(--space-lg);
  border-bottom: 1px solid rgba(61, 46, 31, 0.1);
}

.work-item:last-child {
  border-bottom: none;
}

.work-item__header {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.work-item__name {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.work-item__badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--terracotta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-item__desc {
  font-size: 0.95rem;
  color: var(--ash);
  margin-bottom: var(--space-md);
  line-height: 1.75;
}

.work-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.work-item__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--earth);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(61, 46, 31, 0.25);
  transition: all var(--duration) var(--ease-out);
}

.work-item__link:hover {
  color: var(--terracotta);
  text-decoration-color: var(--terracotta);
}

/* ==========================================================================
   10. ABOUT SECTION
   ========================================================================== */
.about {
  background: var(--sand);
  position: relative;
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about__text p {
  margin-bottom: var(--space-sm);
  color: var(--ash);
  font-size: 0.95rem;
  line-height: 1.8;
}

.about__text p:first-of-type {
  color: var(--earth);
  font-size: 1.05rem;
}

.about__details {
  padding-top: var(--space-xs);
}

.about__detail-group {
  margin-bottom: var(--space-md);
}

.about__detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--terracotta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: block;
}

.about__detail-value {
  font-size: 0.95rem;
  color: var(--earth);
  line-height: 1.6;
}

.about__detail-value a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 92, 58, 0.3);
}

/* Nsibidi-inspired decorative mark */
.nsibidi-mark {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 0.5rem;
  opacity: 0.6;
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
.footer {
  padding-block: var(--space-lg);
  border-top: 1px solid rgba(61, 46, 31, 0.1);
}

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

.footer__copy {
  font-size: 0.85rem;
  color: var(--ash);
}

.footer__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--ash);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

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

.footer__separator {
  color: var(--clay);
  font-size: 0.75rem;
}

/* ==========================================================================
   12. SCROLL ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

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

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; opacity: 1; transform: translateY(0); }

/* ==========================================================================
   13. RESPONSIVE — TABLET
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(232, 226, 216, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-xs);
    border-bottom: 1px solid rgba(61, 46, 31, 0.08);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    font-size: 1.1rem;
    padding: var(--space-xs) 0;
  }

  .nav__toggle {
    display: block;
  }

  /* Toggle animation */
  .nav__toggle.is-active .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.is-active .nav__toggle-line:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle.is-active .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

  .work-item {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .work-item__header {
    position: static;
  }

  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ==========================================================================
   14. RESPONSIVE — MOBILE
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --space-xl: 2.5rem;
    --space-lg: 2rem;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-md));
    padding-bottom: var(--space-lg);
  }

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