/* Rimak — contained, editorial, bilingual. Light theme with a dark-mode variant. */

:root {
  --navy: #1b2a4a;
  --navy-deep: #121f36;
  --logo-circle: #1b2a4a;
  --copper: #b87333;
  --copper-strong: #9a5e27;
  --copper-light: #c98a4b;
  --bg: #fbf9f6;
  --surface: #ffffff;
  --surface-alt: #f3efe8;
  --text: #1e2430;
  --muted: #5c6575;
  --line: #e4dfd6;
  --error: #a83232;
  --radius: 14px;
  --max: 1160px;
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #22365c;
    --navy-deep: #0e1728;
    --logo-circle: #2e4568;
    --copper: #d29a5f;
    --copper-strong: #e0aa72;
    --copper-light: #d29a5f;
    --bg: #121826;
    --surface: #1b2436;
    --surface-alt: #202b42;
    --text: #e9ebf0;
    --muted: #a7b0c0;
    --line: #2a3550;
    --error: #e07a7a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--copper-strong); }
a:hover { color: var(--copper); }
[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner {
  display: flex; align-items: center; gap: 32px;
  padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap;
}
.brand { text-decoration: none; color: var(--text); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 52px; height: 52px; flex: 0 0 auto; }
.logo-mark circle { fill: var(--logo-circle); }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: 0.02em; }
.logo-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em; color: var(--muted); }
.logo-tag { font-size: 13px; color: var(--muted); margin-top: 2px; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--copper-strong); text-decoration: underline; text-underline-offset: 4px; }
.lang-toggle { display: flex; gap: 8px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.lang-toggle a { text-decoration: none; color: var(--muted); padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; }
.lang-toggle a.active { color: var(--surface); background: var(--navy); border-color: var(--navy); }

/* ---------- Hero / sections ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 48px; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--copper-strong); margin: 0 0 16px;
}
.hero h1, .page-head h1 {
  font-family: var(--serif); font-weight: 700; line-height: 1.12;
  font-size: clamp(38px, 5.5vw, 64px); margin: 0 0 20px; max-width: 900px;
}
.lead { font-size: 19px; color: var(--muted); max-width: 820px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-size: 16px;
}
.btn-accent { background: var(--copper); color: #fff; }
.btn-accent:hover { background: var(--copper-strong); color: #fff; }
.btn-accent:disabled { opacity: 0.6; cursor: wait; }
.btn-outline { border-color: var(--copper-strong); color: var(--copper-strong); background: transparent; }
.btn-outline:hover { background: var(--copper-strong); color: #fff; }

.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.stats-list {
  list-style: none; margin: 0; padding: 28px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.stat-value { display: block; font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.section { padding: clamp(48px, 6vw, 80px) 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2, .cta-band h2 {
  font-family: var(--serif); font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2; margin: 0 0 12px;
}
.section-lead { color: var(--muted); max-width: 760px; margin: 0 0 32px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.card h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; counter-increment: step; }
.steps li::before {
  content: "0" counter(step); display: block;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--copper-strong); margin-bottom: 10px;
}
.steps h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; }
.steps p { margin: 0; color: var(--muted); }

.cta-band { background: var(--navy-deep); color: #eef1f6; padding: clamp(48px, 6vw, 80px) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c7cedd; }

/* ---------- Pages / prose ---------- */
.prose-page { padding: clamp(40px, 6vw, 72px) 0 80px; }
.page-head { margin-bottom: 32px; }
.prose { max-width: 820px; }
.prose h2 {
  font-family: var(--serif); font-size: clamp(25px, 3vw, 32px); line-height: 1.25;
  margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-family: var(--serif); font-size: 21px; margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--copper-strong); }

/* ---------- Contact form ---------- */
.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 38px); max-width: 680px; margin-top: 28px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.form-error { color: var(--error); font-weight: 600; }
.form-done { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; max-width: 680px; margin-top: 28px; }
.form-done h3 { font-family: var(--serif); font-size: 23px; margin: 0 0 10px; }
.form-done p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c7cedd; padding: 48px 0 24px; }
.site-footer a { color: #eef1f6; }
.footer-inner { display: flex; gap: 48px; justify-content: space-between; flex-wrap: wrap; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-sub { color: #9aa7c0; }
.footer-brand p { max-width: 420px; }
.footer-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #9aa7c0; }
.footer-base { border-top: 1px solid #2a3550; margin-top: 32px; padding-top: 16px; font-size: 14px; color: #9aa7c0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stats-list { grid-template-columns: repeat(2, 1fr); }
  .cards, .steps { grid-template-columns: 1fr; }
  .header-inner { gap: 16px; }
  .main-nav { margin-left: 0; }
}
@media (max-width: 560px) {
  .stats-list { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
}

/* ---------- About portrait ---------- */
.about-intro { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; margin-bottom: 32px; }
.about-intro .lead { margin: 0; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 860px) {
  .about-intro { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
}
