/*
 * percipiocompany.com — main.css
 * Version: 1.0.0
 * Upload to: public_html/assets/css/main.css
 *
 * CONTENTS:
 * 1. Design Tokens
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout Utilities
 * 5. Navigation
 * 6. Hero
 * 7. Section Patterns
 * 8. Buttons
 * 9. Cards
 * 10. Ticker
 * 11. Footer
 * 12. Cookie Banner
 * 13. Animations
 * 14. Responsive
 * 15. Accessibility
 */

/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {
  /* Brand colors */
  --teal:          #76b3b8;
  --teal-deep:     #1d3739;
  --teal-mid:      #2b5053;
  --teal-rich:     #3f7579;
  --teal-light:    #eaf4f4;
  --complement:    #b87b76;
  --warm:          #b89c76;

  /* Canvas colors */
  --stone:         #F4F2ED;
  --stone-mid:     #E8E4DC;
  --ink:           #122e31;
  --ink-deep:      #0e1a1b;
  --slate:         #4a6467;

  /* Rule colors */
  --rule-dark:     rgba(118,179,184,0.2);
  --rule-light:    rgba(29,55,57,0.12);

  /* Type scale */
  --text-xs:       0.75rem;
  --text-sm:       0.875rem;
  --text-base:     1rem;
  --text-lg:       1.125rem;
  --text-xl:       1.25rem;
  --text-2xl:      1.5rem;
  --text-3xl:      2rem;
  --text-4xl:      2.8rem;
  --text-5xl:      4rem;
  --text-hero:     clamp(3rem, 5.5vw, 5.5rem);

  /* Spacing scale */
  --space-1:       0.25rem;
  --space-2:       0.5rem;
  --space-3:       0.75rem;
  --space-4:       1rem;
  --space-6:       1.5rem;
  --space-8:       2rem;
  --space-12:      3rem;
  --space-16:      4rem;
  --space-24:      6rem;
  --space-32:      8rem;

  /* Layout */
  --max-width:     1200px;
  --nav-height:    88px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Shadows */
  --shadow-teal-sm:    0 4px 16px rgba(118,179,184,0.2);
  --shadow-teal-md:    0 8px 32px rgba(118,179,184,0.3);
  --shadow-teal-lg:    0 16px 64px rgba(118,179,184,0.4);
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

/* Display — Cormorant Garamond */
.display-xl {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.display-lg {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: var(--text-5xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display-md {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display-sm {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: 1.2;
}

/* Eyebrow label */
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Body text */
.body-lg {
  font-size: var(--text-lg);
  line-height: 1.8;
}

.body-base {
  font-size: var(--text-base);
  line-height: 1.8;
}

.body-sm {
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* Italic emphasis */
em { font-style: italic; }

/* Color utilities */
.text-teal    { color: var(--teal); }
.text-copper  { color: var(--complement); }
.text-slate   { color: var(--slate); }
.text-stone   { color: var(--stone); }
.text-ink     { color: var(--ink); }

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-16);
}

.section-light {
  background: var(--stone);
  padding: var(--space-32) 0;
}

.section-white {
  background: #ffffff;
  padding: var(--space-32) 0;
}

.section-dark {
  background: var(--ink);
  padding: var(--space-32) 0;
  color: var(--stone);
}

.section-deep {
  background: var(--ink-deep);
  padding: var(--space-32) 0;
  color: var(--stone);
}

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

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

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

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

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

/* ============================================
   5. NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  padding: 0 var(--space-16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--stone);
  border-bottom: 1px solid var(--rule-light);
  box-shadow: 0 2px 24px rgba(14,26,27,0.08);
}

.nav-logo img {
  height: 68px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.nav-links a {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 400;
  transition: color var(--transition-fast);
}

.nav-links a:hover { color: var(--teal); }

.nav-cta {
  background: var(--teal-deep) !important;
  color: var(--stone) !important;
  padding: 0.65rem 1.5rem;
  font-weight: 500 !important;
  transition: background var(--transition-fast) !important;
}

.nav-cta:hover { background: var(--complement) !important; }

/* Hamburger — mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--teal-deep);
  transition: all var(--transition-base);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--stone);
  padding: var(--space-8) var(--space-8);
  border-bottom: 1px solid var(--rule-light);
  flex-direction: column;
  gap: var(--space-4);
  z-index: 99;
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule-light);
}

/* ============================================
   6. HERO
   ============================================ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hero-left {
  padding: var(--space-24) var(--space-12) var(--space-24) var(--space-16);
}

.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

.hero-eyebrow {
  color: var(--teal);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--teal);
  flex-shrink: 0;
}

.hero-statement {
  color: var(--stone);
  margin-bottom: var(--space-4);
}

.hero-statement .accent {
  font-style: italic;
  color: var(--teal);
}

.hero-trademark {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: rgba(244,242,237,0.4);
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.hero-divider {
  width: 48px;
  height: 1px;
  background: var(--teal-rich);
  margin-bottom: var(--space-8);
}

.hero-body {
  color: rgba(244,242,237,0.65);
  max-width: 460px;
  margin-bottom: var(--space-12);
}

.hero-body strong { color: var(--stone); font-weight: 400; }

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================
   7. SECTION PATTERNS
   ============================================ */

/* Section label */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-rich);
  margin-bottom: var(--space-6);
}

.section-label-light {
  color: var(--teal);
}

/* Pathway number */
.pathway-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--rule-light);
  margin-bottom: var(--space-4);
}

.pathway-number-dark {
  color: var(--rule-dark);
}

/* Horizontal rule */
.rule { width: 100%; height: 1px; }
.rule-light { background: var(--rule-light); }
.rule-dark  { background: var(--rule-dark); }

/* Stat block */
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-5xl);
  font-weight: 400;
  line-height: 1;
  color: var(--stone);
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.45);
  margin-top: var(--space-1);
}

/* Scroll reveal — hidden by default, JS adds .visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ============================================
   8. BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.85rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--teal);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--complement);
  color: var(--stone);
}

.btn-dark {
  background: var(--teal-deep);
  color: var(--stone);
}

.btn-dark:hover {
  background: var(--complement);
  color: var(--stone);
}

.btn-ghost-light {
  border: 1px solid rgba(118,179,184,0.4);
  color: rgba(244,242,237,0.75);
  background: transparent;
}

.btn-ghost-light:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-ghost-dark {
  border: 1px solid var(--rule-light);
  color: var(--teal-deep);
  background: transparent;
}

.btn-ghost-dark:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ============================================
   9. CARDS
   ============================================ */
.card {
  padding: var(--space-8);
  background: #ffffff;
  border: 1px solid var(--rule-light);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-teal-sm);
}

.card-dark {
  background: var(--teal-mid);
  border-color: var(--rule-dark);
  color: var(--stone);
}

.card-dark:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-teal-md);
}

/* Assessment tool card */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8);
  background: var(--teal-deep);
  color: var(--stone);
  text-decoration: none;
  border: 1px solid var(--rule-dark);
  transition: all var(--transition-base);
}

.tool-card:hover {
  background: var(--teal-mid);
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal-md);
}

.tool-card-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
}

.tool-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.2;
}

.tool-card-desc {
  font-size: var(--text-sm);
  color: rgba(244,242,237,0.65);
  line-height: 1.7;
}

/* Article card */
.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--rule-light);
  text-decoration: none;
  color: var(--ink);
  transition: color var(--transition-fast);
}

.article-card:hover .article-card-title { color: var(--teal-rich); }

.article-card-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}

.article-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.2;
  transition: color var(--transition-fast);
}

.article-card-excerpt {
  font-size: var(--text-sm);
  color: var(--slate);
  line-height: 1.7;
}

/* ============================================
   10. TICKER
   ============================================ */
.ticker-wrap {
  overflow: hidden;
  background: var(--teal);
  padding: 0.9rem 0;
  border-top: 1px solid rgba(118,179,184,0.3);
  border-bottom: 1px solid rgba(118,179,184,0.3);
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: 0 var(--space-8);
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.ticker-dot {
  width: 4px;
  height: 4px;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0.4;
  flex-shrink: 0;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   11. FOOTER
   ============================================ */
.footer {
  background: var(--ink-deep);
  color: var(--stone);
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--rule-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-logo img {
  height: 56px;
  width: auto;
  margin-bottom: var(--space-6);
  opacity: 0.9;
}

.footer-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: var(--text-lg);
  color: rgba(244,242,237,0.55);
  line-height: 1.5;
}

.footer-heading {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(244,242,237,0.55);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--rule-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(244,242,237,0.35);
  letter-spacing: 0.04em;
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  font-size: var(--text-xs);
  color: rgba(244,242,237,0.35);
  transition: color var(--transition-fast);
}

.footer-legal a:hover { color: var(--teal); }

/* ============================================
   12. COOKIE BANNER
   ============================================ */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: rgba(244,242,237,0.85);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.6;
  padding: 1.25rem var(--space-16);
  z-index: 999;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
  border-top: 1px solid var(--rule-dark);
}

#cookie-banner.visible { display: flex; }

#cookie-banner a {
  color: var(--teal);
  margin-left: var(--space-2);
}

.cookie-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ============================================
   13. ANIMATIONS
   ============================================ */
@keyframes brain-float {
  0%, 100% { transform: translateY(0px) rotate(-0.8deg); }
  33%       { transform: translateY(-10px) rotate(0.4deg); }
  66%       { transform: translateY(-5px) rotate(-0.4deg); }
}

@keyframes brain-breathe {
  0%, 100% { filter: drop-shadow(0 8px 32px rgba(118,179,184,0.45)) drop-shadow(0 0 60px rgba(118,179,184,0.2)); }
  50%       { filter: drop-shadow(0 12px 48px rgba(118,179,184,0.7)) drop-shadow(0 0 90px rgba(118,179,184,0.35)); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(0.7); }
}

@keyframes counter-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   14. RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root { --space-16: 2.5rem; }

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

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

@media (max-width: 768px) {
  :root { --space-16: 1.5rem; }

  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-right { height: 60vw; min-height: 280px; }
  .hero-left { padding: var(--space-12) var(--space-6) var(--space-8); }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  #cookie-banner { padding: 1rem var(--space-6); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cookie-actions { flex-direction: column; width: 100%; }
  .cookie-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================
   15. ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

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

@media (prefers-color-scheme: dark) {
  /* Dark mode support — future enhancement */
  /* Currently using brand dark palette throughout */
}
