/*
Theme Name: Green Company
Description: Šablona pro GREEN COMPANY s.r.o. Všechny texty a obrázky se mění v Obsah webu (Vzhled > Přizpůsobit).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: green-company
*/

@font-face { font-family: Jost; src: url(assets/fonts/jost-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Jost; src: url(assets/fonts/jost-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
	--ground: #e6ebe3;
	--tile: #f4f6f1;
	--tile-2: #dae2d6;
	--ink: #0f231b;
	--soft: #41544a;
	--dark: #0f2b22;
	--dark-2: #17392d;
	--dark-3: #1e4638;
	--accent: #25c07f;
	--field: #17644a;
	--field-2: #1d7557;
	--field-3: #2a8a69;
	--t1: #cfe3d6;
	--t2: #bbd9c7;
	--t3: #a7ceb6;
	--gap: 8px;
	--pad: clamp(20px, 2vw, 32px);
	--top: 60px;
	--bar: 0px;
	--step-small: clamp(.8125rem, .79rem + .1vw, .875rem);
	--step-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
	--step-lead: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
	--step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
	--ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 2 * var(--gap)); -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: var(--gap); background: var(--ground); color: var(--ink); font: 400 var(--step-body)/1.5 Jost, system-ui, sans-serif; overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--ink); }

h1, h2, .giant { font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: .95; }
h2 { font-size: var(--step-head); }
h3 { font-weight: 500; }
.lead { font-size: var(--step-lead); line-height: 1.25; }
.small { font-size: var(--step-small); }
.tile { background: var(--tile); }
main > * + *, .foot { margin-top: var(--gap); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gap); top: var(--gap); z-index: 10; background: var(--accent); padding: 12px 16px; }

/* Photo slots: one treatment. Grey at rest; the beam crosses and colour returns on hover. */
.ph { position: absolute; inset: 0; display: block; overflow: hidden; }
.ph img, .ph video { width: 100%; height: 100%; object-fit: cover; }
.photo { position: relative; overflow: hidden; background: var(--tile-2); }
.photo .ph img, .photo .ph video { filter: grayscale(1); transition: filter .5s; }
.photo:hover .ph img, .photo:hover .ph video { filter: none; }
.photo::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: var(--accent); opacity: 0; pointer-events: none; }
.photo:hover::after { animation: sweep .9s var(--ease); }
@keyframes sweep { 0% { transform: translateX(0); opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(100vw); opacity: 0; } }

/* Top bar */
.top { position: sticky; top: var(--bar); z-index: 5; display: grid; grid-template-columns: var(--top) minmax(0, 1fr) auto; gap: var(--gap); height: calc(var(--top) + 2 * var(--gap)); margin: calc(-1 * var(--gap)) calc(-1 * var(--gap)) 0; padding: var(--gap); background: var(--ground); }
.top-mark { display: grid; place-items: center; background: var(--ink); color: var(--tile); font-weight: 700; text-decoration: none; }
.top-mark img { max-height: 40px; width: auto; }
.top-nav { display: flex; gap: clamp(16px, 3vw, 40px); align-items: center; background: var(--tile-2); padding: 0 var(--pad); }
.top-nav a { text-decoration: none; white-space: nowrap; position: relative; }
.top-nav a::after, .foot-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.top-nav a:hover::after, .foot-nav a:hover::after { transform: scaleX(1); }
.top-menu { display: none; background: var(--tile-2); }
.top-menu summary { height: 100%; padding: 0 20px; display: flex; align-items: center; cursor: pointer; list-style: none; }
.top-menu summary::-webkit-details-marker { display: none; }
.top-menu nav { position: absolute; left: 0; right: 0; top: calc(var(--top) + var(--gap)); background: var(--tile-2); display: grid; }
.top-menu nav a { padding: 14px 20px; text-decoration: none; font-size: var(--step-lead); }
.top-action { display: flex; gap: 12px; align-items: center; background: var(--ink); color: var(--tile); padding: 0 var(--pad); text-decoration: none; transition: background .25s, color .25s; }
.top-action:hover { background: var(--accent); color: var(--ink); }
.top-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; background: var(--accent); color: var(--ink); font-weight: 700; }
.top-count[hidden] { display: none; }

/* Hero: two-by-two board */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); height: calc(100svh - var(--top) - 3 * var(--gap)); min-height: 620px; max-height: 1080px; }
.hero-name { display: flex; align-items: flex-end; padding: var(--pad); overflow: hidden; }
.hero-name h1 { font-size: clamp(64px, 9.6vw, 170px); font-weight: 500; letter-spacing: -.05em; line-height: .88; }
.hero-photo { min-height: 0; }
.hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.hero-dark, .hero-accent { padding: var(--pad); font-size: clamp(1.25rem, 2.1vw, 2rem); line-height: 1.1; }
.hero-dark { background: var(--dark); color: var(--tile); }
.hero-accent { background: var(--accent); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; transition: background .25s; }
.hero-accent svg { align-self: flex-end; transition: transform .35s var(--ease); }
.hero-accent:hover { background: #3fd694; }
.hero-accent:hover svg { transform: translateY(6px); }

/* Scanner: the beam turns the pile into the archive */
.hero-scan { position: relative; overflow: hidden; --x: 62%; background: var(--dark); }
.scan-before, .scan-after { position: absolute; inset: 0; }
.scan-before img { filter: grayscale(1) contrast(1.1); }
.scan-after { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.scan-beam { position: absolute; top: 0; bottom: 0; left: var(--x); width: 6px; margin-left: -3px; background: var(--accent); pointer-events: none; }
.scan-beam::before { content: ""; position: absolute; top: 0; bottom: 0; right: 100%; width: 72px; background: var(--accent); opacity: .22; }
.scan-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.hero-scan:has(.scan-range:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }

/* Intro */
.intro { padding: clamp(48px, 7vw, 96px) var(--pad); }
.intro-lead { font-size: clamp(1.375rem, 2.2vw, 2rem); line-height: 1.2; margin-top: 32px; max-width: 34em; min-height: 3.6em; }
.intro-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 72px); }
.intro-cols strong { font-weight: 700; }
[data-words] .w { transition: opacity .25s linear; }

/* Data: cards fold into spines. Without the pin (phone, reduced motion) they simply stack. */
.deck-stage { padding: var(--pad) var(--pad) 56px; }
.deck-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.deck-band { display: grid; gap: 12px; margin-top: 32px; }
.card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.1; }
.card .pick { margin-top: auto; }
.card-0 { background: var(--t1); }
.card-1 { background: var(--t2); }
.card-2 { background: var(--t3); }
.deck-foot { margin-top: 24px; }
.deck-foot a { font-weight: 500; margin-left: 8px; }

.spine { display: none; }

.deck.is-pinned { height: 240svh; }
.deck.is-pinned .deck-stage { padding-bottom: var(--pad); position: sticky; top: calc(var(--bar) + var(--top) + 2 * var(--gap)); height: calc(100svh - var(--bar) - var(--top) - 3 * var(--gap)); min-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.deck.is-pinned .deck-band { display: block; position: relative; flex: 1; min-height: 280px; overflow: hidden; }
.deck.is-pinned .card { position: absolute; top: 0; bottom: 0; left: 0; width: var(--card-w, 620px); padding: 0; will-change: transform; cursor: pointer; display: block; }
.deck.is-pinned .card-face { position: absolute; inset: 0; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.deck.is-pinned .card h3 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.02em; }
.deck.is-pinned .card p { font-size: var(--step-lead); line-height: 1.25; max-width: 24em; }
/* Folded card: its title stands on the spine, like a binder on a shelf. */
.deck.is-pinned .spine { display: block; position: absolute; top: 24px; left: 20px; bottom: 24px; opacity: 0; padding: 0; border: 0; background: none; writing-mode: vertical-rl; transform: rotate(180deg); font-size: var(--step-lead); font-weight: 500; line-height: 1.1; text-align: left; cursor: pointer; }

/* The service tick box, the page's live thing */
.pick { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 8px 12px 8px 8px; background: rgba(15, 35, 27, .08); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.pick:hover { background: rgba(15, 35, 27, .16); }
.pick:active { transform: scale(.97); }
.pick input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.pick:has(input:checked) { background: var(--ink); color: var(--tile); }
.pick:has(input:checked) input { accent-color: var(--accent); }

/* Administration */
.admin { padding: var(--pad) var(--pad) clamp(40px, 4vw, 56px); container-type: inline-size; }
.giant { font-size: 12cqw; line-height: .9; white-space: nowrap; }
.giant span { display: inline-block; }
.admin-grid { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gap); margin-top: 24px; align-items: start; }
.admin-media { display: grid; gap: 20px; position: sticky; top: calc(var(--top) + 3 * var(--gap)); }
.admin-media .photo { aspect-ratio: 4 / 3; }
.bars { display: grid; gap: 6px; }
.bar { background: var(--tile-2); transition: background .25s; }
.bar:hover { background: var(--t1); }
.bar[open] { background: var(--t2); }
.bar summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 60px; padding: 12px 20px; font-weight: 500; cursor: pointer; list-style: none; }
.bar summary::-webkit-details-marker { display: none; }
.bar summary::after { content: "+"; font-size: 1.75rem; line-height: 1; transition: transform .35s var(--ease); }
.bar[open] summary::after { transform: rotate(45deg); }
.bar:not([open]) .pick { display: none; }
.bar-panel { padding: 0 20px 20px; display: grid; gap: 14px; justify-items: start; }

/* Consulting */
.consult { display: grid; grid-template-columns: 9fr 3fr; gap: var(--gap); }
.consult-main { background: var(--dark); color: var(--tile); padding: clamp(48px, 5vw, 72px) var(--pad) var(--pad); }
.consult-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
.consult-head .lead { margin-top: 16px; }
.btn { flex: none; display: inline-block; background: var(--accent); color: var(--ink); padding: 16px 24px; font-weight: 500; text-decoration: none; transition: background .2s, transform .15s; }
.btn:hover { background: #3fd694; }
.btn:active { transform: scale(.97); }
.bands { display: grid; gap: 4px; }
.band { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 16px 20px; background: var(--dark-2); transition: background .25s, transform .35s var(--ease); }
.band:nth-child(even) { background: var(--dark-3); }
.band:hover { background: var(--field); transform: translateX(8px); }
.band h3 { font-size: var(--step-body); line-height: 1.25; }
.band p { font-size: 1rem; margin-top: 2px; }
.band .pick { flex: none; background: rgba(244, 246, 241, .12); }
.band .pick:hover { background: rgba(244, 246, 241, .22); }
.band .pick input { accent-color: var(--accent); }
.band .pick:has(input:checked) { background: var(--accent); color: var(--ink); }
.band .pick:has(input:checked) input { accent-color: var(--ink); }
.consult-side { display: grid; grid-template-rows: 1fr 1fr; gap: var(--gap); }
.consult-side .photo { min-height: 280px; }
[data-drift] .ph img { height: 116%; }

/* About */
.about { padding: clamp(48px, 7vw, 96px) var(--pad) var(--pad); }
.about-lead { margin-top: 24px; max-width: 30em; }
.about-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 16px; margin-top: clamp(40px, 5vw, 72px); }
.about-photo { aspect-ratio: 16 / 10; }
.about-photo:hover .ph img { filter: none; }
.about-note { position: absolute; top: 0; right: 0; width: min(340px, 50%); padding: 20px; background: var(--tile); font-size: 1rem; }
.about-side { display: grid; grid-template-rows: 3fr 2fr; gap: 16px; }
.about-place { background: var(--field); color: #fff; padding: var(--pad); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.about-place .lead { font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-weight: 500; line-height: 1.1; }
.about-place a { font-weight: 500; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.facts dt { font-size: 1rem; color: var(--soft); }
.facts dd { font-weight: 500; line-height: 1.2; }

/* Contact */
.contact { background: var(--field); color: #fff; padding: 48px 0 var(--pad); overflow: hidden; }
.strip { overflow: hidden; }
.strip-track { display: flex; gap: var(--gap); width: max-content; animation: strip 60s linear infinite; }
.strip-item { height: 150px; flex: none; }
.strip-item:nth-child(3n + 1) { width: 112px; }
.strip-item:nth-child(3n + 2) { width: 150px; }
.strip-item:nth-child(3n) { width: 225px; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
@keyframes strip { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.contact-body { padding: clamp(40px, 5vw, 72px) var(--pad) 0; }
.contact-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.notice { margin-top: 24px; padding: 16px 20px; background: var(--accent); color: var(--ink); font-weight: 500; }
.notice-err { background: #fff; color: #8f1d1d; }
.slip { margin-top: 32px; padding: 20px; background: var(--tile); color: var(--ink); }
.slip h3 { font-size: var(--step-lead); line-height: 1.2; margin-bottom: 8px; }
.slip ul { display: flex; flex-wrap: wrap; gap: 6px; }
.slip li { padding: 4px 10px; background: var(--t1); }
.form { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: var(--gap); }
.cell { background: var(--field-2); padding: 12px 20px; display: grid; gap: 4px; transition: background .2s; align-content: start; }
.cell:focus-within { background: var(--field-3); }
.cell label { font-size: var(--step-small); }
.cell input, .cell textarea { width: 100%; background: none; border: 0; padding: 4px 0; font-size: var(--step-lead); outline: 0; resize: vertical; color: #fff; }
.cell-zprava { grid-column: 1 / -1; }
.cell-submit { grid-column: 1 / -1; min-height: 88px; border: 0; background: var(--ink); color: #fff; font-size: var(--step-lead); font-weight: 500; place-items: center; align-content: center; cursor: pointer; transition: background .2s, color .2s; }
.cell-submit:hover, .cell-submit:focus-visible { background: var(--accent); color: var(--ink); }
.err { font-size: var(--step-small); font-weight: 500; }
.hp { position: absolute; left: -9999px; }
.form-note { margin-top: 12px; }

/* Footer: the last rows of the board */
.foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.foot .tile { padding: var(--pad); }
.foot-statement { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 220px; }
.foot-lead { font-size: var(--step-lead); line-height: 1.2; }
.foot-nav { grid-column: span 3; display: grid; align-content: start; justify-items: start; gap: 4px; }
.foot-nav a { position: relative; text-decoration: none; }
.foot-place { grid-column: span 2; }
.foot-mail { grid-column: span 3; display: flex; align-items: flex-end; font-size: var(--step-lead); overflow-wrap: anywhere; line-height: 1.15; }
.foot-word { grid-column: span 8; background: var(--ink); color: var(--tile); min-height: 320px; display: flex; align-items: flex-end; font-size: 7vw; font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: 1; overflow: hidden; white-space: nowrap; }
.foot-word > span { display: inline-block; }
.foot-word .l { display: inline-block; white-space: pre; }
.foot-cta { grid-column: span 4; background: var(--accent); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; font-size: clamp(1.5rem, 2vw, 1.75rem); font-weight: 500; text-decoration: none; transition: background .25s; }
.foot-cta svg { align-self: flex-end; transition: transform .35s var(--ease); }
.foot-cta:hover { background: #3fd694; }
.foot-cta:hover svg { transform: translate(6px, -6px); }
.foot-credits { grid-column: 1 / -1; }
.foot-credits summary { cursor: pointer; }
.foot-credits .small { margin-top: 8px; max-width: 75ch; }
.slip p, .notice { max-width: 75ch; }

/* Plain pages */
.page { margin-top: var(--gap); padding: clamp(48px, 7vw, 96px) var(--pad); min-height: 60svh; }
.page h1 { font-size: var(--step-head); margin-bottom: 32px; }
.prose { max-width: 42em; }
.prose > * + * { margin-top: 1em; }

/* The WordPress toolbar for logged-in users: fixed from 601px up. */
@media (min-width: 783px) { .admin-bar { --bar: 32px; } }
@media (min-width: 601px) and (max-width: 782px) { .admin-bar { --bar: 46px; } }

@media (min-width: 1280px) {
	.top-nav { padding-left: calc(50vw - var(--top) - 2 * var(--gap)); }
}

@media (max-width: 1100px) {
	.intro-cols { grid-template-columns: 1fr 1fr; }
	.consult { grid-template-columns: 1fr; }
	.consult-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
	.about-grid { grid-template-columns: 1fr; }
	.about-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	:root { --gap: 6px; }
	/* Small screens keep their height for content; the bar stays at the top of the page. */
	.top { position: relative; top: auto; }
	html { scroll-padding-top: var(--gap); }
	.top-nav { display: none; }
	.top-menu { display: block; }
	.hero { grid-template-rows: auto; height: auto; min-height: 0; max-height: none; }
	.hero-name { grid-column: 1 / -1; min-height: 22svh; }
	.hero-name h1 { font-size: 19vw; }
	.hero-scan { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
	.hero-pair { grid-column: 1 / -1; order: 3; }
	.hero-dark, .hero-accent { min-height: 200px; font-size: 1.5rem; }
	.hero-photo { grid-column: 1 / -1; order: 4; aspect-ratio: 16 / 10; }
	.admin-grid { grid-template-columns: 1fr; }
	.admin-media { position: static; }
	.consult-head { flex-direction: column; }
	.band { flex-direction: column; align-items: flex-start; gap: 12px; }
	.form { grid-template-columns: 1fr; }
	.about-note { position: static; width: auto; padding: 16px 0 0; background: none; }
	.about-photo { aspect-ratio: auto; overflow: visible; background: none; }
	.about-photo .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
	.about-side { grid-template-columns: 1fr; }
	.strip-item { height: 110px; }
	.contact-head { flex-direction: column; align-items: flex-start; }
	.foot { grid-template-columns: 1fr 1fr; }
	.foot .tile { padding: 20px; }
	.foot-word { grid-column: 1 / -1; order: -2; min-height: 160px; font-size: 11.4vw; }
	.foot-cta { grid-column: 1 / -1; order: -1; min-height: 160px; }
	.foot-nav, .foot-mail, .foot-place, .foot-statement { grid-column: span 1; min-height: 0; }
	.foot-statement { grid-column: 1 / -1; }
	.foot-mail { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	.hero-dark, .hero-accent { min-height: 0; aspect-ratio: 1; padding: 16px; font-size: 1.125rem; }
	.hero-name { min-height: 30svh; }
	.hero-scan { aspect-ratio: 4 / 3; }
	.intro-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.strip-track { animation: none; }
	.photo:hover::after { animation: none; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}
