/* ============================================================
   Interlegal Cyprus IP Box Portal — shared styles
   Inherits typography & palette from projects/cyprus-landing/
   EB Garamond (headings) + DM Sans (body) + gold accent
   ============================================================ */

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

:root {
  --ink: #0E0E0D;
  --ink-mid: #4A4844;
  --ink-light: #9A9590;
  --ink-faint: #E8E5E0;
  --gold: #856B33;
  --gold-light: #C4A05A;
  --gold-tint: rgba(133, 107, 51, 0.08);
  --green: #4F7A2E;
  --amber: #B58400;
  --red: #A33D2F;
  --surface: #FAFAF8;
  --surface-2: #F4F1EC;
  --white: #FFFFFF;
  --rule: rgba(14,14,13,0.10);
  --rule-strong: rgba(14,14,13,0.18);
  --rule-gold: rgba(156,126,60,0.25);
  --shadow-card: 0 1px 2px rgba(14,14,13,0.04), 0 8px 24px rgba(14,14,13,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: 'EB Garamond', Georgia, serif; font-weight: 500; line-height: 1.25; }
h1 { font-size: 56px; letter-spacing: -0.01em; }
h2 { font-size: 36px; letter-spacing: -0.005em; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }

p { margin-bottom: 1em; }
strong { font-weight: 500; color: var(--ink); }
small { font-size: 12px; color: var(--ink-light); }

/* === Nav === */
nav.site-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 64px; border-bottom: 0.5px solid var(--rule);
  background: var(--white); gap: 24px; position: sticky; top: 0; z-index: 50;
}
.nav-left { display: flex; align-items: center; gap: 48px; }
.nav-logo {
  font-family: 'EB Garamond', serif; font-size: 20px;
  letter-spacing: 0.02em; color: var(--ink); white-space: nowrap;
}
.nav-logo small { display: block; font-family: 'DM Sans', sans-serif; font-size: 9px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 13px; color: var(--ink-mid); letter-spacing: 0.02em; transition: color 0.15s; }
.nav-links a.active { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-light); letter-spacing: 0.05em; }

.lang-switch { display: flex; gap: 0; border: 0.5px solid var(--rule); border-radius: 2px; overflow: hidden; }
.lang-btn { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; padding: 6px 14px; cursor: pointer; border: none; background: transparent; color: var(--ink-light); transition: all 0.15s; border-right: 0.5px solid var(--rule); }
.lang-btn:last-child { border-right: none; }
.lang-btn.active { background: var(--ink); color: var(--white); }

/* === Buttons === */
.btn { display: inline-block; padding: 14px 28px; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; border: none; transition: all 0.18s; border-radius: 2px; }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--gold); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border: 0.5px solid var(--rule-strong); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--ink); }

/* === Layout === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 64px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 64px; }

section { padding: 96px 0; border-bottom: 0.5px solid var(--rule); }
section.compact { padding: 56px 0; }

.eyebrow { font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-mid); max-width: 700px; margin-bottom: 32px; }

/* === Cards & tiles === */
.card-grid { display: grid; gap: 24px; }
.card-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.col-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 0.5px solid var(--rule);
  padding: 32px; border-radius: 2px; transition: all 0.18s;
}
.card:hover { border-color: var(--gold); box-shadow: var(--shadow-card); }
.card h3 { margin-bottom: 12px; }
.card .price { font-family: 'EB Garamond', serif; font-size: 32px; color: var(--gold); margin: 16px 0; }
.card ul { list-style: none; margin: 16px 0; }
.card ul li { padding: 6px 0; padding-left: 22px; position: relative; font-size: 14px; color: var(--ink-mid); }
.card ul li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.card-tier { position: relative; }
.card-tier.featured { border-color: var(--gold); background: var(--surface); }
.card-tier .tier-badge { position: absolute; top: -10px; left: 24px; background: var(--gold); color: var(--white); font-size: 10px; letter-spacing: 0.12em; padding: 4px 12px; text-transform: uppercase; border-radius: 1px; }

/* === Trust block === */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.trust-item { padding: 24px; border-left: 2px solid var(--gold); background: var(--surface); }
.trust-item h4 { margin-bottom: 8px; }
.trust-item p { font-size: 14px; color: var(--ink-mid); margin: 0; }

/* === Timeline (sales landing) === */
.timeline { position: relative; padding-left: 0; margin-top: 32px; }
.timeline-rail { display: flex; gap: 0; align-items: stretch; border: 0.5px solid var(--rule); border-radius: 4px; overflow: hidden; }
.timeline-step { flex: 1; padding: 24px 20px; border-right: 0.5px solid var(--rule); background: var(--white); position: relative; transition: all 0.18s; cursor: pointer; }
.timeline-step:last-child { border-right: none; }
.timeline-step:hover { background: var(--surface); }
.timeline-step .num { font-family: 'EB Garamond', serif; font-size: 28px; color: var(--gold); margin-bottom: 4px; }
.timeline-step .label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 8px; }
.timeline-step .desc { font-size: 13px; color: var(--ink-mid); line-height: 1.5; }
.timeline-step .duration { display: inline-block; margin-top: 8px; font-size: 10px; padding: 2px 8px; border: 0.5px solid var(--rule); border-radius: 999px; color: var(--ink-light); }

/* === Process map (process.html) === */
.process-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 32px 0; }
.phase-col { background: var(--surface); border-radius: 4px; padding: 16px; }
.phase-col header { padding-bottom: 12px; border-bottom: 0.5px solid var(--rule); margin-bottom: 12px; }
.phase-col .phase-num { font-family: 'EB Garamond', serif; font-size: 28px; color: var(--gold); }
.phase-col .phase-name { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mid); margin-top: 4px; }
.phase-col .phase-duration { font-size: 11px; color: var(--ink-light); margin-top: 2px; }
.phase-col .stage { padding: 10px 8px; background: var(--white); border: 0.5px solid var(--rule); margin-bottom: 6px; border-radius: 2px; cursor: pointer; font-size: 12px; transition: all 0.15s; }
.phase-col .stage:hover { border-color: var(--gold); background: var(--gold-tint); }
.phase-col .stage .stage-id { color: var(--gold); font-weight: 500; margin-right: 4px; }

.stage-detail {
  background: var(--surface); border-left: 3px solid var(--gold);
  padding: 32px; margin-top: 24px; border-radius: 0 4px 4px 0;
  display: none;
}
.stage-detail.active { display: block; }
.stage-detail h3 { margin-bottom: 8px; }
.stage-detail .meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--ink-mid); margin-bottom: 16px; padding-bottom: 16px; border-bottom: 0.5px solid var(--rule); }
.stage-detail .meta strong { color: var(--ink); }
.stage-detail h4 { font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin: 16px 0 8px; }
.stage-detail ul.checklist { list-style: none; }
.stage-detail ul.checklist li { padding: 4px 0; padding-left: 22px; position: relative; font-size: 13px; }
.stage-detail ul.checklist li::before { content: "▢"; position: absolute; left: 0; color: var(--ink-light); }

/* === Staff portal (3-pane) === */
.staff-shell { display: grid; grid-template-columns: 280px 1fr 320px; min-height: calc(100vh - 73px); }
.staff-sidebar { background: var(--surface); border-right: 0.5px solid var(--rule); padding: 20px 0; overflow-y: auto; }
.staff-sidebar h4 { font-family: 'DM Sans', sans-serif; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-light); padding: 0 20px 8px; }
.matter-item { padding: 14px 20px; border-bottom: 0.5px solid var(--rule); cursor: pointer; transition: background 0.15s; }
.matter-item:hover { background: var(--white); }
.matter-item.active { background: var(--white); border-left: 3px solid var(--gold); padding-left: 17px; }
.matter-item .matter-id { font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }
.matter-item .matter-name { font-size: 14px; color: var(--ink); margin: 2px 0; }
.matter-item .matter-stage { font-size: 11px; color: var(--ink-mid); }
.matter-item .matter-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 9px; border-radius: 999px; }
.badge-ok { background: rgba(79,122,46,0.12); color: var(--green); }
.badge-warn { background: rgba(181,132,0,0.12); color: var(--amber); }
.badge-fail { background: rgba(163,61,47,0.12); color: var(--red); }

.staff-main { padding: 24px 32px; overflow-y: auto; }
.matter-header h2 { margin-bottom: 4px; }
.matter-header .client { font-size: 14px; color: var(--ink-mid); }

.kpi-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 20px 0; }
.kpi-stage { padding: 12px 8px; background: var(--surface); border: 0.5px solid var(--rule); border-radius: 2px; text-align: center; font-size: 11px; }
.kpi-stage.done { background: rgba(79,122,46,0.10); border-color: var(--green); color: var(--green); }
.kpi-stage.current { background: rgba(181,132,0,0.10); border-color: var(--amber); color: var(--amber); }
.kpi-stage.future { color: var(--ink-light); }
.kpi-stage .num { font-family: 'EB Garamond', serif; font-size: 18px; display: block; margin-bottom: 2px; }
.kpi-stage .label { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }

.tabs { display: flex; gap: 24px; border-bottom: 0.5px solid var(--rule); margin-top: 24px; }
.tab { padding: 10px 0; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-mid); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.tab:hover { color: var(--ink); }

.tab-content { display: none; padding: 24px 0; }
.tab-content.active { display: block; }

.doc-row { padding: 12px 0; border-bottom: 0.5px solid var(--rule); display: flex; justify-content: space-between; align-items: center; }
.doc-row:last-child { border-bottom: none; }
.doc-row .doc-name { font-size: 14px; }
.doc-row .doc-meta { font-size: 11px; color: var(--ink-light); }

.staff-rail { background: var(--surface); border-left: 0.5px solid var(--rule); padding: 24px 20px; overflow-y: auto; }
.engine-card { background: var(--white); border: 0.5px solid var(--rule); padding: 16px; border-radius: 2px; margin-bottom: 16px; }
.engine-card h4 { font-family: 'DM Sans', sans-serif; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.engine-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.engine-row .label { color: var(--ink-mid); }
.engine-row .value { color: var(--ink); font-variant-numeric: tabular-nums; }
.engine-row.highlight { padding-top: 8px; margin-top: 8px; border-top: 0.5px solid var(--rule); font-weight: 500; }
.engine-gate { padding: 8px 12px; border-radius: 2px; font-size: 12px; margin-top: 12px; }
.engine-gate.pass { background: rgba(79,122,46,0.12); color: var(--green); }
.engine-gate.fail { background: rgba(163,61,47,0.12); color: var(--red); }

/* === Learn page === */
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 32px 0; }
.role-card { background: var(--surface); padding: 28px; border-radius: 4px; border-left: 3px solid var(--gold); transition: all 0.18s; cursor: pointer; }
.role-card:hover { background: var(--white); box-shadow: var(--shadow-card); }
.role-card .role-eyebrow { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.role-card h3 { margin-bottom: 12px; }
.role-card p { font-size: 13px; color: var(--ink-mid); margin: 0; }
.role-card .role-meta { font-size: 11px; color: var(--ink-light); margin-top: 12px; }

.learn-content { display: none; max-width: 760px; margin: 32px auto; padding: 32px; background: var(--surface); border-radius: 4px; }
.learn-content.active { display: block; }
.learn-content h2 { margin-bottom: 8px; }
.learn-content h3 { font-family: 'DM Sans', sans-serif; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin: 24px 0 12px; }
.learn-content ul { margin: 12px 0 12px 24px; }
.learn-content li { padding: 4px 0; font-size: 14px; color: var(--ink-mid); }
.learn-content code { font-family: 'SF Mono', Menlo, monospace; font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 2px; }

/* === Templates catalog === */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0; }
.template-card { background: var(--white); border: 0.5px solid var(--rule); padding: 20px; border-radius: 2px; transition: all 0.18s; }
.template-card:hover { border-color: var(--gold); }
.template-card .template-num { font-family: 'EB Garamond', serif; font-size: 22px; color: var(--gold); }
.template-card h4 { margin: 4px 0 8px; font-size: 16px; }
.template-card p { font-size: 12px; color: var(--ink-mid); margin: 0 0 12px; }
.template-card .template-meta { font-size: 10px; letter-spacing: 0.08em; color: var(--ink-light); text-transform: uppercase; }
.template-card .template-actions { margin-top: 12px; display: flex; gap: 8px; }
.template-card .template-link { font-size: 11px; letter-spacing: 0.08em; padding: 4px 10px; border: 0.5px solid var(--rule); border-radius: 999px; color: var(--ink-mid); transition: all 0.15s; }
.template-card .template-link:hover { border-color: var(--gold); color: var(--gold); }

/* === Forms === */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.form-row { display: grid; gap: 4px; }
.form-row label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mid); }
.form-row input, .form-row select, .form-row textarea {
  font-family: 'DM Sans', sans-serif; font-size: 14px; padding: 12px 14px;
  border: 0.5px solid var(--rule-strong); border-radius: 2px; background: var(--white);
  color: var(--ink); transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--gold); }
.form-row textarea { min-height: 100px; resize: vertical; }

/* === Footer === */
footer.site-foot { padding: 40px 64px; border-top: 0.5px solid var(--rule); background: var(--surface); font-size: 12px; color: var(--ink-light); display: flex; justify-content: space-between; gap: 24px; }
footer.site-foot a { color: var(--ink-mid); }

/* === Responsive === */
@media (max-width: 1100px) {
  .container, .container-narrow { padding: 0 32px; }
  nav.site-nav { padding: 20px 32px; }
  h1 { font-size: 44px; }
  h2 { font-size: 28px; }
  .card-grid.col-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.col-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .process-map { grid-template-columns: repeat(3, 1fr); }
  .staff-shell { grid-template-columns: 240px 1fr; }
  .staff-rail { display: none; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-rail { flex-wrap: wrap; }
  .timeline-step { flex: 1 1 33%; }
}

@media (max-width: 700px) {
  nav.site-nav { flex-direction: column; padding: 16px; }
  .nav-left { flex-direction: column; gap: 16px; }
  .nav-links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  h1 { font-size: 32px; }
  .card-grid.col-2, .card-grid.col-3, .card-grid.col-4 { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .process-map { grid-template-columns: 1fr; }
  .staff-shell { grid-template-columns: 1fr; }
  .staff-sidebar { display: none; }
  .role-grid, .template-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .container, .container-narrow { padding: 0 20px; }
}

/* i18n */
[data-lang="en"] .t-ua, [data-lang="ua"] .t-en { display: none; }
