:root {
  --bg-base: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-card-alt: #fbfbfd;
  --bg-inverse: #000000;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --text-on-dark: #f5f5f7;
  --accent-link: #0a3d62;
  --accent-action: #0a3d62;
  --accent-action-hover: #0f4c78;
  --success: #30d158;
  --border-hairline: rgba(0, 0, 0, .08);
  --border-hairline-strong: rgba(0, 0, 0, .12);
  --border-strong: rgba(0, 0, 0, .22);
  --divider-on-dark: rgba(255, 255, 255, .14);
  --overlay: rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  scroll-behavior: smooth;
}

a { color: var(--accent-link); text-decoration: none; }
a[href^="mailto:"] { white-space: nowrap; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-action); color: #fff; }

section, header, footer { scroll-margin-top: 14px; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-hairline);
}

.site-header nav {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header .logo {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-header .nav-links::-webkit-scrollbar { display: none; }

.site-header .nav-links a {
  color: var(--text-primary);
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  transition: color .2s ease;
}
.site-header .nav-links a:hover { color: var(--accent-link); opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  padding: 100px 22px 120px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.hero-inner {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.pill-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.pill {
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--accent-link);
  border: 1px solid rgba(10, 61, 98, .3);
  border-radius: 100px;
  padding: 5px 12px;
}

.hero h1 {
  margin: 0;
  font-size: 76px;
  line-height: 1.03;
  letter-spacing: -.028em;
  font-weight: 600;
  max-width: 900px;
}

.hero-sub {
  margin: 0;
  max-width: 660px;
  font-size: 21px;
  line-height: 1.42;
  color: var(--text-secondary);
  letter-spacing: -.01em;
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }

.btn {
  display: inline-block;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 100px;
  transition: background .2s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent-action); color: #fff; }
.btn-primary:hover { background: var(--accent-action-hover); }

.btn-secondary {
  color: var(--accent-link);
  padding: 12px 20px;
  border: 1px solid rgba(10, 61, 98, .35);
}
.btn-secondary:hover { background: rgba(10, 61, 98, .06); }

/* Generic section furniture */
.section { padding: 110px 22px; }
.section-bordered { border-top: 1px solid var(--border-hairline); }
.section-subtle { background: var(--bg-subtle); }
.section-inverse { background: var(--bg-inverse); color: var(--text-on-dark); }

.eyebrow {
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.section-inverse .eyebrow { color: var(--text-tertiary); }

.section-head { max-width: 680px; }
.section-head h2 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: -.024em;
  font-weight: 600;
}
.section-inverse .section-head h2 { color: var(--text-on-dark); }
.section-head p {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.section-inverse .section-head p { color: var(--text-tertiary); }

/* About / Press / Legal two-column grid */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 56px;
  align-items: start;
}

.two-col h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -.022em;
  font-weight: 600;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -.005em;
}
.about-text p { margin: 0; }
.about-text p:first-child { color: var(--text-primary); }
.about-text p:not(:first-child) { color: var(--text-secondary); }

/* Products grid */
.products-wrap { display: flex; flex-direction: column; gap: 44px; }
.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.product-card {
  background: #fff;
  border-radius: 26px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 340px;
  transition: box-shadow .2s ease;
}
.product-card:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, .08); }

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2c2c2e 0%, #1d1d1f 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card h3 { margin: 0; font-size: 28px; letter-spacing: -.018em; font-weight: 600; }
.product-card p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--text-secondary); flex: 1; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-radius: 100px;
  padding: 5px 11px;
}

.product-card > a { font-size: 16px; }

.products-note { margin: 0; text-align: center; font-size: 15px; color: var(--text-tertiary); }

sup.note { font-size: .7em; }

/* Principles (dark) grid */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--divider-on-dark);
  border-radius: 20px;
  overflow: hidden;
}

.principle-cell { background: #000; padding: 34px 30px 40px; }
.principle-num { font-size: 12px; color: var(--text-tertiary); letter-spacing: .06em; margin-bottom: 18px; }
.principle-cell h4 { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.principle-cell p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-tertiary); }

/* Tech grid */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.tech-card {
  padding: 32px 30px 36px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-hairline);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tech-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-card h4 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.tech-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-secondary); }

/* Press */
#press { padding-top: 64px; padding-bottom: 64px; }
.press-card-main { background: #fff; border-radius: 22px; padding: 30px 32px; }

.card-label {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.press-card-main p { margin: 0; font-size: 17px; line-height: 1.55; }

/* Legal */
.legal-list { margin: 0; display: flex; flex-direction: column; gap: 0; }
.legal-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
}
.legal-row:last-child { border-bottom: 1px solid rgba(0, 0, 0, .1); }
.legal-row dt { font-size: 15px; color: var(--text-secondary); margin: 0; }
.legal-row dd { margin: 0; font-size: 17px; }

/* Contacts */
.contacts-section { padding: 64px 22px; background: var(--bg-subtle); text-align: center; }
.contacts-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.contacts-inner h2 { margin: 0; font-size: 54px; line-height: 1.05; letter-spacing: -.026em; font-weight: 600; }
.contacts-inner p { margin: 0; font-size: 19px; line-height: 1.5; color: var(--text-secondary); }
.contacts-inner .mail-link { font-size: 32px; letter-spacing: -.02em; margin-top: 6px; }

/* Footer */
.site-footer { padding: 44px 22px 60px; border-top: 1px solid rgba(0, 0, 0, .1); }
.site-footer .container { display: flex; flex-direction: column; gap: 20px; }
.footnote { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-tertiary); max-width: 820px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer-links a { font-size: 12px; }
.copyright {
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-hairline);
  padding-top: 18px;
}

/* Cookie consent */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .3s ease both;
}
.consent-overlay[hidden] { display: none; }

.consent-panel {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  padding: 20px 21px 18px;
  animation: sheetUp .42s cubic-bezier(.22, 1, .36, 1) both;
}

.consent-panel h3 { margin: 0 0 7px; font-size: 15px; letter-spacing: -.02em; font-weight: 600; }
.consent-panel > p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

.consent-categories {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(0, 0, 0, .1);
  border-radius: 10px;
  overflow: hidden;
}
.consent-categories[hidden] { display: none; }

.consent-category {
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.consent-category .cat-title { font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.consent-category .cat-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.consent-toggle {
  width: 30px;
  height: 18px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 1.5px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(0, 0, 0, .16);
  transition: background .22s ease;
}
.consent-toggle[aria-pressed="true"] { justify-content: flex-end; background: var(--success); }
.consent-toggle:disabled { opacity: .45; cursor: default; }

.consent-toggle .knob {
  width: 15px;
  height: 15px;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  display: block;
}

.consent-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }

.consent-btn {
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  transition: background .2s ease;
}
.consent-btn:hover { background: rgba(0, 0, 0, .05); }

.consent-btn-accept {
  padding: 7px 14px;
  border: none;
  background: var(--accent-action);
  color: #fff;
  margin-left: auto;
}
.consent-btn-accept:hover { background: var(--accent-action-hover); }

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(24px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1024px) {
  .products-grid,
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 72px 20px; }
  .hero { padding: 72px 20px 88px; }
  .contacts-section { padding: 48px 20px; }

  .hero h1 { font-size: 44px; letter-spacing: -.022em; }
  .hero-sub { font-size: 18px; }
  .section-head h2 { font-size: 32px; }
  .two-col h2 { font-size: 32px; }
  .contacts-inner h2 { font-size: 38px; }
  .contacts-inner .mail-link { font-size: 24px; }

  .two-col,
  .products-grid,
  .tech-grid,
  .principles-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .site-header .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border-hairline);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .site-header .nav-links.is-open {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
  }
  .site-header .nav-links a {
    padding: 14px 20px;
    border-top: 1px solid var(--border-hairline);
    opacity: 1;
  }
  .site-header .nav-links a:first-child { border-top: none; }

  .legal-row { grid-template-columns: 1fr; gap: 6px; }

  .consent-panel { padding: 16px 14px 14px; }
  .consent-actions { flex-direction: column; }
  .consent-btn-accept { margin-left: 0; order: -1; }
}
