/* ==========================================================================
   Marika radīt skaisto – tēmas stili
   Krāsas nāk no Customizer (CSS mainīgie :root, skat. functions.php).
   ========================================================================== */

:root {
	--m-accent: #4A6B35;
	--m-bg: #F1F4E9;
	--m-soft: #E2EAD4;
	--m-dark: #34472A;

	--m-ink: #263021;
	--m-text: #4B5444;
	--m-muted: #5A6452;
	--m-line: #CFD9C0;
	--m-surface: #FFFFFF;
	--m-ph-1: #D9E3CA;
	--m-ph-2: #CCD9BA;
	--m-ph-3: #E3EAD6;
	--m-on-dark: #F1F4E9;
	--m-on-dark-muted: #DCE6CE;

	--m-serif: "Noto Serif", Georgia, "Times New Roman", serif;
	--m-sans: "Noto Sans", "Segoe UI", Arial, sans-serif;

	--m-wrap: 1248px;
	--m-gutter: clamp(20px, 5vw, 96px);
	--m-space: clamp(72px, 9vw, 120px);
	--m-radius: 20px;
	--m-radius-lg: 32px;
}

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

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

body {
	margin: 0;
	background: var(--m-bg);
	color: var(--m-ink);
	font-family: var(--m-sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--m-accent); text-underline-offset: 3px; }
a:hover { color: var(--m-dark); }

:focus-visible { outline: 3px solid var(--m-accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--m-serif); font-weight: 600; color: var(--m-ink); margin: 0; }
p, ul, ol, blockquote, figure { margin: 0; }

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

.m-skip {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--m-ink); color: #fff; padding: 12px 18px; border-radius: 8px;
}
.m-skip:focus { top: 16px; color: #fff; }

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

/* ---------- Tipogrāfija ---------- */
.m-h1 { font-size: clamp(38px, 5.2vw, 58px); line-height: 1.1; letter-spacing: -0.01em; }
.m-h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; }
.m-h3 { font-size: clamp(21px, 1.8vw, 24px); line-height: 1.3; }
.m-eyebrow { font-size: 15px; letter-spacing: 0.08em; color: var(--m-muted); font-weight: 500; }
.m-lead { font-size: clamp(18px, 1.5vw, 20px); color: var(--m-text); max-width: 34em; }
.m-intro { font-size: 18px; color: var(--m-text); max-width: 30em; }
.m-body { color: var(--m-text); }

/* ---------- Pogas ---------- */
.m-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 24px; border-radius: 999px;
	font-weight: 500; text-decoration: none; line-height: 1.2;
	border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.m-btn--primary { background: var(--m-accent); color: #fff; }
.m-btn--primary:hover { background: var(--m-dark); color: #fff; }
.m-btn--ghost { color: var(--m-ink); border-color: #A9B994; }
.m-btn--ghost:hover { border-color: var(--m-accent); color: var(--m-ink); }
.m-btn--light { background: var(--m-on-dark); color: var(--m-ink); }
.m-btn--light:hover { background: #fff; color: var(--m-ink); }
.m-btn--small { padding: 10px 20px; font-size: 15px; min-height: 44px; }
.m-btn--large { padding: 16px 32px; font-size: 17px; min-height: 56px; }
.m-icon { flex-shrink: 0; }

.m-link { font-size: 17px; }

/* ---------- Galvene ---------- */
.m-header { border-bottom: 1px solid #D8E0CB; background: var(--m-bg); position: relative; z-index: 20; }
.m-header__inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.m-brand { display: flex; flex-direction: column; text-decoration: none; color: var(--m-ink); }
.m-brand:hover { color: var(--m-ink); }
.m-brand__name { font-family: var(--m-serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.m-brand__tagline { font-family: var(--m-serif); font-size: 17px; color: var(--m-muted); line-height: 1.3; }
.m-brand__logo { max-height: 60px; width: auto; }

.m-nav { display: flex; align-items: center; gap: 36px; }
.m-nav__list { list-style: none; padding: 0; display: flex; gap: 32px; }
.m-nav__list a { color: var(--m-ink); text-decoration: none; font-size: 16px; padding: 8px 0; }
.m-nav__list a:hover { color: var(--m-accent); }

.m-menu-toggle {
	display: none; width: 48px; height: 48px; border: 1px solid #D8E0CB; border-radius: 12px;
	background: transparent; cursor: pointer; position: relative;
}
.m-menu-toggle__bars,
.m-menu-toggle__bars::before,
.m-menu-toggle__bars::after {
	position: absolute; left: 50%; width: 20px; height: 2px; background: var(--m-ink);
	transform: translateX(-50%); content: ""; transition: transform .2s, opacity .2s;
}
.m-menu-toggle__bars { top: 50%; }
.m-menu-toggle__bars::before { top: -6px; }
.m-menu-toggle__bars::after { top: 6px; }
.m-menu-toggle[aria-expanded="true"] .m-menu-toggle__bars { background: transparent; }
.m-menu-toggle[aria-expanded="true"] .m-menu-toggle__bars::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.m-menu-toggle[aria-expanded="true"] .m-menu-toggle__bars::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

/* ---------- Sadaļas ---------- */
.m-section { padding-top: var(--m-space); }
.m-section--tight { padding-top: 0; }
.m-main > .m-section:last-child { padding-bottom: var(--m-space); }
.m-section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 48px; flex-wrap: wrap; margin-bottom: 48px; }
.m-section__title { margin-bottom: 48px; }

.m-grid { display: grid; gap: 32px; list-style: none; padding: 0; }
.m-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
.m-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.m-panel { background: var(--m-soft); border-radius: var(--m-radius-lg); padding: clamp(32px, 5vw, 72px); }

.m-placeholder {
	display: flex; align-items: center; justify-content: center; text-align: center;
	background: var(--m-ph-1); color: var(--m-muted); font-size: 15px; padding: 24px;
}

/* Hero */
.m-hero { padding-block: clamp(48px, 6vw, 80px) clamp(64px, 7vw, 96px); }
.m-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: clamp(40px, 5vw, 72px); align-items: center; }
.m-hero__text { display: flex; flex-direction: column; gap: 26px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.m-hero__img { width: 100%; aspect-ratio: 600 / 680; object-fit: cover; }

/* Hero: arka */
.m-hero--arch .m-hero__inner { width: 100%; max-width: calc(var(--m-wrap) + var(--m-gutter) * 2); margin: 0 auto; padding-inline: var(--m-gutter); }
.m-hero--arch .m-hero__img { border-radius: 300px 300px var(--m-radius) var(--m-radius); }

/* Hero: slīpais griezums – attēls aiziet līdz ekrāna malai */
.m-hero--slant { padding-block: 0 clamp(64px, 7vw, 96px); overflow: hidden; }
.m-hero--slant .m-hero__inner {
	grid-template-columns: minmax(0, 1fr) minmax(0, 54%);
	gap: clamp(32px, 4vw, 64px);
	align-items: center;
}
.m-hero--slant .m-hero__text {
	padding-block: clamp(48px, 6vw, 88px);
	padding-left: max(var(--m-gutter), calc((100vw - var(--m-wrap)) / 2));
	padding-right: clamp(16px, 2vw, 40px);
}
.m-hero--slant .m-hero__media { align-self: stretch; display: flex; }
.m-hero--slant .m-hero__img,
.m-hero--slant .m-placeholder {
	width: 100%;
	height: 100%;
	min-height: clamp(460px, 46vw, 720px);
	aspect-ratio: auto;
	border-radius: 0;
	-webkit-clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
	clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
	object-fit: cover;
}
.m-hero--slant .m-placeholder { padding-left: 22%; }

/* Uzticības josla */
.m-trust {
	list-style: none; padding: 40px 48px; background: var(--m-surface);
	border-radius: 24px 24px 0 0; border-bottom: 2px solid var(--m-accent);
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.m-trust__item { display: flex; flex-direction: column; gap: 4px; }
.m-trust__big { font-family: var(--m-serif); font-size: 29px; font-weight: 600; color: var(--m-accent); line-height: 1.2; }
.m-trust__small { color: var(--m-text); font-size: 16px; }

/* Pakalpojumi */
.m-service { display: flex; flex-direction: column; gap: 14px; }
.m-service__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--m-radius); margin-bottom: 4px; }
.m-grid--3 > .m-service:nth-child(3n+2) .m-placeholder { background: var(--m-ph-2); }
.m-grid--3 > .m-service:nth-child(3n) .m-placeholder { background: var(--m-ph-3); }

/* Kāpēc es */
.m-why { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.m-why__head { display: flex; flex-direction: column; gap: 18px; }
.m-why__item { display: flex; flex-direction: column; gap: 10px; }

/* Pieredze */
.m-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 640px); gap: clamp(40px, 5vw, 72px); }
.m-work__text { display: flex; flex-direction: column; gap: 24px; }
.m-list { list-style: none; padding: 0; border-top: 1px solid var(--m-line); }
.m-list li { padding: 16px 0; border-bottom: 1px solid var(--m-line); font-size: 18px; }
.m-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-content: start; }
.m-gallery__img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; border-radius: var(--m-radius); }
.m-gallery > :nth-child(2).m-placeholder,
.m-gallery > :nth-child(3).m-placeholder { background: var(--m-ph-2); }

/* Process */
.m-steps { counter-reset: none; }
.m-step { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 2px solid var(--m-accent); }
.m-step__num { font-size: 15px; color: var(--m-muted); }

/* Atsauksmes */
.m-review { background: var(--m-surface); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.m-review__text { font-family: var(--m-serif); font-size: 21px; line-height: 1.5; color: var(--m-ink); }
.m-review__name { color: var(--m-muted); font-size: 16px; }
.m-review__text:empty::before { content: "…"; color: var(--m-muted); }

/* Kontaktu bloks */
.m-cta {
	background: var(--m-dark); color: var(--m-on-dark); border-radius: var(--m-radius-lg);
	padding: clamp(40px, 6vw, 80px); display: flex; justify-content: space-between; align-items: center; gap: 48px; flex-wrap: wrap;
}
.m-cta .m-h2 { color: var(--m-on-dark); font-size: clamp(32px, 4.2vw, 50px); }
.m-cta .m-intro { color: var(--m-on-dark-muted); margin-top: 18px; }
.m-cta__text { max-width: 640px; }
.m-cta__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.m-cta__note { color: var(--m-on-dark-muted); }
.m-social { list-style: none; padding: 0; display: flex; gap: 24px; }
.m-social a { color: var(--m-on-dark); }
.m-social a:hover { color: #fff; }
.m-cta :focus-visible { outline-color: var(--m-on-dark); }

/* Kājene */
.m-footer { padding-block: 40px; color: var(--m-muted); font-size: 15px; }
.m-footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Mobilā zvana josla */
.m-callbar { display: none; }

/* Parastās lapas */
.m-content { padding-block: var(--m-space); max-width: 860px; }
.m-entry + .m-entry { margin-top: 64px; }
.m-entry__content { margin-top: 24px; }
.m-entry__content > * + * { margin-top: 1em; }

/* ==========================================================================
   Responsivitāte
   ========================================================================== */
@media (max-width: 1080px) {
	.m-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
	.m-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.m-why, .m-work { grid-template-columns: minmax(0, 1fr); }
	.m-hero--arch .m-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
	.m-hero--slant .m-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 48%); }
}

@media (max-width: 860px) {
	.m-menu-toggle { display: inline-block; }
	.m-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 16px;
		background: var(--m-bg); border-bottom: 1px solid #D8E0CB; padding: 16px var(--m-gutter) 24px;
	}
	.m-nav.is-open { display: flex; }
	.m-nav__list { flex-direction: column; gap: 0; }
	.m-nav__list a { display: block; padding: 14px 0; font-size: 18px; border-bottom: 1px solid #D8E0CB; }

	.m-hero__inner { grid-template-columns: minmax(0, 1fr); }
	.m-hero__media { order: -1; }
	.m-hero--arch .m-hero__img { aspect-ratio: 4 / 3.4; border-radius: 200px 200px var(--m-radius) var(--m-radius); }

	/* Telefonā slīpo griezumu nelieto: parasts attēls ar noapaļotiem stūriem. */
	.m-hero--slant { padding-top: 24px; }
	.m-hero--slant .m-hero__inner { gap: 24px; }
	.m-hero--slant .m-hero__text { padding: 0 var(--m-gutter) 8px; }
	.m-hero--slant .m-hero__media { padding-inline: var(--m-gutter); }
	.m-hero--slant .m-hero__img,
	.m-hero--slant .m-placeholder {
		min-height: 0;
		height: auto;
		aspect-ratio: 4 / 3.4;
		border-radius: var(--m-radius);
		-webkit-clip-path: none;
		clip-path: none;
		padding-left: 0;
	}
	.m-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.m-callbar {
		display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
		align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px;
		background: var(--m-accent); color: #fff; font-weight: 500; text-decoration: none;
		box-shadow: 0 8px 24px rgba(38, 48, 33, .25);
	}
	.m-callbar:hover { color: #fff; background: var(--m-dark); }
	.m-footer { padding-bottom: 96px; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.m-grid--2, .m-grid--3, .m-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.m-trust { padding: 28px; gap: 24px; }
	.m-actions .m-btn { width: 100%; }
	.m-review { padding: 28px; }
	.m-gallery { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
.m-review__name:empty { display: none; }
