/* ══════════════════════════════════════════
   SWARMATIC — styles.css
   Master stylesheet for all pages
   ══════════════════════════════════════════ */

:root {
  --bg: #f4f1ec;
  --bg-warm: #ece8e1;
  --ink: #1a1a2e;
  --ink-light: #3a3a52;
  --muted: #9a9690;
  --accent: #2d5a3d;
  --accent-light: rgba(45,90,61,0.08);
  --accent-hover: #3d7a53;
  --rule: rgba(26,26,46,0.1);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ══════════════════════════════════════════
   NAV
   ══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 4rem;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}

.logo {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

a.logo { text-decoration: none; color: var(--ink); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.nav-links a:hover { opacity: 1; }

/* ── Language Toggle ── */
.lang-toggle {
  display: flex;
  align-items: center;
  user-select: none;
}

.lang-toggle button {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.lang-toggle button.active { opacity: 1; }
.lang-toggle button:hover { opacity: 0.7; }

.lang-divider {
  width: 1px;
  height: 12px;
  background: var(--ink);
  opacity: 0.2;
}

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8rem 4rem 6rem;
  position: relative;
  text-align: center;
}

.hero-ornament {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  opacity: 0.06;
  pointer-events: none;
}

.hero-ornament canvas { width: 100%; height: 100%; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeUp 1s ease 0.2s forwards;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.4s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--ink);
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 1s ease 0.7s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.1s forwards;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollPulse 2.5s ease infinite;
}

/* ══════════════════════════════════════════
   SECTIONS (shared)
   ══════════════════════════════════════════ */
.section {
  padding: 8rem 4rem;
  position: relative;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5rem;
  text-align: center;
}

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-intro .eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.section-intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.section-intro p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--rule);
  margin: 0 auto;
}

/* ══════════════════════════════════════════
   PRINCIPLES
   ══════════════════════════════════════════ */
.principle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
}

.principle-card {
  padding: 3.5rem 3rem;
  position: relative;
  cursor: default;
  transition: background 0.5s ease;
}

.principle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
}

.principle-card:nth-child(odd)::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

.principle-card:hover {
  background: var(--accent-light);
}

.principle-number {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: block;
}

.principle-card h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.principle-subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-light);
  margin-bottom: 1.25rem;
}

.principle-card p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 320px;
}

/* ══════════════════════════════════════════
   MANIFESTO
   ══════════════════════════════════════════ */
.manifesto {
  padding: 10rem 4rem;
  display: flex;
  justify-content: center;
  text-align: center;
  position: relative;
  background: var(--bg-warm);
}

.manifesto-text {
  max-width: 660px;
}

.manifesto-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

.manifesto-text h2 em {
  font-style: italic;
  color: var(--accent);
}

.manifesto-text p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   ARCHITECTURE
   ══════════════════════════════════════════ */
.architecture {
  padding: 8rem 4rem;
  position: relative;
}

.arch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}

.arch-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-warm);
  border-radius: 4px;
}

.arch-visual canvas { width: 100%; height: 100%; }

.arch-content { padding-top: 0; }

.arch-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.25;
  margin-bottom: 3rem;
  letter-spacing: -0.015em;
}

.arch-features {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.arch-feature {
  padding-left: 2rem;
  border-left: 1px solid var(--rule);
  transition: border-color 0.4s ease;
}

.arch-feature:hover {
  border-left-color: var(--accent);
}

.arch-feature h4 {
  font-weight: 500;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.arch-subtitle {
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
}

.arch-feature p:last-child {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════ */
.cta-section {
  padding: 10rem 4rem;
  text-align: center;
  position: relative;
  background: var(--ink);
  color: var(--bg);
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 3rem;
  border: 1px solid rgba(244,241,236,0.3);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
  background: transparent;
}

.cta-button:hover {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
  padding-right: 3.5rem;
}

.cta-button svg {
  width: 14px;
  height: 14px;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.cta-button:hover svg { transform: translateX(4px); }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  padding: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.footer-logo {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.footer-links a:hover { opacity: 1; }

.footer-right p {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════
   TEAM PAGE
   ══════════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3.5rem;
  max-width: 960px;
  margin: 0 auto;
}

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

.team-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  margin: 0 auto 1.5rem;
  display: block;
  background: rgba(128,128,128,0.08);
  border: 1px solid var(--rule);
}

.team-photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.team-member h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.team-role {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.team-bio {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 300px;
  margin: 0 auto;
}

.team-links {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.team-links a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.team-links a:hover { opacity: 1; }

/* ══════════════════════════════════════════
   PRODUCTS PAGE
   ══════════════════════════════════════════ */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.product-card {
  padding: 3rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.product-card:hover {
  border-color: rgba(45,90,61,0.25);
  background: var(--accent-light);
}

.product-status {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: block;
}

.product-card h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.product-card p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.product-card .text-link {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.product-card .text-link:hover { opacity: 0.7; }

.product-placeholder {
  padding: 3rem;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════
   IMPRESSUM / LEGAL PAGE
   ══════════════════════════════════════════ */
.legal-content {
  max-width: 640px;
  margin: 0 auto;
}

.legal-content h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.legal-content h3:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ══════════════════════════════════════════
   i18n TRANSITIONS
   ══════════════════════════════════════════ */
[data-i18n] { transition: opacity 0.3s ease; }
.lang-fade { opacity: 0 !important; }

/* ══════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}

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

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  nav { padding: 1.5rem 2rem; }
  .nav-links { display: none; }
  .hero { padding: 6rem 2rem 4rem; }
  .section { padding: 5rem 2rem; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-card:nth-child(odd)::after { display: none; }
  .manifesto { padding: 6rem 2rem; }
  .arch-row { grid-template-columns: 1fr; gap: 3rem; }
  .architecture { padding: 5rem 2rem; }
  .cta-section { padding: 6rem 2rem; }
  footer { padding: 3rem 2rem; flex-direction: column; gap: 2rem; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 1rem; }
  .product-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}
