/* ==========================================================================
   Design tokens (Figma: PizzaBox / 1440px, 360px)
   ========================================================================== */
:root {
	--white: #fff;
	--white-secondary: #fafafa; /* Neutral/White-Secondary */
	--gray-100: #f4f4f4;        /* Neutral/Gray-100 */
	--gray-300: #d9d9d9;        /* Neutral/Gray-300 */
	--gray-500: #8a8a8a;
	--black: #0a0a0a;
	--text: #1a1a1a;

	--blue: #0297d3;
	--blue-dark: #0077a7;
	--blue-100: #dbedf4;
	--blue-50: #eef6fa;
	--lime: #bde351;

	--font: "Montserrat", system-ui, sans-serif;
	--font-mono: "Space Mono", ui-monospace, monospace;

	--radius-s: 12px;
	--radius-m: 16px;
	--radius-l: 24px;
	--radius-pill: 100px;

	--container: 1280px;
	--gutter: 80px;
}

@media (max-width: 1199px) { :root { --gutter: 40px; } }
@media (max-width: 767px)  { :root { --gutter: 16px; } }

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
	margin: 0;
	background: var(--white-secondary);
	color: var(--text);
	font: 500 16px/1.4 var(--font);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.icon { width: 20px; height: 20px; flex: none; }

/* ==========================================================================
   Shared components
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 10px 24px;
	border: 0;
	border-radius: var(--radius-pill);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	transition: background-color .2s, color .2s;
}

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--lime { background: var(--lime); color: var(--black); }
.btn--lime:hover { background: #d2f06f; }
.btn--ghost { background: var(--white); font-weight: 500; }
.btn--ghost:hover { background: var(--gray-100); }

.eyebrow {
	color: var(--blue-dark);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.section-title { font-size: 28px; font-weight: 600; line-height: 1.2; }

.tag {
	padding: 6px 12px;
	border-radius: var(--radius-pill);
	background: var(--blue-100);
	color: var(--blue-dark);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 8px 16px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--blue-100);
	color: var(--blue-dark);
	font-size: 14px;
	font-weight: 500;
	transition: background-color .2s, color .2s;
}

.chip .icon { width: 16px; height: 16px; }
.chip.is-active { background: var(--blue); color: var(--white); }
.chip[aria-busy="true"] { opacity: .6; cursor: progress; }

.field {
	position: relative;
	display: flex;
	align-items: center;
	height: 50px;
	border: 1px solid var(--gray-300);
	border-radius: var(--radius-s);
	background: var(--white);
	transition: border-color .2s;
}

.field:focus-within { border-color: var(--blue); }

.field input,
.field select {
	width: 100%;
	height: 100%;
	border: 0;
	background: none;
	font: inherit;
	font-size: 14px;
	color: var(--text);
	outline: none;
}

.field input::placeholder { color: var(--gray-500); }
.field--search { padding-left: 16px; gap: 10px; }
.field--search .icon { color: var(--blue); }
.field--search input { padding-right: 16px; }
.field--select select { appearance: none; padding: 0 44px 0 16px; cursor: pointer; }
.field--select .icon { position: absolute; right: 16px; pointer-events: none; }

/* ==========================================================================
   Info bar — PROSTOIZI platform (above the header, not sticky)
   ========================================================================== */
.izi-bar { background: var(--black); color: var(--white); }

.izi-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 56px;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding: 10px var(--gutter);
}

.izi-bar__logo {
	flex: 1;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}

.izi-bar__logo-accent { color: var(--lime); }

.izi-bar__text {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
}

/* Equal flex shares for the logo and the button keep the text centered. */
.izi-bar__action { flex: 1; display: flex; justify-content: flex-end; }

.izi-bar__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 6px;
	background: var(--lime);
	color: var(--black);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color .2s;
}

.izi-bar__btn:hover { background: #d2f06f; }

@media (max-width: 1023px) {
	.izi-bar__inner { gap: 12px; padding-block: 8px; }
	.izi-bar__text { font-size: 12px; }
}

@media (max-width: 600px) {
	.izi-bar__logo { display: none; }
	.izi-bar__action { flex: 0 0 auto; }
	.izi-bar__text { font-size: 11px; text-align: left; }
}

/* ==========================================================================
   Header — Brand navigation (1440×115, padding 24/80)
   ========================================================================== */
.site-header { background: var(--white-secondary); }

.site-header__inner {
	display: flex;
	justify-content: center;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding: 24px var(--gutter);
}

.site-header__logo img { width: 199px; height: 67px; object-fit: contain; }

/* ==========================================================================
   Hero — Brand overview
   ========================================================================== */
.hero { padding-top: 30px; }

.hero__card {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	min-height: 305px;
	border-radius: var(--radius-l);
	background: linear-gradient(100deg, var(--blue-50) 0%, #e4eff6 55%, #cfe3ef 100%);
	overflow: hidden;
}

.hero__content { display: flex; flex-direction: column; gap: 16px; padding: 40px 0 40px 40px; }
.hero__title { max-width: 420px; font-size: 40px; font-weight: 700; line-height: 1.15; }
.hero__text { color: var(--gray-500); font-size: 14px; font-weight: 400; }

.hero__contact {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 500px;
	margin-top: 8px;
	padding: 14px 24px;
	border-radius: var(--radius-pill);
	background: var(--white);
}

.hero__phone { font-size: 14px; font-weight: 600; }
.hero__hours { color: var(--gray-500); font-size: 12px; }

.hero__image {
	align-self: end;
	justify-self: end;
	width: 100%;
	max-width: 542px;
}

/* ==========================================================================
   Catalog — Location directory
   ========================================================================== */
.locations { padding-top: 64px; }

.locations__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.locations__filters {
	display: grid;
	grid-template-columns: 1fr 240px;
	gap: 12px;
	margin-bottom: 16px;
}

.locations__modes { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

.locations__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: start;
	gap: 12px;
}

.loc-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	border: 1px solid transparent;
	border-radius: var(--radius-m);
	background: var(--white);
	transition: background-color .2s, border-color .2s;
}

.loc-card[hidden] { display: none; }
.loc-card:hover { border-color: var(--blue-100); }
.loc-card.is-selected { background: var(--blue-50); border-color: var(--blue-100); }

.loc-card__select {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}

.loc-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.loc-card__title { font-size: 16px; font-weight: 600; }

.loc-card__hours {
	padding: 4px 10px;
	border-radius: var(--radius-pill);
	background: var(--blue-dark);
	color: var(--white);
	font-size: 12px;
	white-space: nowrap;
}

.loc-card__address { font-size: 13px; font-weight: 400; }

.loc-card__map {
	width: 100%;
	height: 120px;
	border: 1px solid transparent;
	border-radius: var(--radius-s);
	object-fit: cover;
}

.loc-card.is-selected .loc-card__map { border-color: var(--blue-100); }

.loc-card__order { display: none; width: 100%; }
.loc-card:hover .loc-card__order,
.loc-card:focus-within .loc-card__order { display: inline-flex; }

/* Touch screens have no hover: keep the button visible. */
@media (hover: none) {
	.loc-card__order { display: inline-flex; }
}

.loc-card__distance { color: var(--blue-dark); font-size: 12px; font-weight: 600; }

.locations__empty { padding: 40px 0; color: var(--gray-500); text-align: center; }

.locations__more { display: flex; justify-content: center; margin-top: 40px; }
.locations__more[hidden] { display: none; }
.locations__progress { color: var(--gray-500); }

/* ==========================================================================
   Help — Directory support
   ========================================================================== */
.help { padding-block: 64px 80px; }

.help__card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 40px;
	padding: 24px;
	border-radius: var(--radius-m);
	background: var(--white);
}

.help__title { margin-bottom: 12px; font-size: 16px; font-weight: 600; }
.help__text { color: var(--gray-500); font-size: 12px; font-weight: 400; line-height: 1.5; }

.help__contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 24px;
	border-radius: var(--radius-s);
	background: var(--blue-50);
}

.help__cta { font-size: 16px; font-weight: 600; }
.help__phone { color: var(--blue-dark); font-size: 14px; font-weight: 600; }
.help__phone:hover { color: var(--blue); }

/* ==========================================================================
   Footer — Platform footer
   ========================================================================== */
.site-footer { background: var(--black); color: var(--white); }

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	max-width: 900px;
	margin-inline: auto;
	padding: 56px var(--gutter);
}

.site-footer__powered { font-size: 18px; }
.site-footer__izi { margin: 8px 0 32px; color: var(--lime); font: 700 28px/1 var(--font-mono); }
.site-footer__legal { display: flex; gap: 24px; font-size: 12px; color: var(--gray-500); }
.site-footer__legal a:hover { color: var(--white); }

.site-footer__owner { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; text-align: right; }
.site-footer__owner .btn { min-height: 48px; padding-inline: 32px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
	.locations__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1023px) {
	.hero__card { grid-template-columns: 1fr; }
	.hero__content { padding: 24px 24px 0; }
	.hero__content { padding-bottom: 8px; }
	.hero__image { justify-self: start; max-width: 420px; transform: scaleX(-1); }
}

@media (max-width: 767px) {
	/* Header 360×78 with a centered logo. */
	.site-header__inner { align-items: center; height: 78px; padding-block: 0; }
	.site-header__logo img { width: auto; height: 54px; }

	.hero { padding-top: 8px; }
	.hero__title { font-size: 26px; }
	.hero__text { font-size: 12px; }
	.hero__hours { display: none; }

	.locations { padding-top: 40px; }
	.locations__head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
	.section-title { font-size: 22px; }
	.locations__filters { grid-template-columns: 1fr; }
	.locations__modes { margin-bottom: 24px; }
	.locations__grid { grid-template-columns: 1fr; }

	/* On mobile the order button is visible on every card. */
	.loc-card__order { display: inline-flex; }

	.help { padding-block: 40px; }
	.help__card { grid-template-columns: 1fr; gap: 16px; padding: 16px; }

	.site-footer__inner { flex-direction: column; align-items: flex-start; padding-block: 40px; }
	.site-footer__owner { align-items: flex-start; text-align: left; }
	.site-footer__owner .btn { width: 100%; }
}

/* ==========================================================================
   Regular page — legal documents
   ========================================================================== */
.entry { padding-block: 40px 80px; }

.entry__header,
.entry__content {
	max-width: 800px;
	margin-inline: auto;
}

.entry__header { margin-bottom: 32px; }
.entry__title { font-size: 36px; font-weight: 700; line-height: 1.2; }
.entry__updated { margin-top: 12px; color: var(--gray-500); font-size: 14px; }

.entry__content {
	padding: 40px;
	border-radius: var(--radius-l);
	background: var(--white);
	font-weight: 400;
	line-height: 1.65;
}

.entry__content > * + * { margin-top: 16px; }
.entry__content h2 { margin-top: 40px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.entry__content h3 { margin-top: 28px; font-size: 18px; font-weight: 600; }
.entry__content ul,
.entry__content ol { padding-left: 24px; }
.entry__content ul { list-style: disc; }
.entry__content li + li { margin-top: 6px; }
.entry__content a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.entry__content a:hover { color: var(--blue); }
.entry__content mark { padding: 0 4px; border-radius: 4px; background: #fff3c4; }

@media (max-width: 767px) {
	.entry { padding-block: 24px 40px; }
	.entry__title { font-size: 26px; }
	.entry__content { padding: 20px; }
	.entry__content h2 { margin-top: 32px; font-size: 19px; }
}

/* ==========================================================================
   Live map in cards and the map popup
   ========================================================================== */
.loc-card { cursor: pointer; }

.loc-card__map--live {
	position: relative;
	overflow: hidden;
	background: var(--gray-100);
}

.loc-card__map--live iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	pointer-events: none; /* clicks go to the overlay button */
}

.loc-card__map-open {
	position: absolute;
	inset: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	cursor: zoom-in;
	transition: box-shadow .2s;
}

.loc-card__map-open:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.loc-card__map-open:focus-visible { outline-offset: -2px; }

.map-dialog {
	width: min(960px, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: var(--radius-l);
	background: var(--white);
	color: var(--text);
	box-shadow: 0 24px 64px rgb(0 0 0 / .25);
	overflow: hidden;
}

.map-dialog[open] { display: flex; flex-direction: column; }
.map-dialog::backdrop { background: rgb(10 10 10 / .55); }

.map-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
}

.map-dialog__title { font-size: 20px; font-weight: 600; line-height: 1.3; }
.map-dialog__address { margin-top: 4px; color: var(--gray-500); font-size: 14px; font-weight: 400; }

.map-dialog__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--gray-100);
	transition: background-color .2s;
}

.map-dialog__close:hover { background: var(--gray-300); }

.map-dialog__map { flex: 1 1 auto; min-height: 0; height: min(560px, 60dvh); }
.map-dialog__map iframe { display: block; width: 100%; height: 100%; border: 0; }

.map-dialog__foot { display: flex; justify-content: flex-end; padding: 16px 24px; }

@media (max-width: 767px) {
	.map-dialog {
		width: 100vw;
		max-width: none;
		height: 100dvh;
		max-height: none;
		margin: 0;
		border-radius: 0;
	}

	.map-dialog__head { padding: 16px; }
	.map-dialog__title { font-size: 18px; }
	.map-dialog__map { flex-basis: 0; height: auto; }
	.map-dialog__foot { padding: 16px; }
	.map-dialog__foot .btn { width: 100%; min-height: 48px; }
}

.loc-card__map--live img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.map-dialog__canvas,
.map-dialog__canvas iframe { width: 100%; height: 100%; border: 0; }
