/* ============================================================
   jurnalapicol.ro · "Fișa de stupină"
   Hârtie kraft, cerneală brună, ștampilă roșie. Fagure, nu SaaS.
   ============================================================ */

:root {
  --paper:       oklch(0.93 0.025 85);
  --paper-deep:  oklch(0.885 0.042 80);
  --comb:        oklch(0.82 0.06 90);
  --ink:         oklch(0.28 0.03 60);
  --ink-soft:    oklch(0.40 0.035 62);
  --honey:       oklch(0.75 0.15 75);
  --honey-deep:  oklch(0.66 0.14 70);
  --propolis:    oklch(0.52 0.09 55);
  --stamp:       oklch(0.50 0.14 30);

  --line:        color-mix(in oklch, var(--ink) 22%, transparent);
  --line-strong: color-mix(in oklch, var(--ink) 45%, transparent);

  --font-body: "Bitter", Georgia, serif;
  --font-hand: "Caveat", cursive;

  --wrap-max: 74rem;
  --gutter: clamp(1.1rem, 4vw, 3rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset scurt ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* fibratură subtilă de hârtie */
  background-image:
    repeating-linear-gradient(0deg,
      transparent 0, transparent 2px,
      color-mix(in oklch, var(--propolis) 3%, transparent) 2px, transparent 3px);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.caveat {
  font-family: var(--font-hand);
  color: var(--propolis);
}

/* ---------- text comun ---------- */
h1, h2, h3 {
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
}
h1 em {
  font-style: italic;
  font-weight: 800;
  color: var(--honey-deep);
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  max-width: 24ch;
}
p { max-width: 66ch; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand strong { color: var(--honey-deep); }
.brand-hex {
  width: 30px; height: 30px;
  fill: var(--honey);
  stroke: var(--ink);
  stroke-width: 3;
  flex-shrink: 0;
}
.brand-hex .hex-inner { fill: var(--paper); }
.topnav {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 500;
}
.topnav a {
  text-decoration: none;
  opacity: 0.75;
}
.topnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- butoane / ștampilă ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.55em 1.3em;
  border-radius: 999px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn-stamp {
  background: transparent;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  box-shadow: inset 0 0 0 0 var(--stamp);
}
.btn-stamp:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 100px color-mix(in oklch, var(--stamp) 10%, transparent),
              0 6px 18px color-mix(in oklch, var(--stamp) 25%, transparent);
}
.btn-big { font-size: 1.1rem; padding: 0.7em 1.6em; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}
.kicker-rule {
  width: 3rem; height: 1px;
  background: var(--line-strong);
  flex-shrink: 0;
}
.hero-lede {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  margin-top: 1.4rem;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  flex-wrap: wrap;
}
.play-badge-link img {
  border-radius: 8px;
  box-shadow: 0 2px 10px color-mix(in oklch, var(--ink) 18%, transparent);
  transition: transform 0.25s var(--ease-out);
}
.play-badge-link:hover img { transform: translateY(-3px); }
.hero-note {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero-hand {
  margin-top: clamp(1.4rem, 3vw, 2rem);
  font-size: 1.5rem;
  transform: rotate(-1.2deg);
}

/* ---------- foto hero + ștampilă ---------- */
.hero-photo {
  position: relative;
  rotate: 1deg;
}
.hero-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(0.12) saturate(0.95) contrast(1.02);
  box-shadow: 0 18px 44px color-mix(in oklch, var(--ink) 28%, transparent);
}
.photo-tag {
  position: absolute;
  left: 0; bottom: -1.4rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
}
.tag-no {
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--stamp);
  margin-right: 0.4rem;
}

/* ștampila rotundă, semnătura paginii */
.stamp {
  position: absolute;
  display: grid;
  place-items: center;
  width: 108px; height: 108px;
  border: 3px double var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  rotate: -12deg;
  mix-blend-mode: multiply;
  opacity: 0.85;
  box-shadow: inset 0 0 14px color-mix(in oklch, var(--stamp) 18%, transparent);
}
.stamp-hero { top: -1.6rem; right: -1rem; }
.stamp-rev  { top: -1.6rem; right: 1.2rem; }

/* aplicarea ștampii la scroll: doar când JS e activ (html.js),
   altfel ștampila e pur și simplu acolo */
.js .stamp {
  scale: 1.45;
  opacity: 0;
  transition: scale 0.5s var(--ease-out), opacity 0.35s ease-out;
}
.js .stamped .stamp { scale: 1; opacity: 0.85; }

/* ---------- facts strip ---------- */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line-strong);
}
.hero-facts > div {
  padding: 1.1rem 1.2rem 0 0;
  border-left: 0;
}
.hero-facts > div + div {
  border-left: 1px solid var(--line);
  padding-left: 1.2rem;
}
.hero-facts dt {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.hero-facts dd {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  margin-top: 0.15rem;
}

/* ============================================================
   SECȚIUNI
   ============================================================ */
.sect {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.sect + .sect { border-top: 1px solid var(--line); }
.sect-deep { background: var(--paper-deep); }
.sect-no {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp);
  margin-bottom: 0.9rem;
}
.sect-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sect-lede {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- registru (funcții) ---------- */
.ledger { border-top: 1px solid var(--line-strong); }
.row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(0.8rem, 2vw, 2rem);
  align-items: baseline;
  padding-block: clamp(1.1rem, 2.4vw, 1.7rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.3s ease-out;
}
.row:hover { background: color-mix(in oklch, var(--honey) 9%, transparent); }
.row-no {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--honey-deep);
  font-variant-numeric: tabular-nums;
}
.row-body h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 800;
}
.row-body p {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ---------- split (foto + copy) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.split-photo {
  position: relative;
  rotate: -1deg;
}
.split-photo img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
  filter: sepia(0.12) saturate(0.95);
  box-shadow: 0 14px 36px color-mix(in oklch, var(--ink) 24%, transparent);
}
.split-copy h2 { margin-bottom: 1.2rem; }
.split-copy p + p { margin-top: 0.9rem; }

.tick-list {
  list-style: none;
  padding: 0;
  margin-block: 1.4rem;
}
.tick-list li {
  position: relative;
  padding-left: 1.7rem;
  padding-block: 0.32rem;
  max-width: 60ch;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 0.95rem; height: 0.55rem;
  border-left: 3px solid var(--honey-deep);
  border-bottom: 3px solid var(--honey-deep);
  transform: rotate(-48deg) translateY(-2px);
}
.hand-note {
  font-size: 1.4rem;
  transform: rotate(-1.5deg);
}

/* ---------- bandă ștampile PHI / 24h / RO ---------- */
.stamp-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.stamp-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
}
.stamp-item p { font-size: 0.95rem; color: var(--ink-soft); max-width: 30ch; }
.stamp-circle {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border: 2.5px solid var(--stamp);
  border-radius: 50%;
  color: var(--stamp);
  font-weight: 900;
  font-size: 0.95rem;
  rotate: -8deg;
  mix-blend-mode: multiply;
  opacity: 0.85;
  flex-shrink: 0;
}
.stamp-item:nth-child(2) .stamp-circle { rotate: 6deg; }
.stamp-item:nth-child(3) .stamp-circle { rotate: -4deg; }

/* ---------- premium band ---------- */
.premium-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  background: var(--comb);
  border: 1px solid var(--line-strong);
  outline: 1px dashed var(--line-strong);
  outline-offset: -8px;
  padding: clamp(2rem, 5vw, 3.5rem);
}
.premium-copy h2 { max-width: 20ch; }
.premium-copy p {
  margin-top: 1rem;
  color: var(--ink-soft);
}

/* ---------- sect-deep (inverted background) ---------- */
.sect-deep { background: var(--paper-deep); }

/* ---------- comparație ---------- */
.compare-wrap { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); background: var(--paper); }
.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.compare thead th {
  text-align: left;
  font-weight: 800;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--ink);
  background: var(--comb);
  color: var(--ink);
}
.compare tbody th {
  text-align: left;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}
.compare tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}
.compare tbody tr:nth-child(odd) td,
.compare tbody tr:nth-child(odd) th { background: rgba(255,255,255,0.25); }
.compare tbody tr:hover td,
.compare tbody tr:hover th { background: rgba(255,255,255,0.45); }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare thead th:nth-child(3),
.compare tbody td:nth-child(3) {
  background: color-mix(in oklch, var(--honey) 28%, transparent);
  color: var(--ink);
  font-weight: 600;
}
.compare-wrap { border-radius: 6px; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 56rem; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 1rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--stamp);
  transition: rotate 0.3s var(--ease-out);
  flex-shrink: 0;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  padding-right: 2rem;
}

/* ---------- final CTA ---------- */
.final { background: var(--paper-deep); }
.final-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.final-photo img {
  aspect-ratio: 1;
  object-fit: cover;
  filter: sepia(0.15) saturate(0.95);
  box-shadow: 0 14px 36px color-mix(in oklch, var(--ink) 24%, transparent);
  rotate: 1.5deg;
}
.final-copy h2 { max-width: 16ch; }
.final-copy p {
  margin-top: 1rem;
  margin-bottom: 1.6rem;
  color: var(--ink-soft);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line-strong);
  background: var(--paper);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, auto) auto;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer-title { font-weight: 900; font-size: 1.1rem; }
.footer-brand p + p { margin-top: 0.5rem; color: var(--ink-soft); }
.footer-head {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--stamp);
  margin-bottom: 0.7rem;
}
.footer-col { display: grid; gap: 0.4rem; justify-items: start; }
.footer-col a {
  text-decoration: none;
  color: var(--ink-soft);
}
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { text-align: right; color: var(--ink-soft); }
.footer-fine {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ============================================================
   MIȘCARE
   ============================================================ */
/* copiii unui grup reveal pornesc ascunși; .in-view (de la JS/IO)
   declanșează intrarea în cascadă */
.reveal-group > * {
  opacity: 0;
  translate: 0 16px;
}
.in-view.reveal-group > * {
  animation: rise 0.65s var(--ease-out) forwards;
}
@keyframes rise {
  to { opacity: 1; translate: 0 0; }
}
/* stagger în interiorul grupurilor */
.reveal-group > * {
  opacity: 0;
  translate: 0 14px;
  animation: rise 0.6s var(--ease-out) forwards;
}
.reveal-group > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-group > *:nth-child(2) { animation-delay: 0.14s; }
.reveal-group > *:nth-child(3) { animation-delay: 0.23s; }
.reveal-group > *:nth-child(4) { animation-delay: 0.32s; }
.reveal-group > *:nth-child(5) { animation-delay: 0.41s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .reveal-group > * { opacity: 1; translate: 0 0; }
  .stamp { scale: 1; opacity: 0.85; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid, .split, .final-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 30rem; }
  .split-rev .split-photo { order: -1; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); row-gap: 1.4rem; }
  .hero-facts > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-meta { text-align: left; }
}
@media (max-width: 640px) {
  .topnav { display: none; }
  .topbar-cta { margin-left: auto; font-size: 0.85rem; }
  .row { grid-template-columns: 3rem 1fr; }
  .stamp-strip { grid-template-columns: 1fr; }
  .premium-band { flex-direction: column; align-items: flex-start; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
}
