/* ============================================
   Swiss AI Group — Editorial Design System
   ============================================ */

/* Self-hosted Fraunces variable font — no Google Fonts round-trip.
   Latin loads first (preloaded in <head>), latin-ext only fetched when
   the page actually contains Polish/Spanish/etc. extended glyphs. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette — Swiss editorial: cool cream, deep emerald, warm amber */
  --color-bg: #F4F2EC;             /* cool cream, less yellow than Anthropic */
  --color-bg-alt: #EBE7DB;
  --color-bg-section: #DDD8C6;
  --color-bg-dark: #0F1B19;        /* deep emerald-tinted near-black */
  --color-bg-card: #FBFAF5;

  --color-text: #1A1A1C;           /* near-black, slightly cool */
  --color-text-muted: #5C5C5A;
  --color-text-soft: #828079;
  --color-text-inverse: #F4F2EC;

  --color-border: #D6D2C2;
  --color-border-strong: #B8B3A0;
  --color-border-subtle: #E3DFD0;

  --color-accent: #1F5040;         /* deep Swiss emerald */
  --color-accent-hover: #163B30;
  --color-accent-light: #2D7A60;
  --color-accent-soft: #C8D9D0;    /* tinted accent for backgrounds */

  --color-amber: #B68B3A;          /* warm secondary, used sparingly */
  --color-amber-soft: #E9D9B2;

  --color-success: #2D7A60;

  /* Gradients */
  --gradient-hero: radial-gradient(at 25% 25%, rgba(31, 80, 64, 0.05) 0%, transparent 50%),
                   radial-gradient(at 75% 15%, rgba(182, 139, 58, 0.04) 0%, transparent 50%);

  /* Typography */
  --font-serif: 'Fraunces', 'New York', 'Iowan Old Style', 'Charter', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* 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;

  /* Layout */
  --max-width: 1320px;
  --max-width-content: 1100px;
  --max-width-narrow: 720px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(26, 26, 28, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 26, 28, 0.06), 0 2px 4px rgba(26, 26, 28, 0.04);
  --shadow-lg: 0 18px 36px rgba(26, 26, 28, 0.08), 0 6px 12px rgba(26, 26, 28, 0.04);
  --shadow-xl: 0 30px 60px rgba(26, 26, 28, 0.1), 0 12px 24px rgba(26, 26, 28, 0.06);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.15s var(--ease);
  --transition: 0.3s var(--ease);
  --transition-slow: 0.6s var(--ease);

  /* Header */
  --header-height: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  letter-spacing: -0.005em;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* CJK + Khmer font stacks — Fraunces/Latin serifs don't support these scripts */
html[lang="zh"] {
  --font-serif: 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', 'STSong', serif;
  --font-sans:  'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Source Han Sans SC', 'Noto Sans SC', -apple-system, system-ui, sans-serif;
}
html[lang="ja"] {
  --font-serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Source Han Serif JP', 'Noto Serif JP', serif;
  --font-sans:  'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'YuGothic', 'Meiryo', 'Source Han Sans JP', 'Noto Sans JP', -apple-system, system-ui, sans-serif;
}
html[lang="ko"] {
  --font-serif: 'Apple SD Gothic Neo', 'Nanum Myeongjo', 'Source Han Serif KR', 'Noto Serif KR', 'Batang', serif;
  --font-sans:  'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', 'Source Han Sans KR', 'Noto Sans KR', -apple-system, system-ui, sans-serif;
}
html[lang="km"] {
  --font-serif: 'Khmer OS Muol Light', 'Khmer OS', 'Noto Serif Khmer', 'Hanuman', 'Battambang', serif;
  --font-sans:  'Khmer OS', 'Noto Sans Khmer', 'Hanuman', 'Battambang', -apple-system, system-ui, sans-serif;
}
html[lang="zh"] .h-display,
html[lang="zh"] .h1,
html[lang="zh"] .h2,
html[lang="ja"] .h-display,
html[lang="ja"] .h1,
html[lang="ja"] .h2,
html[lang="ko"] .h-display,
html[lang="ko"] .h1,
html[lang="ko"] .h2,
html[lang="km"] .h-display,
html[lang="km"] .h1,
html[lang="km"] .h2 {
  letter-spacing: 0;
  line-height: 1.3;
  font-weight: 500;
}
html[lang="km"] .h-display,
html[lang="km"] .h1,
html[lang="km"] .h2,
html[lang="km"] .h3 {
  line-height: 1.5;
}

::selection {
  background-color: rgba(31, 80, 64, 0.18);
  color: var(--color-text);
  text-shadow: none;
}
::-moz-selection {
  background-color: rgba(31, 80, 64, 0.18);
  color: var(--color-text);
  text-shadow: none;
}

/* ============================================
   Typography — BIG editorial scale
   ============================================ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
  position: relative;
  padding-left: var(--space-5);
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--color-accent);
}

.h-display {
  font-family: var(--font-serif);
  font-size: clamp(3.25rem, 11vw, 9rem);
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--color-text);
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 380;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 380;
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.lead {
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: 56ch;
  letter-spacing: -0.005em;
}

.text-gradient {
  font-style: italic;
  font-weight: 300;
  color: var(--color-accent);
}

.text-muted { color: var(--color-text-muted); }
.text-soft { color: var(--color-text-soft); }

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

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

.section-sm { padding: var(--space-20) 0; }
.section-lg { padding: var(--space-32) 0; }

.section-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}
.section-dark .text-muted { color: #A8A4A0; }
.section-dark .lead { color: #A8A4A0; }
.section-dark .h-display,
.section-dark .h1,
.section-dark .h2 { color: var(--color-text-inverse); }
.section-dark .eyebrow { color: var(--color-amber); }
.section-dark .eyebrow::before { background: var(--color-amber); }

.section-alt { background-color: var(--color-bg-alt); }
.section-card { background-color: var(--color-bg-card); }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.825rem 1.625rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: -0.005em;
  line-height: 1;
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
}
.btn-primary:hover { background-color: #2A2A28; transform: translateY(-1px); }

.btn-accent {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-accent:hover { background-color: var(--color-accent-hover); transform: translateY(-1px); }

.btn-ghost {
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover {
  border-color: var(--color-text);
  background-color: rgba(26, 26, 28, 0.03);
}

.btn-link {
  color: var(--color-text);
  font-weight: 500;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn-link::after {
  content: "→";
  transition: transform var(--transition-fast);
  display: inline-block;
  margin-left: 4px;
}
.btn-link:hover { border-color: var(--color-text); }
.btn-link:hover::after { transform: translateX(4px); }

.btn-lg {
  padding: 1rem 1.875rem;
  font-size: 1rem;
}

.section-dark .btn-ghost {
  color: var(--color-text-inverse);
  border-color: rgba(244, 242, 236, 0.25);
}
.section-dark .btn-ghost:hover {
  border-color: var(--color-text-inverse);
  background-color: rgba(244, 242, 236, 0.05);
}
.section-dark .btn-primary {
  background-color: var(--color-bg);
  color: var(--color-text);
}
.section-dark .btn-primary:hover { background-color: #fff; }

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(244, 242, 236, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(26, 26, 28, 0.06);
  transition: box-shadow var(--transition);
  will-change: box-shadow;
}
.header.is-scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  color: var(--color-text);
  font-variation-settings: "opsz" 144;
}

.logo-mark {
  width: auto;
  height: 26px;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-6);
}
.nav-links a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  font-weight: 400;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a.active { color: var(--color-text); }

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

.lang-switcher { position: relative; }
.lang-button {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 400;
}
.lang-button:hover { background-color: rgba(26, 26, 28, 0.04); color: var(--color-text); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
}
.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.lang-dropdown a:hover { background-color: var(--color-bg-alt); }
.lang-dropdown a.active { color: var(--color-accent); font-weight: 500; }

.mobile-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-sm); }

/* ============================================
   Hero — typography-first, no illustration
   ============================================ */
.hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-32)) 0 var(--space-32);
  overflow: hidden;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 30%, rgba(31, 80, 64, 0.045) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 20%, rgba(182, 139, 58, 0.035) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(31, 80, 64, 0.025) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.hero::after { display: none; }

.hero > .container { position: relative; z-index: 1; }

.hero-content {
  position: relative;
  text-align: left;
  max-width: 1080px;
  margin: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  margin-bottom: var(--space-8);
}
.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-accent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.875rem;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(45, 122, 96, 0.18);
}

.hero h1 {
  margin-bottom: var(--space-10);
  max-width: 18ch;
}

.hero-lead {
  max-width: 540px;
  margin: 0 0 var(--space-12);
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.45;
  color: var(--color-text-muted);
  font-weight: 400;
}

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

/* ============================================
   Trust strip
   ============================================ */
.trust-strip {
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  flex-wrap: wrap;
}

.trust-label {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--color-text-soft);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.trust-badges {
  display: flex;
  gap: var(--space-10);
  flex-wrap: wrap;
  align-items: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.005em;
}
.trust-badge svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ============================================
   Features grid
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  margin-top: var(--space-16);
  background-color: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  padding: var(--space-10) var(--space-8);
  background-color: var(--color-bg);
  transition: background-color var(--transition);
  position: relative;
}
.feature-card:hover { background-color: var(--color-bg-card); }
.feature-card:hover .feature-icon { background: var(--color-accent); color: var(--color-bg); }
.feature-icon { transition: background var(--transition), color var(--transition); }

.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-6);
  color: var(--color-accent);
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-card h3 {
  margin-bottom: var(--space-3);
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: 1.4375rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
}
.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 36ch;
}

/* ============================================
   Section header
   ============================================ */
.section-header {
  text-align: left;
  max-width: 720px;
  margin: 0 0 var(--space-16);
}
.section-header .eyebrow { margin-bottom: var(--space-6); }
.section-header h2 { margin-bottom: var(--space-5); max-width: 18ch; }
.section-header .lead { margin-top: var(--space-2); }

/* ============================================
   Stats
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}
.stat {
  text-align: left;
  border-left: 1px solid rgba(244, 242, 236, 0.15);
  padding-left: var(--space-6);
}
.section:not(.section-dark) .stat {
  border-left-color: var(--color-border);
}
.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 5.5vw, 4rem);
  font-weight: 350;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  font-variation-settings: "opsz" 144;
}
.section-dark .stat-value { color: var(--color-amber); }
.stat-label {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* ============================================
   Product showcase
   ============================================ */
.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  padding: var(--space-16) 0;
}
.product-row.reverse { direction: rtl; }
.product-row.reverse > * { direction: ltr; }
.product-text h3 {
  margin-bottom: var(--space-5);
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variation-settings: "opsz" 96;
}
.product-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.product-visual {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.product-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: 0.9375rem;
}
.product-features svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ============================================
   Code mockup
   ============================================ */
.code-mockup {
  background: #0F1B19;
  color: #E8E5DA;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.code-mockup-header {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-5);
}
.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2A3835;
}
.code-keyword { color: #B68B3A; }
.code-string { color: #A8C8B5; }
.code-comment { color: #828079; font-style: italic; }
.code-fn { color: #D4B07A; }

/* ============================================
   CTA section
   ============================================ */
.cta-section {
  text-align: left;
  padding: var(--space-32) 0;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}
.cta-section .container { position: relative; z-index: 1; max-width: var(--max-width-narrow); }
.cta-section .eyebrow { margin-bottom: var(--space-6); }
.cta-section h2 { margin-bottom: var(--space-8); max-width: 16ch; }
.cta-section .lead { margin-bottom: var(--space-8); }
.cta-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }

.section-dark.cta-section {
  background: var(--color-bg-dark);
  position: relative;
}
.section-dark.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 50%, rgba(31, 80, 64, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(182, 139, 58, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.section-dark.cta-section .container { position: relative; z-index: 1; }

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-20) 0 var(--space-8);
}

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

.footer-brand { max-width: 320px; }
.footer-brand .logo { color: var(--color-text-inverse); margin-bottom: var(--space-4); }
.footer-tagline {
  color: #A8A4A0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: #A8A4A0;
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { color: #DDD8C6; font-size: 0.9375rem; }
.footer-col a:hover { color: var(--color-text-inverse); }

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(244, 242, 236, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: #828079;
  font-size: 0.875rem;
}
.footer-bottom a:hover { color: var(--color-text-inverse); }
.footer-legal { display: flex; gap: var(--space-6); flex-wrap: wrap; }

/* ============================================
   Page header (sub-pages) — bigger too
   ============================================ */
.page-header {
  padding: calc(var(--header-height) + var(--space-20)) 0 var(--space-16);
  background: var(--color-bg);
  position: relative;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
  z-index: 0;
}
.page-header > .container { position: relative; z-index: 1; }
.page-header .lead { max-width: 640px; margin: var(--space-6) 0 0; }
.page-header h1 { font-size: clamp(2.75rem, 9vw, 7rem); }

/* ============================================
   Compliance list
   ============================================ */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}
.compliance-card {
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  transition: border-color var(--transition);
}
.compliance-card:hover { border-color: var(--color-border-strong); }
.compliance-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.compliance-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  flex-shrink: 0;
}
.compliance-card h3 {
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: 1.375rem;
  font-variation-settings: "opsz" 96;
}
.compliance-card p { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.6; }

/* ============================================
   Blog cards — editorial illustrations
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}
.blog-card-image {
  aspect-ratio: 16/10;
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.blog-card:nth-child(3n+1) .blog-card-image { background-image: url('../img/editorial-1.svg'); }
.blog-card:nth-child(3n+2) .blog-card-image { background-image: url('../img/editorial-2.svg'); }
.blog-card:nth-child(3n+3) .blog-card-image { background-image: url('../img/editorial-3.svg'); }

.blog-card-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
  display: flex;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
  font-weight: 400;
}
.blog-card h3 {
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: 1.4375rem;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 96;
}
.blog-card p { font-size: 0.9375rem; color: var(--color-text-muted); margin-bottom: var(--space-4); flex: 1; }
.blog-card-link { font-size: 0.875rem; font-weight: 500; color: var(--color-accent); }

/* ============================================
   Contact form
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-16);
}

.contact-info h3 {
  margin-bottom: var(--space-4);
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: 1.625rem;
  font-variation-settings: "opsz" 96;
}
.contact-info p { color: var(--color-text-muted); margin-bottom: var(--space-8); }
.contact-detail {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.contact-detail-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.contact-detail-icon svg { width: 18px; height: 18px; }
.contact-detail-label {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--color-text-soft);
  margin-bottom: var(--space-1);
}
.contact-detail-value { font-size: 0.9375rem; color: var(--color-text); font-weight: 500; }

.contact-form {
  background: var(--color-bg-card);
  padding: var(--space-10);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
.form-field { margin-bottom: var(--space-5); }
.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg-card);
  box-shadow: 0 0 0 3px rgba(31, 80, 64, 0.12);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-submit { width: 100%; justify-content: center; }

/* ============================================
   Partner logo (inline within about-grid)
   ============================================ */
.partner-logo {
  display: block;
  max-width: 160px;
  height: auto;
  margin-bottom: var(--space-6);
}

/* ============================================
   About / values
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin-top: var(--space-12);
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.value-card {
  padding: var(--space-8);
  background: var(--color-bg);
  transition: background var(--transition);
}
.value-card:hover { background: var(--color-bg-card); }
.value-num {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
}
.value-card h3 {
  font-family: var(--font-serif);
  font-weight: 380;
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-variation-settings: "opsz" 96;
}
.value-card p { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.6; }

/* ============================================
   Mobile
   ============================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

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

  .product-row { grid-template-columns: 1fr; gap: var(--space-8); }
  .product-row.reverse { direction: ltr; }

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

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

  .section { padding: var(--space-20) 0; }
  .section-lg { padding: var(--space-24) 0; }
  .hero { padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-20); }
  .hero-content { text-align: left; max-width: 100%; }

  .contact-form { padding: var(--space-6); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .trust-strip-inner { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .trust-badges { gap: var(--space-5); }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  99%  { opacity: 1; transform: translateY(0); }
  to   { opacity: 1; transform: none; }
}

.fade-up { opacity: 0; animation: fadeUp 0.8s var(--ease) forwards; }
.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================================
   Back to top button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(31, 80, 64, 0.35), 0 4px 10px rgba(26, 26, 28, 0.08);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background-color var(--transition-fast);
  z-index: 90;
  border: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 30px rgba(31, 80, 64, 0.45), 0 6px 12px rgba(26, 26, 28, 0.1);
}
.back-to-top:active { transform: translateY(0) scale(0.95); }
.back-to-top svg { width: 20px; height: 20px; stroke: currentColor; }
@media (max-width: 600px) {
  .back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}

/* ============================================
   404 — Editorial XL
   ============================================ */
.err-section {
  position: relative;
  min-height: calc(100vh - var(--header-height) - 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) 0 var(--space-24);
  overflow: hidden;
  background:
    radial-gradient(at 20% 30%, rgba(31, 80, 64, 0.06) 0%, transparent 55%),
    radial-gradient(at 80% 70%, rgba(182, 139, 58, 0.05) 0%, transparent 55%),
    var(--color-bg);
}

.err-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.err-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-6);
  padding: 0.4em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: rgba(251, 250, 245, 0.6);
  backdrop-filter: blur(8px);
}

.err-glyph {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(8rem, 28vw, 22rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--color-accent);
  margin: var(--space-4) 0 var(--space-8);
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent) 55%, var(--color-amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-optical-sizing: auto;
  text-rendering: geometricPrecision;
  user-select: none;
  animation: err-breathe 6s var(--ease) infinite;
}

@keyframes err-breathe {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(-6px); opacity: 0.92; }
}

.err-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text);
  max-width: 640px;
  margin: 0 auto var(--space-10);
}

.err-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.err-detail {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: rgba(251, 250, 245, 0.55);
  backdrop-filter: blur(6px);
  font-size: 0.8125rem;
  color: var(--color-text-soft);
  text-align: left;
}
.err-detail > div {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.25rem;
  align-items: baseline;
}
.err-detail dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.err-detail dd {
  margin: 0;
  color: var(--color-text-muted);
}
.err-detail code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text);
  word-break: break-all;
}

/* Floating dots — drift slowly, pulse subtly. Pure CSS. */
.err-dots {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.err-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
  animation: err-drift 18s linear infinite, err-pulse 4s var(--ease) infinite;
  animation-delay: calc(var(--i) * -0.7s), calc(var(--i) * -0.31s);
  top: calc((var(--i) * 41%) - (var(--i) * 37%) + 5%);
  left: calc(((var(--i) * 53%) - (var(--i) * 49%)) + 3%);
}
.err-dot:nth-child(3n)   { background: var(--color-amber); width: 4px; height: 4px; }
.err-dot:nth-child(5n)   { background: var(--color-accent-light); width: 8px; height: 8px; }
.err-dot:nth-child(7n+1) { top: 12%;  left: 18%; }
.err-dot:nth-child(7n+2) { top: 28%;  left: 76%; }
.err-dot:nth-child(7n+3) { top: 64%;  left: 22%; }
.err-dot:nth-child(7n+4) { top: 82%;  left: 64%; }
.err-dot:nth-child(7n+5) { top: 38%;  left: 48%; }
.err-dot:nth-child(7n+6) { top: 52%;  left: 88%; }
.err-dot:nth-child(7n)   { top: 8%;   left: 52%; }

@keyframes err-drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(20px, -30px); }
  50%  { transform: translate(-15px, -50px); }
  75%  { transform: translate(-30px, -20px); }
  100% { transform: translate(0, 0); }
}
@keyframes err-pulse {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .err-dot { opacity: 0.3; }
}
