/*
 * Base bundle: reset, a11y, layout primitives, brand primitives, footer.
 * Colours/sizes come from theme.json presets (--wp--preset--*).
 * Never hardcode a token value here.
 */

/* --- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

* {
	margin: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	min-height: 100vh;
	line-height: 1.6;
	overflow-x: hidden;
	position: relative;
	-webkit-font-smoothing: antialiased;
	background: var(--wp--preset--color--brand-cream);
	color: var(--wp--preset--color--brand-wood);
	font-family: var(--wp--preset--font-family--serif);
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

/* --- Brand primitives --------------------------------------------------- */

:root {
	/* Self-contained paper/granite grain, as in the source design. */
	--paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
	--ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
	--luxury-shadow: 0 20px 40px -15px rgba(45, 27, 16, 0.12);
	--shell: 1280px;
	--shell-wide: 1500px;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 100;
	opacity: 0.03;
	pointer-events: none;
	background-image: var(--paper-grain);
}

.grain {
	background-image: var(--paper-grain);
	background-repeat: repeat;
}

.luxury-shadow {
	box-shadow: var(--luxury-shadow);
}

/* --- Typography --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.script {
	font-family: var(--wp--preset--font-family--script);
}

/* The signature pairing: a tiny wide-tracked uppercase label above a large
   italic serif heading. Repeats in every section of the design. */
.eyebrow {
	display: block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.5em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-gold);
}

.section-title {
	/* text-6xl md:text-7xl */
	font-size: 3.75rem;
	line-height: 0.85;
	letter-spacing: -0.03em;
	font-style: italic;
}

.section-title .upright {
	font-style: normal;
}

@media (min-width: 768px) {
	.section-title {
		font-size: 4.5rem;
	}
}

.rule {
	width: 5rem;
	height: 1px;
	background: var(--wp--preset--color--brand-gold);
	border: 0;
}

.lead {
	/* text-xl */
	font-size: 1.25rem;
	line-height: 1.7;
	color: var(--wp--preset--color--brand-stone);
	max-width: 36em;
}

.section--dark .lead {
	color: rgba(245, 240, 232, 0.6);
}

/* --- Layout ------------------------------------------------------------- */

/*
 * The source puts the gutter on the section (px-6) and caps the inner column
 * at max-w-7xl, so the column is a full 1280px wide once the viewport allows.
 * Padding inside the cap would narrow it by 48px and shift every section edge.
 */
.shell {
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
}

.shell--wide {
	max-width: var(--shell-wide);
	padding-inline: 2rem; /* px-8 */
}

@media (min-width: 768px) {
	.shell--wide {
		padding-inline: 3rem; /* md:px-12 */
	}
}

.section {
	position: relative;
	overflow: hidden;
	/* Source uses py-24 md:py-28 (6rem / 7rem) — fixed steps, not fluid. */
	padding-block: 6rem;
	padding-inline: 1.5rem;
}

@media (min-width: 768px) {
	.section {
		padding-block: 7rem;
	}
}

.section::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0.015;
	pointer-events: none;
	background-image: var(--paper-grain);
}

.section > * {
	position: relative;
	z-index: 1;
}

.section--dark {
	background: var(--wp--preset--color--brand-wood);
	color: var(--wp--preset--color--brand-cream);
}

.section--cream {
	background: var(--wp--preset--color--brand-cream);
}

.section--warm {
	background: var(--wp--preset--color--brand-warm-gray);
}

/* Soft gold light-leak behind several sections. */
.glow {
	position: absolute;
	border-radius: 50%;
	background: rgba(196, 163, 90, 0.05);
	filter: blur(100px);
	pointer-events: none;
	z-index: 0;
}

/* Two-column feature row: media beside copy, reversible. */
.feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6rem; /* gap-24 */
}

.feature__media,
.feature__body {
	width: 100%;
}

@media (min-width: 1024px) {
	.feature {
		flex-direction: row;
		gap: 6rem;
	}

	.feature--reverse {
		flex-direction: row-reverse;
	}

	.feature__media,
	.feature__body {
		width: 50%;
	}
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1.25rem 3rem;
	border: 0;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 10px 30px -12px rgba(45, 27, 16, 0.35);
	transition: background-color 0.5s var(--ease-luxury), color 0.5s var(--ease-luxury), transform 0.5s var(--ease-luxury);
}

.btn:hover {
	transform: scale(1.05);
}

.btn--wood {
	background: var(--wp--preset--color--brand-wood);
	color: var(--wp--preset--color--brand-cream);
}

.btn--wood:hover {
	background: var(--wp--preset--color--brand-gold);
	color: var(--wp--preset--color--brand-wood);
}

.btn--gold {
	background: var(--wp--preset--color--brand-gold);
	color: var(--wp--preset--color--brand-wood);
}

.btn--gold:hover {
	background: #fff;
}

.btn__arrow {
	width: 1rem;
	height: 1rem;
	flex: none;
}

/* Text link with the gold underline that grows on hover. */
.link-underline {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 1.5rem;
	padding-block: 0.5rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
}

.link-underline::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 0;
	height: 1px;
	background: var(--wp--preset--color--brand-gold);
	transition: width 0.7s ease-in-out;
}

.link-underline:hover::after {
	width: 100%;
}

.link-underline__circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid rgba(26, 42, 30, 0.1);
	border-radius: 999px;
	transition: background-color 0.5s var(--ease-luxury), color 0.5s var(--ease-luxury);
}

.link-underline:hover .link-underline__circle {
	background: var(--wp--preset--color--brand-wood);
	color: #fff;
}

/* --- Badges ------------------------------------------------------------- */

.badge-round {
	position: absolute;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-wood);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.badge-round--gold {
	background: linear-gradient(to bottom right, #e6c98c, #c5a059, #8d6e35);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- A11y --------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--wp--preset--color--brand-cream);
	clip-path: none;
	color: var(--wp--preset--color--brand-wood);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	padding: 1rem 1.5rem;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	position: absolute;
	left: -9999rem;
	top: 2.5rem;
	z-index: 999999;
}

.skip-link:focus {
	left: 6px;
	top: 7px;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-gold);
	outline-offset: 2px;
}

/* --- Opening hours (footer now, pages later) ---------------------------- */

.hours {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 300;
}

.hours__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(245, 240, 232, 0.1);
}

.hours__row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.hours__days {
	flex: none;
	opacity: 0.6;
}

.hours__value-wrap {
	margin-left: auto;
	text-align: right;
}

.hours__value {
	font-size: 0.8125rem;
	font-weight: 500;
	white-space: nowrap;
}

.hours__value.is-closed {
	color: rgba(196, 163, 90, 0.9);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.hours__note {
	display: block;
	font-size: 0.625rem;
	line-height: 1.35;
	opacity: 0.45;
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--brand-wood-deep);
	color: var(--wp--preset--color--brand-cream);
	padding-block: clamp(4rem, 8vw, 6rem);
}

.site-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(196, 163, 90, 0.2), transparent);
}

/*
 * The footer's gutter, which it never had.
 *
 * `.shell` only sets a max-width and centres itself — the horizontal padding
 * that keeps content off the screen edge comes from `.section`, and the footer
 * is not a section. So every `.shell` in here sat flush against both edges at
 * any viewport narrower than the 1280px cap: measured on production, the grid's
 * left edge was at **0px** at 360, 390, 430, 768 *and* 1280. It read worst on a
 * phone, but it was never right on a small desktop either.
 *
 * The padding goes on the shells rather than on `.site-footer` on purpose. The
 * footer's top hairline is an absolutely positioned `::before` with `left: 0;
 * width: 100%`, and those offsets resolve against the *padding* box — padding
 * the footer itself would have pulled the hairline in off both edges and broken
 * a full-bleed rule. `.page-top .shell` already does exactly this, so it is the
 * theme's existing idiom rather than a new one.
 */
.site-footer .shell {
	padding-inline: 1.5rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4rem;
}

.site-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.site-footer__logo {
	width: 180px;
}

.site-footer__tagline {
	max-width: 24rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 300;
	line-height: 1.7;
	color: rgba(245, 240, 232, 0.7);
}

.site-footer__socials {
	display: flex;
	gap: 1.5rem;
}

.social-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid rgba(245, 240, 232, 0.1);
	border-radius: 999px;
	color: rgba(245, 240, 232, 0.6);
	transition: color 0.3s, border-color 0.3s;
}

.social-dot svg {
	width: 1rem;
	height: 1rem;
}

.social-dot:hover {
	color: var(--wp--preset--color--brand-gold);
	border-color: var(--wp--preset--color--brand-gold);
}

.site-footer__heading {
	margin-bottom: 2rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand-gold);
}

.site-footer__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 300;
	color: rgba(245, 240, 232, 0.6);
}

.site-footer__list a:hover {
	color: var(--wp--preset--color--brand-gold);
}

.site-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem;
	font-weight: 300;
	color: rgba(245, 240, 232, 0.6);
}

.site-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.site-footer__contact svg {
	flex: none;
	width: 1rem;
	height: 1rem;
	margin-top: 0.2em;
	color: var(--wp--preset--color--brand-gold);
}

.site-footer__notes {
	margin-top: 2rem;
	padding: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.05);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.75rem;
	line-height: 1.6;
	color: rgba(245, 240, 232, 0.7);
}

.site-footer__bottom {
	display: grid;
	grid-template-columns: 1fr;
	align-items: center;
	gap: 1.5rem;
	margin-top: 5rem;
	padding-top: 4rem;
	border-top: 1px solid rgba(245, 240, 232, 0.1);
	text-align: center;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(245, 240, 232, 0.6);
}

/*
 * Legal links, closing the brand block. They deliberately do NOT copy the
 * three content columns: those have a gold heading and a roomy 0.875rem list,
 * and giving fine print that weight would make it compete with the offer.
 * These stay in the footer's smallest voice — the same micro-caps as the
 * copyright line — so they read as fine print attached to the identity.
 */
.site-footer__legal {
	margin-top: 0;
	grid-column: 1 / -1;
}

.site-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(245, 240, 232, 0.45);
}

.site-footer__legal-list a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 0.15em;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer__legal-list a:hover,
.site-footer__legal-list a:focus-visible {
	color: var(--wp--preset--color--brand-gold);
	border-bottom-color: currentColor;
}

.site-footer__langs {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	letter-spacing: 0.3em;
}

.site-footer__langs [aria-current="true"] {
	color: var(--wp--preset--color--brand-gold);
	font-weight: 700;
}

.site-footer__langs button[disabled] {
	background: none;
	border: 0;
	padding: 0;
	color: rgba(245, 240, 232, 0.7);
	cursor: not-allowed;
	letter-spacing: inherit;
	text-transform: inherit;
	font-size: inherit;
	font-family: inherit;
}

.site-footer__credit a {
	color: rgba(245, 240, 232, 0.85);
	text-decoration: underline;
	text-decoration-color: rgba(196, 163, 90, 0.3);
	text-underline-offset: 2px;
}

.site-footer__credit a:hover {
	color: var(--wp--preset--color--brand-gold);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.site-footer__bottom {
		grid-template-columns: repeat(3, 1fr);
		text-align: left;
	}

	.site-footer__credit {
		text-align: right;
	}
}

@media (min-width: 1024px) {
	.site-footer__grid {
		grid-template-columns: 2fr 1fr 1fr 1.2fr;
		gap: 2.5rem;
	}

	/*
	 * Column 1, and deliberately the *same row* as the identity block rather
	 * than a row of its own.
	 *
	 * Sharing the cell is the whole trick. The brand block starts at the top
	 * and its content stops around 233px; this is bottom-aligned in the same
	 * 381px cell, so it lands on exactly the line where the opening-hours box
	 * in column 4 ends. Left column and right column finish level, and the
	 * divider sits the same 5rem below both.
	 *
	 * Given its own grid row it was pushed 40px past the info box and dragged
	 * the divider down with it, which is what made it read as sitting too low.
	 * There is no magic number here: the alignment falls out of the grid.
	 *
	 * The brand block has to be placed explicitly as well, and that is not
	 * decoration. Grid places explicitly-positioned items before auto-placed
	 * ones, so pinning only this element — the last child in the DOM — hands it
	 * cell 1/1 and leaves the brand block to auto-place into the *next* free
	 * cell, shoving Ponudba, Kontakt and Urnik into a second row. Naming both
	 * ends of the shared cell keeps the other three columns exactly where the
	 * design puts them.
	 */
	.site-footer__brand,
	.site-footer__legal {
		grid-area: 1 / 1;
	}

	.site-footer__legal {
		align-self: end;
	}
}

/* --- WhatsApp floating button ------------------------------------------- */

.whatsapp-button {
	position: fixed;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.7);
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	right: calc(1rem + env(safe-area-inset-right, 0px));
	transition: transform 0.3s;
}

.whatsapp-button:hover {
	transform: scale(1.05);
}

.whatsapp-button svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
}

@media (min-width: 768px) {
	.whatsapp-button {
		width: 3.5rem;
		height: 3.5rem;
	}

	.whatsapp-button svg {
		width: 1.75rem;
		height: 1.75rem;
	}
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
