/* ============================================
   Cai Mi — Amber Ink Design System
   Site #6 — Pure Typography, Cycle, Minimal
   ============================================ */

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

:root {
  --amber: #b45309;
  --amber-light: #d97706;
  --amber-pale: #fef3c7;
  --cream: #fefce8;
  --slate-900: #0f172a;
  --white: #ffffff;
  --text-primary: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --border-light: #e7e5e4;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
  --max-narrow: 720px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--amber);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--amber-light);
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* --- Section Helpers --- */
section {
  padding: 6rem 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 560px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
}

.btn-primary:hover {
  background: var(--amber-light);
  border-color: var(--amber-light);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--slate-900);
  border-color: var(--slate-900);
}

.btn-outline:hover {
  background: var(--slate-900);
  color: var(--white);
}

.btn-full {
  width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--slate-900);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
}

.logo:hover {
  color: var(--slate-900);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--amber);
  color: var(--white);
  font-weight: 900;
  font-size: 1.1rem;
}

.logo-text {
  letter-spacing: -0.02em;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-list a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width 0.2s;
}

.nav-list a:hover {
  color: var(--amber);
}

.nav-list a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 101;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--slate-900);
  transition: all 0.3s;
  position: absolute;
}

.hamburger {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger::before {
  content: '';
  top: -6px;
}

.hamburger::after {
  content: '';
  top: 6px;
}

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================
   HERO — Pure Typography
   ============================================ */
.hero {
  padding: 4rem 0 5rem;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: var(--white);
}

.hero-accent-line {
  width: 3rem;
  height: 3px;
  background: var(--amber-light);
  margin-bottom: 1.5rem;
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--slate-900);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   SERVICES — 3-Column Icon Grid + Inline Stats
   ============================================ */
.services {
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
}

.service-card {
  border-top: 2px solid var(--amber-pale);
  padding-top: 1.5rem;
}

.service-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.service-metric {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--amber-pale);
  padding: 0.2rem 0.65rem;
  border-radius: 0.25rem;
}

/* ============================================
   ABOUT — Team/History Split
   ============================================ */
.about {
  background: var(--white);
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-subheading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.25rem;
}

.about-story p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-story p:last-child {
  margin-bottom: 0;
}

.about-divider {
  background: var(--border-light);
  height: 100%;
  min-height: 200px;
}

/* Milestones */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.milestone {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.milestone-year {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 3.5rem;
}

.milestone-event {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   INDUSTRIES — 4-Column Icon Grid
   ============================================ */
.industries {
  background: var(--cream);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
}

.industry-item {
  text-align: left;
}

.industry-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.industry-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.3rem;
}

.industry-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   APPROACH — Hexagon/Cycle Diagram
   ============================================ */
.approach {
  background: var(--white);
  text-align: center;
}

.approach .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.cycle-diagram {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
}

.cycle-node-top {
  margin-bottom: 0;
}

.cycle-node-inner {
  text-align: center;
  max-width: 280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  background: var(--white);
  border: 2px solid var(--amber-pale);
  border-radius: 1rem;
  position: relative;
  z-index: 2;
}

.cycle-number {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.cycle-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.4rem;
}

.cycle-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cycle-connectors {
  margin: -0.5rem 0;
  position: relative;
  z-index: 1;
}

.cycle-svg {
  width: 100%;
  height: auto;
  max-width: 600px;
}

.cycle-bottom-row {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: -0.5rem;
}

.cycle-node-left,
.cycle-node-right {
  flex: 0 0 auto;
}

.cycle-note {
  margin-top: 2rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
}

/* ============================================
   CONTACT — Inline Minimal
   ============================================ */
.contact {
  background: var(--white);
}

.contact .section-title {
  text-align: center;
}

.contact .section-label {
  text-align: center;
}

.contact-form {
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.form-input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.3rem;
  min-height: 0;
}

.contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.contact-info-item {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-info-item strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.contact-info-item a {
  color: var(--amber);
  font-weight: 500;
}

.contact-separator {
  color: var(--border-light);
  font-size: 1.2rem;
}

/* ============================================
   CTA — Social Proof with Links
   ============================================ */
.cta {
  background: var(--cream);
  text-align: center;
  padding: 5rem 0;
}

.cta-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 2rem;
}

.cta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.cta-badge:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.cta-link {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--amber);
  position: relative;
  padding-bottom: 2px;
}

.cta-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--amber-light);
  transition: transform 0.2s;
  transform: scaleX(0);
  transform-origin: left;
}

.cta-link:hover {
  color: var(--amber-light);
}

.cta-link:hover::after {
  transform: scaleX(1);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-logo:hover {
  color: var(--white);
}

.footer-tagline {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--amber-light);
}

.footer-info {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-info p {
  margin-bottom: 0.3rem;
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: #64748b;
}

/* ============================================
   LEGAL PAGES — Privacy & Terms
   ============================================ */
.legal-doc {
  padding: 4rem 0 6rem;
}

.legal-title {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.legal-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.legal-section {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}

.legal-section:hover {
  border-left-color: var(--amber);
}

.legal-section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.4rem;
}

.legal-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.legal-section ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-section ul li {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.legal-address {
  font-style: normal;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.legal-address a {
  color: var(--amber);
}

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

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

/* ============================================
   RESPONSIVE — Mobile First
   ============================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }

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

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

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Header */
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    transition: right 0.3s ease;
    z-index: 100;
  }

  .nav-list.active {
    right: 0;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 3rem 0 4rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* About */
  .about-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-divider {
    display: none;
  }

  /* Industries */
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }

  /* Approach */
  .cycle-bottom-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: -0.5rem;
  }

  .cycle-connectors {
    display: none;
  }

  .cycle-node-inner {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .cycle-node-top .cycle-node-inner::after {
    content: '↓';
    display: block;
    text-align: center;
    font-size: 1.5rem;
    color: var(--amber-light);
    margin-top: 0.75rem;
  }

  .cycle-node-left .cycle-node-inner::after {
    content: '↓';
    display: block;
    text-align: center;
    font-size: 1.5rem;
    color: var(--amber-light);
    margin-top: 0.75rem;
  }

  .cycle-node-right .cycle-node-inner::after {
    content: '⟳';
    display: block;
    text-align: center;
    font-size: 1.5rem;
    color: var(--amber-light);
    margin-top: 0.75rem;
  }

  /* Contact */
  .contact-info {
    flex-direction: column;
    gap: 0.75rem;
  }

  .contact-separator {
    display: none;
  }

  .contact-info-item {
    text-align: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Legal */
  .legal-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .industries-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-heading {
    font-size: 1.4rem;
  }

  .cta-badges {
    gap: 0.5rem;
  }

  .cta-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }
}
