/* UniLayer Solutions — design tokens and components derived from the BTCyield style sheet.
   Fonts are self-hosted (SIL OFL): Inter (body) and Playfair Display (headings). */

@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap;
  src: url('./fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap;
  src: url('./fonts/inter-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Playfair Display'; font-weight: 400 900; font-display: swap;
  src: url('./fonts/playfair-display-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-weight: 400 900; font-display: swap;
  src: url('./fonts/playfair-display-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #0d0d0f;
  --bg2: #141418;
  --bg3: #1a1a20;
  --gold: #f0a830;
  --gold-dim: #c88a20;
  --green: #2ecc71;
  --red: #e74c3c;
  --text: #e8e6e3;
  --text-dim: #8a8a8e;
  --text-bright: #ffffff;
  --border: #2a2a30;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 2px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 300; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--gold); text-decoration: none; transition: color .3s; }
a:hover { color: var(--text-bright); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Navigation */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: .8rem 0; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); background: rgba(13,13,15,.85); border-bottom: 1px solid var(--border); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 900; color: var(--text-bright); }
nav { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--text-dim); font-size: .88rem; font-weight: 400; }
nav a:hover, nav a[aria-current="page"] { color: var(--text-bright); }
.lang-menu { position: relative; padding-left: 1.2rem; border-left: 1px solid var(--border); }
.lang-menu summary { list-style: none; cursor: pointer; color: var(--text-dim); display: flex; align-items: center; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--gold); }
.lang-menu a { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: .5rem; padding: .4rem .9rem; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--gold); font-weight: 500; white-space: nowrap; }

/* Hero */
.hero { padding: 10rem 0 5rem; position: relative; }
.hero::before { content: ''; position: absolute; top: -10%; right: 0; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(240,168,48,.07) 0%, transparent 60%); pointer-events: none; }
.hero-sub { padding: 8rem 0 1rem; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 900; line-height: 1.08; color: var(--text-bright); margin-bottom: 1.5rem; max-width: 900px; }
.hero-sub h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-bottom: 0; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text-dim); max-width: 720px; margin-bottom: 2.4rem; }

/* Sections */
section { padding: 5rem 0; border-top: 1px solid var(--border); }
section:nth-of-type(even) { background: var(--bg2); }
h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; color: var(--text-bright); line-height: 1.15; margin-bottom: 1.4rem; }
p { margin-bottom: 1.1rem; max-width: 760px; }
p + p, p + ul, ul + p { margin-top: .2rem; }
ul { margin: 0 0 1.4rem 1.2rem; max-width: 760px; }
li { margin-bottom: .45rem; }
li::marker { color: var(--gold); }
code { font-family: var(--mono); font-size: .88em; color: var(--gold); word-break: break-all; }

/* Buttons */
.btn { display: inline-block; padding: .9rem 2.2rem; background: var(--gold); color: var(--bg); font-weight: 600; font-size: .95rem; letter-spacing: .02em; border-radius: var(--radius); transition: background .3s, transform .2s; }
.btn:hover { background: var(--gold-dim); color: var(--bg); transform: translateY(-2px); }

/* Diagrams */
.diagram { margin: 2rem 0 2.4rem; max-width: 1000px; }
.diagram svg { width: 100%; height: auto; display: block; background: var(--bg); border: 1px solid var(--border); padding: .6rem; }
.diagram figcaption { color: var(--text-dim); font-size: .85rem; margin-top: .6rem; }

.email a { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; user-select: all; }

/* Callout */
.note { border: 1px solid var(--gold-dim); background: rgba(240,168,48,.05); padding: 1.4rem 1.6rem; max-width: 760px; color: var(--text-bright); font-weight: 400; }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 1.6rem; }
table { width: 100%; border-collapse: collapse; background: var(--bg2); border: 1px solid var(--border); }
section:nth-of-type(even) table { background: var(--bg3); }
th { text-align: left; padding: 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); border-bottom: 2px solid var(--gold); font-weight: 500; }
td { padding: .9rem 1rem; font-size: .95rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: rgba(240,168,48,.03); }
td:first-child { color: var(--text-bright); font-weight: 400; }

.audits { list-style: none; margin-left: 0; }
.audits li { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.audits strong { font-family: var(--serif); color: var(--text-bright); font-size: 1.05rem; }

/* Visible marker for config values that are not set. */
.unset { background: #5a1f1f; color: #fff; padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: .85em; }

footer { border-top: 1px solid var(--border); padding: 3rem 0; color: var(--text-dim); font-size: .85rem; }
footer p { margin: 0; }

/* Language chooser */
.chooser main { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.chooser h1 { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; color: var(--text-bright); margin-bottom: 2rem; }
.choices { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; max-width: none; }

@media (max-width: 768px) {
  .wrap { padding: 0 1.2rem; }
  .hero { padding: 8rem 0 3rem; }
  .hero-sub { padding: 9rem 0 .5rem; }
  section { padding: 3.5rem 0; }
  .lang-menu { padding-left: 0; border-left: 0; }
  .diagram { overflow-x: auto; }
  .diagram svg { min-width: 760px; }
  table { font-size: .85rem; }
  th, td { padding: .6rem .5rem; }
}
