/* ============================================================================
   Neva — WordPress page styling
   IMPERICORP X SRL

   Scope: every rule is prefixed `.neva-page`, a body class added by
   neva-body-class.php to any page whose top-level ancestor is /neva/.
   Nothing here can touch the rest of impericorp.com.

   The content itself is NEVER edited. The four legal pages are generated from
   markdown (build-legal.mjs) and are overwritten on every rebuild, so all
   presentation lives in this file and keys off plain HTML elements — the
   fragments carry no classes of their own.

   Container: Astra renders page content inside `.entry-content`. If a page is
   built with Elementor instead, put the HTML in a Text Editor widget and give
   that widget the CSS class `entry-content`.
   ========================================================================== */


/* --- 1. Fonts -------------------------------------------------------------
   woff2 files live next to this file in  assets/fonts/ .
   Two faces each: `-ext` carries the Romanian diacritics (ș ț ă â î).      */

@font-face{
  font-family:'NevaSerif';
  src:url(fonts/cormorant.woff2) format('woff2');
  font-weight:300 700; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'NevaSerif';
  src:url(fonts/cormorant-ext.woff2) format('woff2');
  font-weight:300 700; font-style:normal; font-display:swap;
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face{
  font-family:'NevaSans';
  src:url(fonts/inter.woff2) format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'NevaSans';
  src:url(fonts/inter-ext.woff2) format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}


/* --- 2. Tokens ------------------------------------------------------------
   Lifted from the app: parchment, warm ink, liturgical gold.               */

.neva-page{
  --nv-bg:#F7F3EC;
  --nv-bg-2:#EFE9DC;
  --nv-card:#FDFBF7;
  --nv-ink:#1C1917;
  --nv-body:#4A443B;
  --nv-muted:#6B6459;   /* 5.3:1 on parchment — #918A7C was 3.1:1, below AA */
  --nv-line:#E6DFD1;
  --nv-line-2:#D8CFBC;
  --nv-gold:#836438;    /* 4.9:1 — #8B6B3D was 4.45:1, a hair under AA */
  --nv-gold-hi:#654B24; /* hover DARKENS (7.3:1); #A8802F was 3.3:1 */
  --nv-tint:#F0E4C9;
  --nv-navy:#0E1B33;
  --nv-alert:#7A2430;
  --nv-measure:46rem;   /* ~736px — same value for the title, so they align */
}


/* --- 3. Page shell ------------------------------------------------------- */

body.neva-page{
  background:var(--nv-bg);
  font-family:'NevaSans',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}

.neva-page .entry-content{
  max-width:var(--nv-measure);
  margin-inline:auto;
  color:var(--nv-body);
  font-size:1.0625rem;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-wrap:break-word;
}

/* Some links print the URL in full (the Data Privacy Framework entries in the
   privacy policy). Let those break rather than widen the page on a phone. */
.neva-page .entry-content a{ overflow-wrap:anywhere; }

.neva-page .entry-title,
.neva-page .entry-header .entry-title{
  font-family:'NevaSerif',Georgia,serif;
  font-weight:600;
  font-size:clamp(2.1rem,1.4rem + 2.6vw,3.2rem);
  line-height:1.12;
  letter-spacing:-0.01em;
  color:var(--nv-ink);
  max-width:var(--nv-measure);
  margin-inline:auto;
}

/* In-app links land on deep anchors (#sec-5-4). Keep the target clear of a
   sticky header — raise this if the Astra header is taller. */
.neva-page .entry-content [id]{ scroll-margin-top:120px; }
.neva-page{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ .neva-page{ scroll-behavior:auto; } }


/* --- 4. Headings --------------------------------------------------------- */

.neva-page .entry-content h2,
.neva-page .entry-content h3{
  font-family:'NevaSerif',Georgia,serif;
  color:var(--nv-ink);
  font-weight:600;
  letter-spacing:-0.005em;
}

.neva-page .entry-content h2{
  font-size:clamp(1.55rem,1.25rem + 1.1vw,2.05rem);
  line-height:1.2;
  margin:3rem 0 0.9rem;
  padding-top:1.6rem;
  border-top:1px solid var(--nv-line);
  position:relative;
}
.neva-page .entry-content h2::before{
  content:"";
  position:absolute; top:-1px; left:0;
  width:46px; height:2px;
  background:var(--nv-gold);
}
.neva-page .entry-content > h2:first-of-type{ margin-top:2.4rem; }

.neva-page .entry-content h3{
  font-size:clamp(1.2rem,1.08rem + 0.5vw,1.45rem);
  line-height:1.3;
  margin:2.1rem 0 0.55rem;
}

/* The legal pages open with an <hr> right before the first heading; the rule
   above already separates sections, so drop the duplicate line. */
.neva-page .entry-content hr + h2{ border-top:0; padding-top:0; margin-top:1.2rem; }
.neva-page .entry-content hr + h2::before{ display:none; }


/* --- 5. Body copy -------------------------------------------------------- */

.neva-page .entry-content p{ margin:0 0 1.1rem; }
.neva-page .entry-content strong{ color:var(--nv-ink); font-weight:600; }
.neva-page .entry-content em{ font-style:italic; }

.neva-page .entry-content a{
  color:var(--nv-gold);
  text-decoration:underline;
  text-decoration-color:#CEC1AD;
  text-decoration-color:color-mix(in srgb,var(--nv-gold) 35%,transparent);
  text-underline-offset:0.18em;
  text-decoration-thickness:1px;
  transition:color .15s ease,text-decoration-color .15s ease;
}
.neva-page .entry-content a:hover,
.neva-page .entry-content a:focus-visible{
  color:var(--nv-gold-hi);
  text-decoration-color:currentColor;
}
.neva-page .entry-content a:focus-visible{
  outline:2px solid var(--nv-gold-hi);
  outline-offset:3px;
  border-radius:2px;
}


/* --- 6. Language switcher -------------------------------------------------
   Matched by the language link's own lang attribute, not by position: exactly
   one paragraph per page carries an <a lang="…">, and nothing a plugin might
   inject at the top of the content can be mistaken for it. */

.neva-page .entry-content p:has(> a[lang]){
  display:inline-block;
  margin:0 0 2rem;
  padding:.3rem .85rem;
  border:1px solid var(--nv-line-2);
  border-radius:999px;
  background:var(--nv-card);
  font-size:.8125rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--nv-muted);
}
.neva-page .entry-content p:has(> a[lang]) a{
  color:var(--nv-ink);
  text-decoration:none;
  font-weight:500;
}
.neva-page .entry-content p:has(> a[lang]) a:hover{ color:var(--nv-gold-hi); }


/* --- 7. "Last updated / Provider" block ------------------------------------
   The only paragraph in any of the ten pages that contains a line break, and
   it appears only on the four legal pages. Again keyed off content, not
   position. */

.neva-page .entry-content p:has(> br){
  margin:0 0 1.8rem;
  padding:1rem 1.15rem;
  background:var(--nv-card);
  border:1px solid var(--nv-line);
  border-left:3px solid var(--nv-gold);
  border-radius:3px;
  font-size:.9375rem;
  line-height:1.65;
  color:var(--nv-body);
}


/* --- 8. Lists ------------------------------------------------------------ */

.neva-page .entry-content ul,
.neva-page .entry-content ol{
  margin:0 0 1.2rem;
  padding-left:1.35rem;
}
.neva-page .entry-content li{ margin-bottom:.5rem; }
.neva-page .entry-content li::marker{ color:var(--nv-gold); }
.neva-page .entry-content ol{ counter-reset:none; }
.neva-page .entry-content ol li::marker{ font-weight:600; }
.neva-page .entry-content li > ul,
.neva-page .entry-content li > ol{ margin-top:.5rem; }


/* --- 9. Tables ----------------------------------------------------------- */

.neva-page .entry-content table{
  width:100%;
  margin:0 0 1.6rem;
  border-collapse:collapse;
  background:var(--nv-card);
  border:1px solid var(--nv-line-2);
  font-size:.9375rem;
  line-height:1.6;
}
.neva-page .entry-content thead th{
  background:var(--nv-bg-2);
  color:var(--nv-ink);
  font-family:'NevaSerif',Georgia,serif;
  font-size:1.0625rem;
  font-weight:600;
  text-align:left;
  border-bottom:1px solid var(--nv-line-2);
}
/* Key/value tables (contact details) use <th> in the first column. */
.neva-page .entry-content tbody th{
  background:var(--nv-bg-2);
  color:var(--nv-ink);
  font-weight:600;
  text-align:left;
  white-space:nowrap;
  width:1%;
}
.neva-page .entry-content th,
.neva-page .entry-content td{
  padding:.7rem .85rem;
  border:1px solid var(--nv-line);
  vertical-align:top;
}
.neva-page .entry-content tbody tr:nth-child(even) td{
  background:#F7F3EB;
  background:color-mix(in srgb,var(--nv-bg-2) 45%,transparent);
}


/* --- 10. Blockquote (the model withdrawal form, §5.4.1) ----------------- */

.neva-page .entry-content blockquote{
  margin:0 0 1.6rem;
  padding:1.3rem 1.5rem;
  background:var(--nv-card);
  border:1px solid var(--nv-line-2);
  border-left:3px solid var(--nv-gold);
  border-radius:3px;
  font-size:.9375rem;
  line-height:1.8;
  color:var(--nv-body);
}
.neva-page .entry-content blockquote p{ margin:0 0 .55rem; }
.neva-page .entry-content blockquote p:last-child{ margin-bottom:0; }


/* --- 11. Code ------------------------------------------------------------ */

.neva-page .entry-content code{
  font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;
  font-size:.875em;
  padding:.12em .4em;
  background:var(--nv-tint);
  border:1px solid #DED4C4;
  border-color:color-mix(in srgb,var(--nv-gold) 22%,transparent);
  border-radius:3px;
  color:var(--nv-ink);
  white-space:nowrap;
}


/* --- 12. Rules ----------------------------------------------------------- */

.neva-page .entry-content hr{
  height:1px;
  border:0;
  background:var(--nv-line-2);
  margin:2.4rem 0;
}


/* --- 13. Telephone links and the crisis notice -------------------------- */

.neva-page .entry-content a[href^="tel:"]{
  color:var(--nv-ink);
  font-variant-numeric:tabular-nums;
  text-decoration-color:#B5B2AC;
  text-decoration-color:color-mix(in srgb,var(--nv-ink) 30%,transparent);
  white-space:nowrap;
}
.neva-page .entry-content a[href^="tel:"]:hover{ color:var(--nv-alert); }

/* The paragraph directly under "If you are going through a hard time". */
.neva-page .entry-content h2#hard-time + p,
.neva-page .entry-content h2#moment-greu + p{
  padding:1.1rem 1.25rem;
  background:#F5EEEB;
  background:color-mix(in srgb,var(--nv-alert) 6%,var(--nv-card));
  border:1px solid #DAC2C2;
  border-color:color-mix(in srgb,var(--nv-alert) 22%,transparent);
  border-left:3px solid var(--nv-alert);
  border-radius:3px;
  color:var(--nv-ink);
}
.neva-page .entry-content h2#hard-time + p a[href^="tel:"],
.neva-page .entry-content h2#moment-greu + p a[href^="tel:"]{
  color:var(--nv-alert);
  text-decoration-color:currentColor;
}


/* --- 14. Footer link row (everything after the last rule) ---------------- */

.neva-page .entry-content > hr:last-of-type{
  margin-top:3rem;
  background:var(--nv-line);
}
.neva-page .entry-content > hr:last-of-type ~ p{
  font-size:.875rem;
  line-height:1.7;
  color:var(--nv-muted);
  margin-bottom:.6rem;
}
.neva-page .entry-content > hr:last-of-type ~ p strong{ color:var(--nv-body); }
.neva-page .entry-content > hr:last-of-type ~ p a{
  color:var(--nv-body);
  text-decoration-color:#C7C2BA;
  text-decoration-color:color-mix(in srgb,var(--nv-body) 28%,transparent);
}
.neva-page .entry-content > hr:last-of-type ~ p a:hover{ color:var(--nv-gold-hi); }


/* --- 15. Small screens --------------------------------------------------- */

@media (max-width:782px){
  .neva-page .entry-content{ font-size:1rem; line-height:1.7; }
  .neva-page .entry-content [id]{ scroll-margin-top:90px; }

  /* Retention tables are three columns of prose — let them scroll sideways
     instead of crushing the text into a column one word wide. */
  .neva-page .entry-content table{
    display:block;
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    font-size:.875rem;
  }
  /* A fixed inner width keeps the cells wrapping instead of running off in one
     long line; 38rem is wide enough for three columns of prose and narrow
     enough that only a short sideways scroll is needed. */
  .neva-page .entry-content table thead,
  .neva-page .entry-content table tbody{ display:table; width:38rem; min-width:100%; }
  .neva-page .entry-content th,
  .neva-page .entry-content td{ padding:.6rem .7rem; }
  .neva-page .entry-content tbody th{ white-space:normal; width:auto; }

  .neva-page .entry-content blockquote{ padding:1.1rem 1.15rem; }
  .neva-page .entry-content code{ white-space:normal; overflow-wrap:anywhere; }
}


/* --- 16. Print ----------------------------------------------------------- */

@media print{
  .neva-page .site-header,
  .neva-page .site-footer,
  .neva-page .ast-header-break-point .main-header-bar,
  .neva-page [data-elementor-type="header"],
  .neva-page [data-elementor-type="footer"]{ display:none !important; }
  body.neva-page{ background:#fff; }
  .neva-page .entry-content{
    max-width:none;
    color:#000;
    font-size:10.5pt;
    line-height:1.5;
  }
  .neva-page .entry-content a{ color:#000; text-decoration:underline; }
  .neva-page .entry-content h2,
  .neva-page .entry-content h3{ break-after:avoid; }
  .neva-page .entry-content table,
  .neva-page .entry-content blockquote{ break-inside:avoid; }
  .neva-page .entry-content p:has(> a[lang]){ display:none; }
}
