/* style.css — Officialis Design Tokens + Components */

/* ========== DESIGN TOKENS ========== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Font Families */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== LIGHT MODE ========== */
:root, [data-theme="light"] {
  --color-bg:             #f8f9fa;
  --color-surface:        #ffffff;
  --color-surface-2:      #f1f3f5;
  --color-surface-offset: #e9ecef;
  --color-surface-offset-2: #dee2e6;
  --color-surface-dynamic: #ced4da;
  --color-divider:        #dee2e6;
  --color-border:         #ced4da;

  --color-text:           #1a1a2e;
  --color-text-muted:     #6c757d;
  --color-text-faint:     #adb5bd;
  --color-text-inverse:   #f8f9fa;

  --color-primary:        #4A90D9;
  --color-primary-hover:  #3a7bc8;
  --color-primary-active: #2d68b0;
  --color-primary-highlight: #dce8f5;

  --color-error:          #c92a2a;
  --color-success:        #2b8a3e;
  --color-warning:        #e67700;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 240 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 240 / 0.12);

  --logo-filter: none;
  --logo-bg: transparent;
  --logo-padding: 0;
  --logo-radius: 0;
}

/* ========== DARK MODE ========== */
[data-theme="dark"] {
  --color-bg:             #141418;
  --color-surface:        #1c1c22;
  --color-surface-2:      #24242c;
  --color-surface-offset: #2c2c36;
  --color-surface-offset-2: #34343e;
  --color-surface-dynamic: #3c3c48;
  --color-divider:        #2c2c36;
  --color-border:         #3c3c48;

  --color-text:           #e0e0e6;
  --color-text-muted:     #9090a0;
  --color-text-faint:     #606070;
  --color-text-inverse:   #141418;

  --color-primary:        #6BABEE;
  --color-primary-hover:  #5899de;
  --color-primary-active: #4A90D9;
  --color-primary-highlight: #1e2a3a;

  --color-error:          #ff6b6b;
  --color-success:        #51cf66;
  --color-warning:        #ffa94d;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);

  --logo-filter: none;
  --logo-bg: rgba(255,255,255,0.95);
  --logo-padding: 4px 8px;
  --logo-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141418;
    --color-surface:        #1c1c22;
    --color-surface-2:      #24242c;
    --color-surface-offset: #2c2c36;
    --color-surface-offset-2: #34343e;
    --color-surface-dynamic: #3c3c48;
    --color-divider:        #2c2c36;
    --color-border:         #3c3c48;
    --color-text:           #e0e0e6;
    --color-text-muted:     #9090a0;
    --color-text-faint:     #606070;
    --color-text-inverse:   #141418;
    --color-primary:        #6BABEE;
    --color-primary-hover:  #5899de;
    --color-primary-active: #4A90D9;
    --color-primary-highlight: #1e2a3a;
    --color-error:          #ff6b6b;
    --color-success:        #51cf66;
    --color-warning:        #ffa94d;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
    --logo-filter: none;
    --logo-bg: rgba(255,255,255,0.95);
    --logo-padding: 4px 8px;
    --logo-radius: 4px;
  }
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: var(--space-6);
}

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

section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ========== HEADER / NAV ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

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

.header__logo {
  height: 28px;
  width: auto;
  filter: var(--logo-filter, none);
  background: var(--logo-bg, transparent);
  padding: var(--logo-padding, 0);
  border-radius: var(--logo-radius, 0);
  transition: filter var(--transition-interactive);
}

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

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color var(--transition-interactive);
}

.header__nav a:hover {
  color: var(--color-text);
}

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

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-interactive), opacity var(--transition-interactive);
}

.hamburger.active span:first-child {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 49;
  padding: calc(var(--space-16) + var(--space-8)) var(--space-6) var(--space-8);
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
  font-family: var(--font-display);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .header__actions .btn--primary {
    display: none;
  }
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive),
              background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-faint);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary-highlight);
}

.btn--large {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-sm);
}

/* ========== SECTION LABEL ========== */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.section-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* ========== HERO ========== */
.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__content {
  max-width: 540px;
}

.hero__logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-8);
  filter: var(--logo-filter, none);
  background: var(--logo-bg, transparent);
  padding: var(--logo-padding, 0);
  border-radius: var(--logo-radius, 0);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.1;
}

.hero__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 48ch;
}

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

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

.hero__visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

@media (max-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hero__visual {
    order: -1;
  }
  .hero__visual svg {
    max-width: 280px;
  }
}

/* ========== WHAT WE DO ========== */
.what-we-do {
  background: var(--color-surface);
}

.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

.problem-solution__block h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.problem-solution__block p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.problem-solution__visual {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

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

@media (max-width: 768px) {
  .problem-solution {
    grid-template-columns: 1fr;
  }
}

/* ========== CAPABILITIES ========== */
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.cap-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: box-shadow var(--transition-interactive),
              border-color var(--transition-interactive);
}

.cap-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-highlight);
}

.cap-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.cap-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.cap-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

/* ========== MARKET ========== */
.market {
  background: var(--color-surface);
}

.market__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  margin-top: var(--space-8);
}

.market__stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stat-item {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-4);
}

.stat-item__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  line-height: 1.2;
}

.stat-item__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  line-height: 1.5;
}

.market__analysis {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.market__analysis p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-divider);
}

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

/* ========== TEAM ========== */
.team__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.team-card {
  text-align: center;
}

.team-card__photo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin: 0 auto var(--space-3);
  border: 2px solid var(--color-border);
}

.team-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.team-card__name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.team-card__role {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.team-card__bio {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 32ch;
  margin: 0 auto;
}

.advisory {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

.advisory__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  text-align: center;
  font-weight: 600;
}

.advisory__list {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.advisory__item {
  text-align: center;
}

.advisory__name {
  font-size: var(--text-sm);
  font-weight: 500;
}

.advisory__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .team__grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ========== CTA ========== */
.cta-section {
  background: var(--color-surface);
  text-align: center;
}

.cta-section__content {
  max-width: 540px;
  margin: 0 auto;
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.cta-section__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.cta-section__logo {
  height: 32px;
  width: auto;
  margin: var(--space-8) auto 0;
  filter: var(--logo-filter, none);
  background: var(--logo-bg, transparent);
  padding: var(--logo-padding, 0);
  border-radius: var(--logo-radius, 0);
  opacity: 0.5;
}

/* ========== FOOTER ========== */
.footer {
  padding: var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-divider);
  text-align: center;
}

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

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

.footer__copy a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__copy a:hover {
  color: var(--color-text);
}

.footer__attribution {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__attribution a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__attribution a:hover {
  color: var(--color-text-muted);
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ========== SVG ILLUSTRATIONS ========== */
.svg-illustration {
  color: var(--color-text);
}

.svg-illustration .accent {
  color: var(--color-primary);
}
