/* ============================================================
   CUM FACEM — Shared styles for legal pages
   (confidentialitate, cookies, termeni)
   ============================================================ */

/* ===== Fonts ===== */
@font-face { font-family: 'Visby';  src: url('../fonts/Visby-Medium.woff2')        format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Visby';  src: url('../fonts/Visby-Semibold.woff2')      format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Visby';  src: url('../fonts/Visby-Bold.woff2')          format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../fonts/Aeonik-Regular.woff2')      format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../fonts/Aeonik-RegularItalic.woff2')format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../fonts/Aeonik-Medium.woff2')       format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../fonts/Aeonik-Bold.woff2')         format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ===== Tokens (same as landing) ===== */
:root {
  --bg:        #FAF6EC;
  --bg-2:      #F2EBD8;
  --bg-3:      #EFE6CE;
  --ink:       #1F1235;
  --ink-soft:  #3A2C5C;
  --muted:     #7C6F8E;
  --line:      #E5DDC9;
  --line-soft: #EFE7D2;
  --accent:    #F5D547;
  --accent-hot:#E8C42A;
  --accent-bg: rgba(245, 213, 71, 0.18);
  --on-accent: #1F1235;

  --display: 'Visby', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --body:    'Aeonik', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== Nav (same look as landing) ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 236, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { height: 32px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-switch {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-2);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.lang-btn {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.2s ease;
}
.lang-btn.active { background: var(--ink); color: var(--bg); }

.cta-link {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cta-link:hover { background: var(--accent); color: var(--ink); transform: translateY(-1px); }
.cta-link .arrow { transition: transform 0.2s ease; }
.cta-link:hover .arrow { transform: translate(2px, -2px); }

/* ===== Page header for legal pages ===== */
.legal-header {
  padding: clamp(40px, 7vh, 80px) 0 clamp(28px, 4vh, 44px);
  border-bottom: 1px solid var(--line);
}
.legal-eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.legal-eyebrow a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}
.legal-eyebrow a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.legal-title {
  font-family: var(--display);
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  max-width: 820px;
}
.legal-updated {
  font-size: 13px;
  color: var(--muted);
}
.legal-updated strong { color: var(--ink); font-weight: 600; }

/* ===== Body content typography ===== */
.legal-content {
  padding: clamp(36px, 5vh, 56px) 0 clamp(60px, 8vh, 100px);
  max-width: 820px;
}
.legal-content h2 {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: 48px;
  margin-bottom: 14px;
  scroll-margin-top: 90px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}
.legal-content p {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.legal-content ul, .legal-content ol {
  margin: 6px 0 18px 22px;
  color: var(--ink-soft);
  font-size: 15.5px;
}
.legal-content li { margin-bottom: 8px; }
.legal-content li::marker { color: var(--muted); }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: all 0.2s ease;
}
.legal-content a:hover { color: var(--accent-hot); border-bottom-color: var(--accent-hot); }

.legal-content address {
  font-style: normal;
  font-size: 15.5px;
  color: var(--ink-soft);
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 14px 0 20px;
  border-radius: 0 6px 6px 0;
}
.legal-content address strong { display: block; color: var(--ink); margin-bottom: 4px; }

.legal-content .callout {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 18px 22px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 14.5px;
}

/* TOC (sticky on desktop) */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(40px, 5vw, 80px);
  padding: clamp(36px, 5vh, 56px) 0 clamp(60px, 8vh, 100px);
}
.legal-layout .legal-content { padding: 0; }
.legal-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.legal-toc h5 {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
}
.legal-toc li {
  counter-increment: toc;
  margin-bottom: 6px;
  line-height: 1.4;
}
.legal-toc a {
  color: var(--muted);
  transition: color 0.2s ease;
  display: block;
  padding: 4px 0;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--line);
  margin-right: 10px;
  font-weight: 500;
}
.legal-toc a:hover { color: var(--ink); }

/* ===== Footer (same as landing) ===== */
footer {
  background: var(--ink);
  color: var(--bg);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(250, 246, 236, 0.15);
}
.footer-brand img { height: 40px; width: auto; margin-bottom: 18px; }
.footer-tag {
  font-size: 14px;
  color: rgba(250, 246, 236, 0.6);
  max-width: 360px;
  line-height: 1.55;
}
.footer-col h5 {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.5);
  margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14px;
  color: rgba(250, 246, 236, 0.85);
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(250, 246, 236, 0.5);
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Lang visibility ===== */
[data-ro], [data-en] { display: inline; }
[data-lang="ro"] [data-en] { display: none; }
[data-lang="en"] [data-ro] { display: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .legal-toc {
    position: static;
    border-left: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    margin-bottom: 36px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  :root { --gutter: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { font-size: 10px; }
  .legal-title { font-size: 32px; }
  .legal-content h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
