/*
 * Full-width, fluid layout overrides for the Option C home page.
 * The exported markup (resources/views/home/option-c.html) centres its
 * sections in a 1280–1360px column; these rules let every section span the
 * viewport with fluid gutters and scale type/grids with the screen.
 * !important is needed because the export's own <style> is injected after
 * this file and several of its rules are already marked !important.
 */

:root {
  --gutter: clamp(16px, 4vw, 96px);
}

html, body { overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scroll-behavior: smooth; }
/* anchored chapters stop below the sticky header */
html body section[id^="front-"], html body #contact { scroll-margin-top: 72px; }

/* ---- every section spans the full width with fluid side gutters ---- */
html body .sec {
  padding-left: var(--gutter) !important;
  padding-right: var(--gutter) !important;
}
html body .hdr-bar {
  max-width: none !important;
  padding-left: var(--gutter) !important;
  padding-right: var(--gutter) !important;
}
html body .front-grid,
html body .cta-split,
html body .contact-grid,
html body #partners > div {
  max-width: none !important;
}

/* ---- fluid type ---- */
html body .h1big {
  font-size: clamp(38px, 6.4vw, 136px) !important;
  letter-spacing: -0.025em !important;
}
html body .hero p.measure { font-size: clamp(16px, 1.15vw, 22px) !important; }
html body .front-head h2,
html body #partners h2 {
  font-size: clamp(30px, 2.6vw, 54px) !important;
}
html body .front-body p,
html body #partners p.measure {
  font-size: clamp(17px, 1.05vw, 21px) !important;
}
html body .measure { max-width: 72ch !important; }

/* ---- grids that should use the extra room on wide screens ---- */
@media (min-width: 1200px) {
  html body .front-grid { grid-template-columns: 1fr 1.5fr !important; gap: 96px !important; }
  html body .cta-split { gap: 72px !important; }
  html body .cta-media { min-height: 640px !important; }
  html body .contact-grid { gap: 72px !important; }
}
@media (min-width: 1600px) {
  html body .front-grid { grid-template-columns: 1fr 1.8fr !important; gap: 128px !important; }
  html body .cta-media { min-height: 720px !important; }
  /* tiles that span the full section width can take 5 columns; tiles inside a text column stay at 3 */
  html body #partners .tiles { grid-template-columns: repeat(5, 1fr) !important; gap: 18px !important; }
  html body .front-body .tiles { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
  html body .g3 { gap: 18px !important; }
}
@media (min-width: 1200px) and (max-width: 1599px) {
  html body .front-body .tiles { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 2000px) {
  html body .front-grid { grid-template-columns: 1fr 2fr !important; }
}

/* ---- reading overlays (About NICY, Country Partner) get a wider column ---- */
html body .about-root > div[style*="max-width: 720px"] { max-width: min(860px, 92vw) !important; }
html body .about-root header > div[style*="max-width: 900px"] { max-width: min(1100px, 92vw) !important; }
html body .cp-root [style*="max-width: 940px"] { max-width: min(1180px, 92vw) !important; }

/* ---- small screens ---- */
@media (max-width: 767px) {
  html body .h1big { font-size: clamp(34px, 11.5vw, 60px) !important; }
  html body .cta-media { min-height: min(72vw, 520px) !important; }
}
@media (max-width: 480px) {
  html body .front-head h2, html body #partners h2 { font-size: clamp(26px, 8vw, 34px) !important; }
  html body .hero-cta a { padding-left: 14px !important; padding-right: 14px !important; }
  /* gallery: keep the caption clear of the slide dots on narrow screens */
  html body .cta-media figcaption { padding-bottom: 44px !important; padding-right: 64px !important; font-size: 13px !important; }
}

/* ---- logo ---- */
html body .nicy-logo { width: 40px !important; height: 40px !important; }
@media (max-width: 480px) { html body .nicy-logo { width: 34px !important; height: 34px !important; } }

/* ---- video preview tiles (chapter 03 and the "Entdecken" sub-pages) ---- */
html body .nicy-thumbs { display: flex; flex-wrap: wrap; gap: 12px; }
html body .nicy-thumb {
  position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 9 / 16;
  padding: 0; border: 0; border-radius: 0; overflow: hidden; cursor: pointer; background: #1E4D3A;
  box-shadow: 0 6px 18px rgba(16, 37, 28, 0.18); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
html body .nicy-thumb:hover, html body .nicy-thumb:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16, 37, 28, 0.28); outline: none; }
html body .nicy-thumb:focus-visible { box-shadow: 0 0 0 3px #B7C900; }
html body .nicy-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
html body .nicy-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16,37,28,0.55), rgba(16,37,28,0) 45%); }
html body .nicy-thumb-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%);
  display: grid; place-content: center; width: 46px; height: 46px; border-radius: 999px;
  background: rgba(245, 246, 236, 0.92); color: #1E4D3A; padding-left: 3px;
}
html body .nicy-thumb-dur {
  position: absolute; left: 8px; bottom: 7px; z-index: 1; font-family: 'Archivo', system-ui;
  font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: #F5F6EC;
}
html body .nicy-thumbs { flex-wrap: nowrap; }
html body .nicy-thumb-item { margin: 0; flex: 0 0 auto; width: clamp(92px, 8vw, 118px); }
html body .nicy-thumb-place {
  margin-top: 7px; font-family: 'Archivo', system-ui; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em; line-height: 1.25; color: inherit; opacity: 0.85;
}
html body .nicy-thumb-play { width: 36px; height: 36px; }
html body .nicy-thumb-play svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  html body .nicy-thumbs { gap: 8px; }
  html body .nicy-thumb-item { width: calc((100% - 16px) / 3); max-width: 118px; }
}

/* ---- lightbox player ---- */
.nicy-lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 56px 16px 24px; background: rgba(16, 37, 28, 0.88);
}
.nicy-lightbox[hidden] { display: none !important; }
.nicy-lightbox video {
  display: block; max-width: min(92vw, 520px); max-height: calc(100vh - 90px);
  width: auto; height: auto; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.nicy-lightbox-close {
  position: absolute; top: 12px; right: 14px; width: 42px; height: 42px; border: 0; border-radius: 999px;
  background: #B7C900; color: #1E4D3A; font-size: 26px; line-height: 1; cursor: pointer;
}
html.nicy-lightbox-open, html.nicy-lightbox-open body { overflow: hidden; }

/* ---- gallery on its own: full-width frame, each photo shown whole ---- */
html body .cta-split { grid-template-columns: 1fr !important; max-width: none !important; }
html body .cta-media { min-height: 0 !important; background: #1E4D3A !important; }
@media (min-width: 768px) {
  html body .cta-media figure > div { aspect-ratio: auto !important; height: clamp(340px, 60vh, 620px) !important; }
  html body .cta-media figure img { object-fit: contain !important; }
}

/* ---- hero: claim on one line (sized by fit.js), tagline heading above the gallery ---- */
html body .hero-claim { font-size: clamp(14px, 2.6vw, 46px) !important; }
html body .hero-tagline { font-size: clamp(24px, 3.2vw, 56px) !important; line-height: 1.02 !important; letter-spacing: -0.02em !important; color: #1E4D3A !important; }

/* ---- NICYSPACE lettering next to the logo: one size, SPACE thinner ---- */
@media (max-width: 480px) {
  html body header .hdr-bar span[style*="font-size: 30px"] { font-size: 24px !important; }
}

/* ---- Radical Fair Principle (chapter 05) ---- */
html body .front-body .radical-fair p.radical-fair-title { font-size: clamp(26px, 2.6vw, 44px) !important; line-height: 1.02 !important; }
html body .front-body .radical-fair p.rf-sub { font-size: clamp(16px, 1.3vw, 22px) !important; }
html body .front-body .radical-fair p.rf-note { font-size: 13px !important; line-height: 1.5 !important; }
html body .radical-fair .rf-num { font-size: clamp(28px, 2.8vw, 46px); }
@media (max-width: 480px) {
  html body .radical-fair { padding: 22px 16px 18px !important; }
  html body .radical-fair-split > div { padding-left: 4px !important; padding-right: 4px !important; }
}

/* ---- phones: nothing inside a chapter may widen the text column ---- */
html body .front-grid > *, html body .front-body, html body .front-body .measure { min-width: 0 !important; }
html body .front-grid h2, html body .front-body p { overflow-wrap: break-word; hyphens: auto; }
html body .nicy-thumbs { display: grid !important; grid-template-columns: repeat(3, minmax(0, 118px)); gap: 10px; }
html body .nicy-thumb-item { width: auto !important; max-width: none !important; min-width: 0; }
html body .nicy-thumb-place { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  html body .nicy-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  html body .nicy-thumb-place { font-size: 10.5px; }
}
