/* ============================================
   Dr. I. Siva — Design System
   Concept: composite laminate — layered plies,
   woven structure, resin/fiber material palette.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color tokens — natural fiber / resin composite palette */
  --ink: #211f1a;
  --ink-soft: #4a463e;
  --paper: #f7f4ee;
  --paper-deep: #eee8db;
  --ply-green: #2f4438;
  --ply-green-deep: #1c2521;
  --sage: #8a9a8f;
  --resin: #bd6b3e;
  --resin-deep: #9c5430;
  --thread: #d8cfba;
  --thread-deep: #c2b59a;

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.7vw, 1.8rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.9rem + 2vw, 3.6rem);
  --step-5: clamp(3rem, 2.2rem + 3.2vw, 5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  --content-width: 1180px;
  --content-narrow: 760px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ply-green-deep);
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--resin);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--resin-deep);
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--resin-deep);
  display: inline-block;
}

/* ===== Ply divider — the signature element =====
   Represents a laminate cross-section: layered bands
   of varying thickness/opacity, like a microscope
   view of a composite ply stack. Used between sections
   instead of a generic hairline. */

.ply-divider {
  height: 34px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  margin: 0 auto;
  max-width: var(--content-width);
  padding: 0 var(--space-3);
}

.ply-divider span {
  display: block;
  height: 2px;
  border-radius: 1px;
}
.ply-divider span:nth-child(1) { background: var(--thread-deep); width: 100%; }
.ply-divider span:nth-child(2) { background: var(--sage); width: 92%; opacity: 0.7; }
.ply-divider span:nth-child(3) { background: var(--resin); width: 78%; height: 3px; }
.ply-divider span:nth-child(4) { background: var(--thread-deep); width: 100%; opacity: 0.5; }

/* ===== Nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--thread);
}

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

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ply-green-deep);
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}

.brand small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--resin-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 0.2rem 0;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ply-green-deep);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--resin);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--thread-deep);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--thread);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .nav-links.is-open { max-height: 420px; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--paper-deep);
  }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { background: var(--paper-deep); }
}

/* ===== More dropdown ===== */

.nav-more {
  position: relative;
}

.nav-more__label {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.2rem 0;
  user-select: none;
  transition: color 0.2s var(--ease);
}

.nav-more__label { color: var(--ply-green-deep); }

.nav-more__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--thread);
  border-radius: 8px;
  box-shadow: 0 8px 24px -8px rgba(28,37,33,0.2);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 200px;
  z-index: 100;
}

.nav-more.is-open .nav-more__menu { display: block; }

.nav-more__menu li a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.nav-more__menu li a:hover {
  background: var(--paper-deep);
  color: var(--resin-deep);
}

@media (max-width: 760px) {
  .nav-more__label { display: none; }
  .nav-more__menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
  }
  .nav-more__menu li a {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--paper-deep);
  }
}



.site-footer {
  background: var(--ply-green-deep);
  color: var(--thread);
  padding: var(--space-5) 0 var(--space-4);
  margin-top: var(--space-7);
}

.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--resin); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
}

.footer-grid h4 {
  color: var(--paper);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: var(--step--1); }

.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(247, 244, 238, 0.15);
  font-size: var(--step--1);
  color: var(--sage);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  padding: 0.85em 1.5em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn--primary {
  background: var(--ply-green-deep);
  color: var(--paper);
}
.btn--primary:hover { background: var(--resin-deep); }

.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--resin-deep);
  color: var(--resin-deep);
}

/* ===== Shared section spacing ===== */

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

.section-head {
  margin-bottom: var(--space-4);
  max-width: 640px;
}

.section-head h2 {
  font-size: var(--step-3);
  margin-top: var(--space-2);
}

.section-head p {
  color: var(--ink-soft);
  font-size: var(--step-0);
  margin-top: var(--space-2);
}

/* ===== Card ===== */

.card {
  background: #fff;
  border: 1px solid var(--thread);
  border-radius: 10px;
  padding: var(--space-3);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(28, 37, 33, 0.35);
  border-color: var(--thread-deep);
}

/* ===== Stat block ===== */

.stat {
  font-family: var(--font-mono);
}

.stat .num {
  font-size: var(--step-3);
  color: var(--ply-green-deep);
  font-weight: 500;
  display: block;
  line-height: 1;
}

.stat .label {
  font-size: var(--step--1);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.4em;
  display: block;
}

/* ===== Tag / pill ===== */

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25em 0.65em;
  border-radius: 100px;
  background: var(--paper-deep);
  color: var(--ply-green-deep);
  border: 1px solid var(--thread-deep);
}

.tag--resin {
  background: rgba(189, 107, 62, 0.12);
  color: var(--resin-deep);
  border-color: rgba(189, 107, 62, 0.35);
}

/* ===== Reveal on scroll ===== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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