/* pot.prudens.si — shared sales-page template styles
   Per-book accent color comes from --accent (set inline in index.php) */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6359;
  --line: #e5dfd4;
  --max-width: 1200px; /* same container system as prudens.si */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Lora', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 0.8rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}
.nav__inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.nav__brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--text);
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.04em;
}
.nav__brand img { mix-blend-mode: multiply; }
.nav__cta {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  color: var(--accent); padding: 0.4rem 1.1rem;
  border: 1.5px solid var(--accent); border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.nav__cta:hover { background: var(--accent); color: #fff; }

/* ── Buttons ── */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 1.15rem;
  padding: 1rem 2.6rem; border-radius: 8px;
  text-decoration: none; text-align: center;
  transition: opacity 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { opacity: 0.88; }
.btn--secondary { background: var(--text); color: #fff; }
.btn--secondary:hover { opacity: 0.85; }
.btn--full { width: 100%; }

/* ── Hero ── */
.hero { padding: 6rem 1.25rem 4rem; }
.hero__inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 440px minmax(0, 1fr);
  gap: 4rem; align-items: start;
}
.hero__cover { max-width: 440px; position: relative; aspect-ratio: 979 / 1100; }
.hero__cover img {
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(26, 26, 26, 0.18);
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__cover img.is-active { opacity: 1; }
.hero__naklada { display: block; width: 120px; height: auto; }
.hero__kicker {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.5rem;
}
.hero__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.15; margin: 0 0 0.8rem;
}
.hero__subtitle {
  font-family: var(--font-head); font-style: normal;
  font-size: 1.15rem; color: var(--muted); margin: 0 0 1.2rem;
}
.hero__checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.hero__checklist li { font-size: 0.92rem; color: var(--muted); padding: 0.07rem 0 0.07rem 1.5rem; position: relative; }
.hero__checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.hero__cta-row { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 0.9rem; transform: translateY(-0.75rem); }
.hero__price {
  font-family: var(--font-head); font-size: 2.2rem; font-weight: 600;
  margin: 0 0 0.7rem;
}
.hero__quiet { font-size: 0.92rem; color: var(--muted); margin-top: 1rem; }

/* ── Sections ── */
.section { padding: 4rem 1.25rem; scroll-margin-top: 4.25rem; }
.section__inner { max-width: var(--max-width); margin: 0 auto; }
.section__inner--narrow { max-width: 660px; }
.section__title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1.4rem;
}
.about-book { padding-top: 2rem; isolation: isolate; }
.about-book p { font-size: 1.26rem; line-height: 1.7; }
.about-book .section__inner > p { position: relative; z-index: 1; }
/* concept test — remove both rules + img tag in hero + img tag after book-quote to revert */
.hero { position: relative; overflow: visible; }
.gruba-action-concept {
  position: absolute;
  right: max(-4rem, calc((100vw - var(--max-width)) / 2 - 6rem));
  top: calc(100% - 14rem);
  width: min(520px, 42vw); height: auto;
  pointer-events: none;
}
.about-book__illo--bottom {
  display: block; width: 180px; height: auto;
  margin: 0.4rem auto 1.8rem;
  clear: both;
}
.about-book__illo {
  float: right; width: min(320px, 34vw); height: auto;
  /* Top-aligned with the "O knjigi" title (img precedes the h2 in markup) */
  margin: 0 0 1.4rem 2.2rem;
}

.book-quote-wrap {
  display: flex; align-items: center; gap: 3rem; margin: -2.5rem 0 0.5rem;
}
.book-quote__img {
  width: min(460px, 54%); height: auto; border-radius: 6px; flex-shrink: 0;
}
.book-quote {
  flex: 1; text-align: right; padding: 0; margin: 0;
}
.book-quote p {
  font-family: var(--font-head); font-size: 2.5rem !important;
  line-height: 1.5; color: var(--text); margin: 0 0 0.6rem;
  max-width: none !important;
}
.book-quote footer { font-size: 0.92rem; color: var(--muted); }

/* ── Quotes (inside O knjigi) ── */
.quotes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  margin-top: 1.2rem;
}
.quote {
  position: relative; padding: 1.8rem 1.8rem 1.6rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: #faf9f7;
  display: flex; flex-direction: column;
}
.quote blockquote {
  margin: 0; font-family: var(--font-head); font-style: normal; font-weight: 500;
  font-size: 1.12rem; line-height: 1.6;
}
.quote__name { color: var(--muted); font-size: 0.92rem; margin-top: auto; padding-top: 0.9rem; margin-bottom: 0; }
.quote__name strong { color: var(--accent); font-weight: 600; }

/* ── Author ── */
.author { }
.author__inner {
  display: grid; grid-template-columns: 320px minmax(0, 1fr);
  gap: 3.5rem; align-items: center; max-width: var(--max-width);
}
.author__photo { max-width: 320px; }
.author__text p { font-size: 1.18rem; line-height: 1.7; }
.author__photo img { border-radius: 8px; }
.author__role {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin: -0.8rem 0 1rem;
}
.author__text p.author__illustrator { font-size: 0.95rem; color: var(--muted); }

/* ── Order ── */
.order { }
.order__inner {
  max-width: 680px; margin: 0 auto;
}
.order__illo img {
  /* Grows when the viewport has room, never wider than the source allows */
  width: min(620px, calc(100% + clamp(0px, (100vw - var(--max-width)) / 2 - 1.25rem, 7rem)));
  max-width: none;
  margin: 0;
  /* Slide left past the container edge — only as far as the viewport allows */
  transform: translateX(clamp(-7rem, (var(--max-width) - 100vw) / 2 + 1.25rem, 0px));
}
.order__summary {
  display: flex; gap: 1rem; align-items: center;
  background: #faf9f7; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.6rem; margin-bottom: 1rem;
}
.order__summary img { border-radius: 4px; box-shadow: 0 4px 14px rgba(26,26,26,0.14); flex-shrink: 0; width: 114px; }
.order__book { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.1rem; }
.order__price { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; margin: 0 0 0.2rem; }
.order__shipping { font-size: 0.88rem; color: var(--muted); margin: 0.05rem 0; }
.order__scarcity { font-size: 0.82rem; color: var(--accent); font-weight: 600; margin: 0.2rem 0 0; }
.order__quiet { font-size: 0.92rem; color: var(--muted); margin: 0 0 2rem; }

/* ── Forms ── */
.form label { display: block; margin-bottom: 1rem; font-size: 0.92rem; font-weight: 500; }
.form input[type="text"], .form input[type="email"], .form textarea {
  display: block; width: 100%; margin-top: 0.35rem;
  padding: 0.7rem 0.9rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--text);
}
.form input:focus, .form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__check {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-weight: 400; color: var(--muted); font-size: 0.88rem;
  margin: 1.2rem 0 1.4rem;
}
.form__check input { margin-top: 0.2rem; accent-color: var(--accent); }
.form__secure {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem;
}
.form__success { color: #2e6b34; font-weight: 500; }
.form__error { color: #a32424; font-weight: 500; }
.hp { position: absolute !important; left: -9999px !important; height: 0; opacity: 0; }

/* ── Reader reviews (carousel: slides one card left every 5s) ── */
.reviews__viewport { overflow: hidden; margin-top: 1.25rem; }
.reviews__track { display: flex; gap: 2rem; }
.reviews__track .quote { flex: 0 0 calc((100% - 4rem) / 3); }
.reviews__track:has(> :only-child) .quote { flex: 0 0 min(640px, 100%); margin: 0 auto; }
.review blockquote { font-size: 1.02rem; }

/* ── Contact ── */
.contact { padding-bottom: 7rem; }
.contact__lead { margin-top: -0.8rem; color: var(--muted); }
.contact__inner {
  display: grid; grid-template-columns: 620px minmax(0, 1fr);
  gap: 4rem; align-items: center;
}
.contact__illo img {
  width: min(480px, 100%);
  /* Slide right past the container edge — only as far as the viewport allows */
  transform: translateX(clamp(0px, (100vw - var(--max-width)) / 2 - 1.25rem, 2.5rem));
}

/* ── Footer ── */
.footer {
  background: #faf8f4;
  border-top: 1px solid var(--line);
  padding: 2.2rem 1.25rem; text-align: center;
  font-size: 0.92rem; color: var(--muted);
}
.footer__inner { max-width: 660px; margin: 0 auto; }
.footer__inner img { mix-blend-mode: multiply; flex-shrink: 0; }
.footer__divider {
  display: flex; align-items: center; gap: 1rem;
  max-width: 220px; margin: 0 auto 0.8rem;
}
.footer__divider-line {
  flex: 1; height: 1px;
  background-color: var(--accent); opacity: 0.35;
}
.footer__tagline { font-size: 0.92rem; color: var(--text); }
.footer__links button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--accent); text-decoration: underline;
}
.footer__copy { font-size: 0.82rem; margin-top: 1.4rem; }

/* ── GDPR bar ── */
.gdpr-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: #1c1c1c; border-top: 1px solid rgba(255,255,255,0.08);
}
.gdpr-bar[hidden] { display: none; }
.gdpr-bar__inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.gdpr-bar__text { font-size: 0.82rem; color: rgba(250,247,242,0.7); line-height: 1.5; margin: 0; }
.gdpr-bar__link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: rgba(250,247,242,0.9); text-decoration: underline; text-underline-offset: 2px; font-size: inherit;
}
.gdpr-bar__link:hover { color: #fff; }
.gdpr-bar__btn {
  flex-shrink: 0; background: none; border: 1px solid rgba(250,247,242,0.4);
  color: rgba(250,247,242,0.9); font-family: var(--font-body); font-size: 0.82rem;
  font-weight: 500; padding: 0.35rem 1.25rem; border-radius: 4px;
  cursor: pointer; letter-spacing: 0.04em; transition: border-color 0.2s, color 0.2s;
}
.gdpr-bar__btn:hover { border-color: rgba(250,247,242,0.9); color: #fff; }

/* ── Modals ── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(26, 26, 26, 0.55); }
.modal__box {
  position: relative; background: var(--bg); border-radius: 12px;
  max-width: 640px; max-height: 85vh; overflow-y: auto;
  padding: 2rem 2.2rem; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal__box h2 { font-family: var(--font-head); margin-top: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.modal__box h3 { font-family: var(--font-head); font-size: 1.2rem; margin: 1.4rem 0 0.4rem; }
.modal__box p, .modal__box li { font-size: 0.95rem; }
.modal__close {
  position: absolute; top: 0.8rem; right: 1rem;
  background: none; border: 0; font-size: 1.8rem; line-height: 1;
  cursor: pointer; color: var(--muted);
}
.modal__box--sticky-hd {
  overflow: hidden; padding: 0;
  display: flex; flex-direction: column;
}
.modal__hd {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.4rem 2.2rem 1rem; border-bottom: 1px solid var(--line); flex-shrink: 0;
  background: var(--bg);
}
.modal__hd h2 { margin: 0; }
.modal__box--sticky-hd .modal__close { position: static; flex-shrink: 0; }
.modal__body { overflow-y: auto; flex: 1; padding: 1.5rem 2.2rem 2rem; }
.modal__box--success { text-align: center; max-width: 440px; }
.company-details { margin: 1.2rem 0; }
.company-details div { display: grid; grid-template-columns: 160px 1fr; gap: 0.8rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.company-details dt { color: var(--muted); }
.company-details dd { margin: 0; }
.modal__box--success img { margin: 0 auto 0.6rem; }
body.modal-open { overflow: hidden; }

/* ── Cookie consent: match site branding ── */
#cc-main {
  --cc-font-family: var(--font-body);
  --cc-bg: #ffffff;
  --cc-primary-color: var(--text);
  --cc-btn-primary-bg: var(--accent);
  --cc-btn-primary-border-color: var(--accent);
  --cc-btn-primary-hover-bg: #761717;
  --cc-btn-primary-hover-border-color: #761717;
}

/* ── Mobile ── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  /* Hero must fit above the fold on mobile (ad traffic) */
  .hero { padding: 0.75rem 1.1rem 2rem; }
  .hero__inner { grid-template-columns: 1fr; gap: 1.1rem; }
  .hero__cover { max-width: 38vh; margin: 0 auto; }
  .hero__text { text-align: center; }
  .hero__title { font-size: clamp(1.5rem, 6vw, 1.9rem); margin-bottom: 0.4rem; }
  .hero__subtitle { font-size: 1rem; margin-bottom: 0.7rem; }
  .hero__price { font-size: 1.4rem; margin-bottom: 0.8rem; }
  .hero__quiet { display: none; }
  .section { padding: 2.8rem 1.1rem; }
  .quotes { grid-template-columns: 1fr; gap: 1.4rem; }
  .about-book p { font-size: 1.1rem; }
  .about-book__illo { width: 40vw; margin: 0 0 1rem 1.25rem; }
  .author__inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .author__photo { max-width: 260px; }
  .author__text p { font-size: 1.05rem; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .order__summary { flex-direction: row; }
  /* Order section: single column; illustration moves below the form */
  .order__inner { grid-template-columns: 1fr; gap: 2rem; }
  .order__illo { order: 2; }
  .order__illo img { width: 62vw; margin: 0 auto; transform: none; }
  .reviews__track { gap: 1.4rem; }
  .reviews__track .quote { flex: 0 0 100%; }
  /* Contact section: single column; illustration below the form */
  .contact__inner { grid-template-columns: 1fr; gap: 2rem; }
  .contact__illo img { width: 52vw; margin: 0 auto; transform: none; }
  .modal__box { padding: 1.5rem 1.2rem; }
}
