:root {
  --bg: #080808;
  --bg-elevated: #111111;
  --text: #f2f0eb;
  --text-muted: #8a8680;
  --accent: #c9a227;
  --accent-glow: rgba(201, 162, 39, 0.15);
  --border: rgba(242, 240, 235, 0.12);
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Manrope", system-ui, sans-serif;
  --max-w: 72rem;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.35em;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-desktop a:hover { color: var(--accent); }

.locale-switcher {
  display: flex;
  gap: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.locale-switcher button,
.locale-switcher a {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.2s;
}

.locale-switcher button:hover,
.locale-switcher a:hover { color: var(--text); }

.locale-switcher .is-active { color: var(--accent); }

.nav-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-mobile {
  display: none;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  padding: 1rem 1.5rem;
}

.nav-mobile.is-open { display: block; }

.nav-mobile a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-mobile-toggle { display: none; }
  .header-actions .locale-switcher { display: none; }
}

@media (max-width: 767px) {
  .nav-desktop .locale-switcher { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay-r {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.15));
}

.hero__overlay-b {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent 40%, rgba(0,0,0,0.75));
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 10rem;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 6rem 2rem 4rem;
}

.hero__inner { max-width: 32rem; }

.hero__line {
  width: 1px;
  height: 6rem;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
  margin-bottom: 2rem;
}

.hero__brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}

.hero__descriptor {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2.5rem;
  max-width: 20rem;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #fff;
  transition: opacity 0.2s;
}

.hero__cta:hover { opacity: 0.8; }

.hero__cta-line {
  width: 5rem;
  height: 1px;
  background: rgba(255,255,255,0.6);
}

/* Philosophy */
.philosophy {
  border-block: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: var(--bg-elevated);
  padding: 4rem 0;
}

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

.philosophy__quote {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.35;
}

@media (min-width: 768px) {
  .philosophy__grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .philosophy__quote { flex: 1; }
}

/* Section common */
.section { padding: 6rem 0; }

.section--elevated {
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: var(--bg-elevated);
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 300;
}

.section__subtitle {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--text-muted);
}

.section__label {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

/* Cards grid */
.cards {
  display: grid;
  gap: 1.5rem;
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .cards--2 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--border);
  padding: 2rem;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: inset 0 0 40px var(--accent-glow);
}

.card__id {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-top: 1rem;
}

.card__list {
  list-style: none;
  margin-top: 1.5rem;
}

.card__list li {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Process */
.process-chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

.process-chain__arrow {
  width: 3rem;
  height: 1.5rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.process-chain__item {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.process-chain__item--accent { color: var(--accent); }

@media (min-width: 768px) {
  .process-chain {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }
}

.steps {
  display: grid;
  gap: 2rem;
  margin-top: 5rem;
}

@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step__num {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--accent);
}

.step__title { margin-top: 0.75rem; font-size: 1.125rem; }

.step__desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 4rem;
  margin-top: 0;
}

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-email {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.contact-email:hover { text-decoration: underline; }

.form { display: flex; flex-direction: column; gap: 1rem; }

.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.form input::placeholder,
.form textarea::placeholder { color: color-mix(in srgb, var(--text-muted) 60%, transparent); }

.form input:focus,
.form textarea:focus { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.form textarea { resize: none; min-height: 8rem; }

.form button {
  min-height: 2.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.form button:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 30px var(--accent-glow);
}

.form__msg { font-size: 0.875rem; margin-top: 0.5rem; }
.form__msg--ok { color: var(--accent); }
.form__msg--err { color: #f87171; }

/* Footer */
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  padding: 3rem 0;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-logo {
  font-size: 0.875rem;
  letter-spacing: 0.25em;
}

.footer-desc {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) { .footer-links { align-items: flex-end; } }

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-copy { font-size: 0.75rem; color: var(--text-muted); }

/* Privacy page */
.page-content {
  padding: 8rem 0 6rem;
  max-width: 48rem;
  margin-inline: auto;
}

.page-content .back-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.page-content .back-link:hover { color: var(--accent); }

.page-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 300;
  margin-top: 2rem;
}

.page-content .updated {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.privacy-sections { margin-top: 3rem; }

.privacy-section { margin-bottom: 2.5rem; }

.privacy-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.privacy-section p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Product spotlight */
.products-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 4rem;
}

@media (min-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 960px) and (max-width: 1199px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }

  .products-grid .product-spotlight:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.75rem);
    justify-self: center;
  }
}

.product-spotlight {
  border: 1px solid var(--border);
  padding: 2.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-spotlight--search {
  --spotlight-accent: #7eb8da;
  --spotlight-glow: rgba(126, 184, 218, 0.12);
}

.product-spotlight--search .product-spotlight__badge,
.product-spotlight--search .product-spotlight__cta {
  color: var(--spotlight-accent);
}

.product-spotlight--search:hover {
  border-color: color-mix(in srgb, var(--spotlight-accent) 40%, transparent);
  box-shadow: inset 0 0 40px var(--spotlight-glow);
}

.product-spotlight--style {
  --spotlight-accent: #c4a882;
  --spotlight-glow: rgba(196, 168, 130, 0.12);
}

.product-spotlight--style .product-spotlight__badge,
.product-spotlight--style .product-spotlight__cta {
  color: var(--spotlight-accent);
}

.product-spotlight--style:hover {
  border-color: color-mix(in srgb, var(--spotlight-accent) 40%, transparent);
  box-shadow: inset 0 0 40px var(--spotlight-glow);
}

.product-spotlight:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: inset 0 0 40px var(--accent-glow);
}

.product-spotlight__badge {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.product-spotlight__name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 300;
  margin-top: 1rem;
}

.product-spotlight__tagline {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--text);
}

.product-spotlight__desc {
  margin-top: 1.25rem;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.product-spotlight__features {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .product-spotlight__features { grid-template-columns: 1fr 1fr; }
}

.product-spotlight__features li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.product-spotlight__features li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.product-spotlight__cta {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  transition: opacity 0.2s;
}

.product-spotlight__cta:hover { opacity: 0.8; }

/* Content / articles */
.content-preview {
  margin-top: 2rem;
}

.content-empty {
  padding: 3rem 2rem;
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.content-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.content-link:hover { text-decoration: underline; }

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 3rem;
}

.article-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.article-card:first-child { padding-top: 0; }

.article-card time {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.article-card h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 400;
  margin-top: 0.5rem;
}

.article-card h2 a {
  transition: color 0.2s;
}

.article-card h2 a:hover { color: var(--accent); }

.article-card p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40rem;
}

.content-hint {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.content-hint code {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--accent);
}

/* Article page */
.article-header {
  margin-top: 2rem;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-meta__read {
  letter-spacing: 0.04em;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-author img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.article-author__name {
  display: block;
  font-size: 0.9375rem;
  color: var(--text);
}

.article-author__role {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-body {
  margin-top: 2.5rem;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.article-body p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.article-body strong {
  color: var(--text);
  font-weight: 500;
}

.article-cta {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-glow);
}

.article-cta h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
}

.article-cta p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.article-cta a {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.article-cta a:hover { text-decoration: underline; }

.article-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-related h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.article-related a {
  font-size: 0.9375rem;
  color: var(--accent);
}

.article-related a:hover { text-decoration: underline; }

/* Product page (UnionRec) */
.product-page-hero {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.product-page-hero .container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

.product-section { padding: 4rem 0; }

.product-section--alt { background: var(--bg-elevated); border-block: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }

.rec-table-wrap { overflow-x: auto; margin-top: 2rem; }

.rec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.rec-table th,
.rec-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.rec-table th {
  font-weight: 500;
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.rec-table td { color: var(--text-muted); }

.rec-table tr:hover td { background: color-mix(in srgb, var(--accent-glow) 50%, transparent); }

.algo-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .algo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .algo-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.algo-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  height: 100%;
}

.algo-card h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
}

.algo-card p {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.algo-card__place {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
