/* =====================================================================
   Svarunica — front page (loaded after site.css, front page only)
   ===================================================================== */

/* the page content area is full width; every section centres its own .svar-wrap */
body.home .entry-content, body.home .ct-container-full, body.home article > .entry-content { max-width: none !important; width: 100% !important; padding: 0 !important; }
body.home [data-vertical-spacing] { --theme-content-vertical-spacing: 0px; }
body.home .entry-content > * { max-width: none !important; width: 100% !important; margin-inline: 0 !important; }
.svar-wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); box-sizing: content-box; }

.svar-section { margin: 0 !important; padding-block: var(--section) 0; }
.svar-section.svar-dark { padding-block: var(--section); margin-top: var(--section) !important; }

/* section header: title left, "see all" right */
.svar-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.svar-title { margin: 0; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; }
.svar-sechead .svar-more { margin-bottom: .35rem; font-size: .95rem; }
@media (min-width: 1000px) { .svar-sechead { margin-bottom: 2rem; } }

/* dark bands */
.svar-dark { background: var(--night); color: rgba(244, 239, 228, .82); }
.svar-dark .svar-title, .svar-dark h2, .svar-dark h3 { color: var(--cream); }

/* ---------- hero ---------- */
.svar-hero.wp-block-cover { min-height: min(70svh, 600px) !important; padding: 80px var(--gutter) 40px; overflow: hidden; align-items: center; }
@media (min-width: 1000px) {
	/* wolf on the left half, the words on the right half */
	.svar-hero.wp-block-cover { min-height: clamp(540px, 74vh, 680px) !important; padding: 100px max(var(--gutter), calc((100vw - 1240px) / 2)) 70px; justify-content: flex-end; }
	.svar-hero .wp-block-cover__inner-container { width: min(560px, 46%) !important; margin: 0 !important; }
}
.svar-hero .wp-block-cover__image-background { transform-origin: 60% 40%; animation: svarKen 26s ease-out both; }
@keyframes svarKen { from { transform: scale(1.08); } to { transform: scale(1); } }
.svar-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(10, 14, 11, .35) 0%, rgba(10, 14, 11, .15) 45%, rgba(10, 14, 11, .75) 100%) !important; opacity: 1 !important; }
.svar-hero h1 { font-family: var(--f-head); font-weight: 400; color: var(--cream); font-size: clamp(3.4rem, 15vw, 7.5rem); letter-spacing: .03em; line-height: .95; margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .45); }
.svar-hero .svar-hero__sub { font-family: var(--f-body); font-style: italic; font-weight: 400; color: var(--cream); font-size: clamp(1.3rem, 4.2vw, 1.85rem) !important; margin: .6rem 0 0; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.svar-hero .svar-hero__sub::before { content: ""; display: block; width: 48px; height: 2px; background: var(--ochre); margin: 0 auto 1rem; }
.svar-hero .wp-block-buttons { margin-top: 2rem; gap: .75rem; }
.svar-hero .wp-block-button { flex: 0 0 auto; }
.svar-hero .wp-block-button__link { min-width: 230px; min-height: 52px; font-size: 1.02rem; }
/* the wolf stands at the left of a wide 3:1 photo whose bottom fifth is black ground.
   Desktop: crop towards the wolf. Phones: the photo is a band at the top showing the whole wolf,
   and the text sits below it on the black ground, which runs on into the hero background. */
.svar-hero .wp-block-cover__image-background { object-position: 8% 50% !important; }
@media (max-width: 689px) {
	.svar-hero.wp-block-cover { min-height: 0 !important; padding: 262px var(--gutter) 40px; align-items: flex-end; background: #030403; }
	.svar-hero .wp-block-cover__image-background { inset: 0 0 auto 0 !important; height: 330px !important; object-position: 0 50% !important; }
	.svar-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(3, 4, 3, .35) 0, rgba(3, 4, 3, 0) 90px, rgba(3, 4, 3, 0) 210px, #030403 330px) !important; }
	.svar-hero h1 { font-size: clamp(3rem, 14vw, 4rem); }
	.svar-hero .wp-block-buttons { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin-inline: auto; }
	.svar-hero .wp-block-button, .svar-hero .wp-block-button__link { width: 100%; min-width: 0; }
}

/* ---------- product rows ---------- */
.svar-products ul.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 690px) { .svar-products ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .svar-products ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* phones and tablets: 6 new products are enough */
@media (max-width: 999px) { .svar-new .svar-products li.product:nth-child(n+7) { display: none; } }
@media (max-width: 689px) { .svar-sale .svar-products li.product:nth-child(n+5) { display: none; } }

/* ---------- photo + text rows (Koledar 2027 and the cards of the old front page) ---------- */
.svar-section.svar-feature { margin-top: var(--section) !important; padding-block: var(--section); }
.svar-section.svar-feature + .svar-section.svar-feature, .svar-section.svar-feature--first { margin-top: 0 !important; }
.svar-light { background: var(--card); border-block: 1px solid var(--line); }
.svar-feature__grid { display: grid; gap: 1.75rem; align-items: center; }
.svar-feature__media { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.svar-light .svar-feature__media { box-shadow: 0 14px 36px rgba(27, 28, 25, .14); }
.svar-feature__media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0 !important; transition: transform .8s ease; }
.svar-feature__media:hover img { transform: scale(1.04); }
.svar-feature .svar-title { font-size: clamp(1.9rem, 5.5vw, 3rem); }
.svar-feature__lead { font-family: var(--f-body); font-size: clamp(1.08rem, 2.6vw, 1.22rem); line-height: 1.6; margin: 1rem 0 1.75rem; color: var(--text); }
.svar-feature__lead p { margin: 0 0 .75em; }
.svar-feature__lead p:last-child { margin-bottom: 0; }
.svar-feature__lead a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.svar-dark .svar-feature__lead { color: rgba(244, 239, 228, .88); }
.svar-dark .svar-feature__lead a { color: var(--ochre); }
.svar-feature .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 689px) { .svar-feature .wp-block-buttons { flex-direction: column; } .svar-feature .wp-block-button, .svar-feature .wp-block-button__link { width: 100%; } }
@media (min-width: 1000px) {
	.svar-feature__grid { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
	.svar-feature--flip .svar-feature__grid { grid-template-columns: 1fr 1.15fr; }
	.svar-feature--flip .svar-feature__media { order: 2; }
}
/* video card: play button on the photo (the video itself opens on YouTube, nothing is embedded) */
.svar-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(20, 26, 22, .72); border: 2px solid rgba(244, 239, 228, .9); transition: background .25s, transform .25s; }
.svar-play::after { content: ""; position: absolute; left: 30px; top: 22px; border-style: solid; border-width: 15px 0 15px 24px; border-color: transparent transparent transparent var(--cream); }
.svar-feature__media:hover .svar-play { background: var(--ochre); transform: scale(1.06); }

/* ---------- category mosaic ---------- */
.svar-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 168px; gap: var(--gap); }
.svar-tile { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--night-2); text-decoration: none; }
.svar-tile:nth-child(1) { grid-column: span 2; grid-row: span 1; }
.svar-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.svar-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 11, 0) 35%, rgba(10, 14, 11, .82) 100%); }
.svar-tile__label { position: absolute; left: .9rem; right: .9rem; bottom: .8rem; z-index: 2; display: flex; flex-direction: column; gap: .15rem; color: #fff; }
.svar-tile__label strong { font-family: var(--f-head); font-size: 1.2rem; font-weight: 400; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.svar-tile:nth-child(1) .svar-tile__label strong { font-size: 1.9rem; }
.svar-tile__label small { color: var(--ochre); letter-spacing: .1em; text-transform: uppercase; font-size: .68rem; font-weight: 700; }
.svar-tile:hover img { transform: scale(1.06); }
@media (max-width: 689px) { .svar-tile:not(:first-child) .svar-tile__label strong { font-size: 1.08rem; overflow-wrap: normal; } }
@media (min-width: 690px) { .svar-tiles { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; } .svar-tile:nth-child(1) { grid-column: span 2; grid-row: span 2; } }
@media (min-width: 1000px) {
	.svar-tiles { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; }
	.svar-tile__label { left: 1.25rem; bottom: 1.1rem; }
	.svar-tile__label strong { font-size: 1.5rem; }
	.svar-tile:nth-child(1) .svar-tile__label strong { font-size: 2.4rem; }
}

/* ---------- articles ---------- */
.svar-posts { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) .5rem; scroll-padding-inline: var(--gutter); }
.svar-posts::-webkit-scrollbar { display: none; }
@media (min-width: 690px) { .svar-posts { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding: 0; } }
.svar-post { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.svar-post:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.svar-post__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--night-2); }
.svar-post__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; transition: transform .6s; }
.svar-post:hover .svar-post__media img { transform: scale(1.05); }
.svar-post__ph { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 30% 30%, #2d3a31, var(--night)); }
.svar-post__body { padding: 1rem 1.1rem 1.25rem; }
.svar-post time { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.svar-post h3 { font-size: 1.4rem; margin: .3rem 0 .5rem; }
.svar-post h3 a { color: var(--ink); text-decoration: none; }
.svar-post p { margin: 0; font-size: .95rem; color: var(--text); }


/* ---------- reveal (JS on, motion allowed) ---------- */
.svar-js .svar-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.svar-js .svar-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.svar-js .svar-reveal { opacity: 1; transform: none; transition: none; }
	.svar-hero .wp-block-cover__image-background { animation: none; }
}

/* the hero runs straight into the first band */
body.home .entry-content > .svar-hero { margin-block: 0 !important; }
