/*
Theme Name: Aleš Gaber
Theme URI: https://alesgaber.com
Author: Aleš Gaber
Author URI: https://alesgaber.com
Description: Lightweight one-page block theme for alesgaber.com. Personal brand site for senior e-commerce development, styled to match swiftforgeweb.com (Syne + DM Sans, teal accent, near-white base). Built for speed — self-hosted fonts, no framework, minimal JS.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alesgaber
*/

/* ============================================================
   Tokens (mirrored from theme.json for use in this stylesheet)
   ============================================================ */
:root {
	--ag-base: #f7f8f9;
	--ag-surface: #ffffff;
	--ag-ink: #11151b;
	--ag-body: #22262d;
	--ag-muted: #6c7480;
	--ag-muted-dark: #b2b2be;
	--ag-line: #e7e9ee;
	--ag-line-dark: #262b34;
	--ag-accent: #80a9af;
	--ag-accent-ink: #4f7a80;
	--ag-accent-soft: #eaf1f2;
	--ag-cta: #32373c;
	--ag-cta-hover: #23272b;
	--ag-shadow: 0 1px 2px rgba(17,21,27,.04), 0 8px 30px rgba(17,21,27,.06);
	--ag-shadow-lg: 0 24px 60px rgba(17,21,27,.10);
	--ag-radius: 16px;
	--ag-pill: 9999px;
	--ag-maxw: 1120px;
	--ag-pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* ============================================================
   Base / reset niceties
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ag-base);
	color: var(--ag-body);
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ag-accent-ink); text-decoration: none; }
h1, h2, h3, h4 {
	font-family: "Syne", "DM Sans", sans-serif;
	color: var(--ag-ink);
	line-height: 1.08;
	letter-spacing: -0.02em;
	font-weight: 800;
	margin: 0;
}
p { margin: 0; }
::selection { background: var(--ag-accent); color: #fff; }

.ag-wrap { width: 100%; max-width: var(--ag-maxw); margin-inline: auto; padding-inline: var(--ag-pad); }
.ag-narrow { max-width: 720px; }

/* Section rhythm */
.ag-section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.ag-eyebrow {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--ag-accent-ink);
	font-family: "Syne", sans-serif;
	margin-bottom: 1rem;
}
.ag-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--ag-accent); border-radius: 2px; }
.ag-section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.ag-section-head h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
.ag-section-head p { margin-top: 1rem; color: var(--ag-muted); font-size: 1.1rem; }

/* ============================================================
   Buttons
   ============================================================ */
.ag-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: "Syne", sans-serif;
	font-weight: 700; font-size: 1rem; line-height: 1;
	padding: .95rem 1.6rem;
	border-radius: var(--ag-pill);
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
	white-space: nowrap;
}
.ag-btn:hover { transform: translateY(-2px); }
.ag-btn-primary { background: var(--ag-cta); color: #fff; box-shadow: 0 6px 18px rgba(50,55,60,.22); }
.ag-btn-primary:hover { background: var(--ag-cta-hover); color: #fff; box-shadow: 0 10px 26px rgba(50,55,60,.28); }
.ag-btn-ghost { background: transparent; color: var(--ag-ink); border-color: rgba(17,21,27,.18); }
.ag-btn-ghost:hover { background: var(--ag-ink); color: #fff; border-color: var(--ag-ink); }
.ag-btn-lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.ag-btn-ondark.ag-btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.ag-btn-ondark.ag-btn-ghost:hover { background: #fff; color: var(--ag-ink); }

/* ============================================================
   Header / sticky anchor nav (CSS-only mobile toggle)
   ============================================================ */
.ag-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(247,248,249,.82);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--ag-line);
}
.ag-nav { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.ag-brand {
	font-family: "Syne", sans-serif; font-weight: 800; font-size: 1.15rem;
	color: var(--ag-ink); letter-spacing: -0.02em; margin-right: auto;
	display: inline-flex; align-items: center; gap: .55rem;
}
.ag-brand .ag-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ag-accent); box-shadow: 0 0 0 4px var(--ag-accent-soft); }
.ag-navlinks { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.ag-navlinks a {
	font-size: .96rem; font-weight: 500; color: var(--ag-body);
	transition: color .15s ease; position: relative;
}
.ag-navlinks a:hover { color: var(--ag-ink); }
.ag-nav .ag-btn { padding: .7rem 1.25rem; font-size: .95rem; }

.ag-navtoggle, .ag-navtoggle-label { display: none; }

/* ============================================================
   Hero
   ============================================================ */
.ag-hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); position: relative; overflow: hidden; }
.ag-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
	background: radial-gradient(52% 48% at 88% -8%, rgba(128,169,175,.13), transparent 62%);
}
.ag-hero > * { position: relative; z-index: 1; }
.ag-badge {
	display: inline-flex; align-items: center; gap: .55rem;
	background: var(--ag-surface); border: 1px solid var(--ag-line);
	padding: .5rem .95rem; border-radius: var(--ag-pill);
	font-size: .86rem; font-weight: 600; color: var(--ag-body);
	box-shadow: var(--ag-shadow); margin-bottom: 1.75rem;
}
.ag-badge .ag-live { width: 8px; height: 8px; border-radius: 50%; background: #35c07a; position: relative; }
.ag-badge .ag-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(53,192,122,.35); animation: ag-pulse 2s ease-out infinite; }
@keyframes ag-pulse { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.ag-hero h1 {
	font-size: clamp(2.4rem, 1.3rem + 4.6vw, 4.4rem);
	max-width: 15ch; margin-bottom: 1.4rem;
}
.ag-hero h1 .ag-hl { color: var(--ag-accent-ink); }
.ag-hero .ag-lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--ag-body); max-width: 60ch; margin-bottom: 2.2rem; }
.ag-cta-group { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.ag-cta-note { font-size: .9rem; color: var(--ag-muted); margin-top: 1.5rem; }

/* ============================================================
   What I do — 6 tiles
   ============================================================ */
.ag-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.ag-tile {
	display: block; color: inherit;
	background: var(--ag-surface); border: 1px solid var(--ag-line);
	border-radius: var(--ag-radius); padding: 1.6rem 1.5rem;
	box-shadow: var(--ag-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.ag-tile:hover h3 { color: var(--ag-accent-ink); }
.ag-tile:hover { transform: translateY(-4px); box-shadow: var(--ag-shadow-lg); border-color: #d7dbe2; }
.ag-tile-ic {
	width: 44px; height: 44px; border-radius: 12px;
	display: grid; place-items: center; margin-bottom: 1.1rem;
	background: var(--ag-accent-soft); color: var(--ag-accent-ink);
}
.ag-tile-ic svg { width: 22px; height: 22px; }
.ag-tile h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: .5rem; }
.ag-tile p { color: var(--ag-muted); font-size: .98rem; line-height: 1.55; }

/* ============================================================
   Proof — stats + case cards
   ============================================================ */
.ag-proof { background: var(--ag-surface); border-block: 1px solid var(--ag-line); }
.ag-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.ag-stat { text-align: center; padding: 1.25rem; }
.ag-stat .ag-num { font-family: "Syne", sans-serif; font-weight: 800; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); color: var(--ag-ink); line-height: 1; letter-spacing: -.03em; }
.ag-stat .ag-num em { font-style: normal; color: var(--ag-accent-ink); }
.ag-stat .ag-lbl { margin-top: .6rem; color: var(--ag-muted); font-size: .98rem; }
.ag-stat a { color: inherit; border-bottom: 1px dashed var(--ag-accent); }

.ag-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.ag-case {
	border: 1px solid var(--ag-line); border-radius: var(--ag-radius);
	padding: 1.5rem; background: var(--ag-base); display: flex; flex-direction: column; gap: .9rem;
}
.ag-case-tag { font-family: "Syne", sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ag-accent-ink); }
.ag-case h3 { font-size: 1.1rem; font-weight: 700; }
.ag-case .ag-prob { color: var(--ag-body); font-size: .96rem; }
.ag-case .ag-metric {
	display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
	margin-top: auto; padding-top: .9rem; border-top: 1px dashed var(--ag-line);
}
.ag-case .ag-metric b { font-family: "Syne", sans-serif; font-size: 1.5rem; color: var(--ag-ink); font-weight: 800; letter-spacing: -.02em; }
.ag-case .ag-metric .ag-arrow { color: var(--ag-accent); font-weight: 700; }
.ag-case .ag-metric span { color: var(--ag-muted); font-size: .9rem; }
.ag-placeholder-note { margin-top: 1.5rem; font-size: .88rem; color: var(--ag-muted); }
.ag-placeholder-note code { background: var(--ag-accent-soft); color: var(--ag-accent-ink); padding: .1rem .4rem; border-radius: 5px; font-size: .85em; }

/* ============================================================
   How I work — dark band
   ============================================================ */
.ag-dark { background: var(--ag-ink); color: var(--ag-muted-dark); }
.ag-dark h2 { color: #fff; }
.ag-dark .ag-eyebrow { color: var(--ag-accent); }
.ag-dark .ag-eyebrow::before { background: var(--ag-accent); }
.ag-work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; margin-top: 1rem; }
.ag-work-item { display: flex; gap: 1rem; align-items: flex-start; padding-block: .5rem; }
.ag-work-item .ag-check {
	flex: none; width: 28px; height: 28px; border-radius: 8px;
	background: rgba(128,169,175,.16); color: var(--ag-accent);
	display: grid; place-items: center; margin-top: .1rem;
}
.ag-work-item .ag-check svg { width: 15px; height: 15px; }
.ag-work-item h3 { color: #fff; font-size: 1.08rem; font-weight: 700; margin-bottom: .25rem; }
.ag-work-item p { font-size: .98rem; line-height: 1.55; color: var(--ag-muted-dark); }

/* ============================================================
   Contact
   ============================================================ */
.ag-contact { text-align: center; }
.ag-contact .ag-section-head { margin-inline: auto; }
.ag-contact h2 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); }
.ag-contact-lead { color: var(--ag-muted); font-size: 1.15rem; max-width: 46ch; margin: 1rem auto 2.2rem; }
.ag-contact-btns { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.ag-crosslink {
	margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--ag-line);
	font-size: 1rem; color: var(--ag-muted);
}
.ag-crosslink a { color: var(--ag-accent-ink); font-weight: 600; border-bottom: 1px solid transparent; }
.ag-crosslink a:hover { border-color: var(--ag-accent); }

/* Contact form */
.ag-form { max-width: 540px; margin: 0 auto; text-align: left; display: grid; gap: 1.1rem; }
.ag-field label {
	display: block; font-family: "Syne", sans-serif; font-weight: 700;
	font-size: .88rem; color: var(--ag-ink); margin-bottom: .45rem;
}
.ag-field input, .ag-field textarea {
	width: 100%; padding: .9rem 1.05rem; font: inherit; color: var(--ag-ink);
	background: var(--ag-surface); border: 1.5px solid var(--ag-line);
	border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease;
}
.ag-field input::placeholder, .ag-field textarea::placeholder { color: #a7adb7; }
.ag-field input:focus, .ag-field textarea:focus {
	outline: none; border-color: var(--ag-accent);
	box-shadow: 0 0 0 3px rgba(128,169,175,.22);
}
.ag-field textarea { resize: vertical; min-height: 140px; }
.ag-form .ag-btn { width: 100%; }
.ag-form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ag-form-fine { font-size: .82rem; color: var(--ag-muted); text-align: center; margin-top: -.2rem; }
.ag-alert {
	padding: .95rem 1.15rem; border-radius: 12px; font-size: .96rem;
	text-align: left; margin-bottom: 1.4rem;
}
.ag-alert-ok  { background: #e8f5ee; color: #1b6a3e; border: 1px solid #bde0c9; }
.ag-alert-err { background: #fdecec; color: #a32626; border: 1px solid #f2c6c6; }

/* ============================================================
   Footer
   ============================================================ */
.ag-footer { background: #101319; color: #c3c7cf; }
.ag-footer-top {
	display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.5rem;
	padding-block: clamp(3rem, 6vw, 4.5rem);
}
.ag-footer .ag-brand-light { color: #fff; margin: 0 0 1rem; font-size: 1.15rem; display: inline-flex; }
.ag-footer-blurb { color: #9aa0aa; font-size: .95rem; line-height: 1.6; max-width: 44ch; }
.ag-footer-avail { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.2rem; font-size: .88rem; color: #c3c7cf; }
.ag-footer-avail .ag-live { width: 8px; height: 8px; border-radius: 50%; background: #35c07a; flex: none; }
.ag-footer-col h3 {
	font-family: "Syne", sans-serif; color: #fff; font-size: .78rem; font-weight: 700;
	letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.ag-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.ag-footer-col a { color: #aeb3bd; font-size: .95rem; transition: color .15s ease; }
.ag-footer-col a:hover { color: var(--ag-accent); }
.ag-footer-bar { background: #000000; }
.ag-footer-bar-in {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: .4rem 1.5rem; padding-block: 1.3rem;
}
.ag-footer-bar span { color: #7f858f; font-size: .85rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
	.ag-tiles, .ag-cases { grid-template-columns: repeat(2, 1fr); }
	.ag-work { grid-template-columns: 1fr; gap: 1.25rem; }
	.ag-footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
	.ag-footer-brandcol { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
	.ag-navlinks {
		position: absolute; top: 72px; left: 0; right: 0;
		flex-direction: column; align-items: flex-start; gap: 0;
		background: var(--ag-surface); border-bottom: 1px solid var(--ag-line);
		padding: .5rem var(--ag-pad) 1.25rem;
		box-shadow: var(--ag-shadow-lg);
		clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none;
		transition: clip-path .25s ease, opacity .2s ease;
	}
	.ag-navlinks li { width: 100%; }
	.ag-navlinks li a { display: block; width: 100%; padding: .8rem 0; border-bottom: 1px solid var(--ag-line); font-size: 1.05rem; }
	.ag-navlinks li:last-child { padding-top: 1rem; }
	.ag-navlinks .ag-btn { width: 100%; }
	.ag-navtoggle:checked ~ .ag-navlinks { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
	.ag-navtoggle-label {
		display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
		width: 44px; height: 44px; cursor: pointer; padding: 10px; margin-right: -10px;
	}
	.ag-navtoggle-label span { display: block; height: 2px; background: var(--ag-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
	.ag-navtoggle:checked ~ .ag-navtoggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.ag-navtoggle:checked ~ .ag-navtoggle-label span:nth-child(2) { opacity: 0; }
	.ag-navtoggle:checked ~ .ag-navtoggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.ag-tiles, .ag-cases, .ag-stats { grid-template-columns: 1fr; }
	.ag-hero h1 { max-width: 100%; }
	.ag-footer-top { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation: none !important; transition: none !important; }
}

/* ============================================================
   Subpages — breadcrumbs, page hero, prose, feature grids, CTA band
   ============================================================ */
.ag-crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .85rem; color: var(--ag-muted); margin-bottom: 1.1rem; }
.ag-crumbs a { color: var(--ag-muted); }
.ag-crumbs a:hover { color: var(--ag-accent-ink); }
.ag-crumbs span[aria-current] { color: var(--ag-ink); }
.ag-crumbs .ag-sep { color: var(--ag-muted-dark); }

.ag-page-hero { padding-block: clamp(2.5rem, 6vw, 4.25rem) clamp(1.25rem, 3vw, 2rem); position: relative; overflow: hidden; }
.ag-page-hero::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: radial-gradient(48% 46% at 92% -10%, rgba(128,169,175,.12), transparent 62%);
}
.ag-page-hero > * { position: relative; z-index: 1; }
.ag-page-hero h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.35rem); max-width: 20ch; }
.ag-page-hero .ag-lead { margin-top: 1.1rem; color: var(--ag-body); font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); max-width: 62ch; }

/* Rich text content */
.ag-prose { max-width: 760px; }
.ag-prose > p { margin: 0 0 1.15rem; color: var(--ag-body); font-size: 1.075rem; }
.ag-prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.05rem); margin: 2.6rem 0 1rem; }
.ag-prose h3 { font-size: 1.25rem; margin: 1.9rem 0 .6rem; }
.ag-prose a { color: var(--ag-accent-ink); border-bottom: 1px solid transparent; }
.ag-prose a:hover { border-color: var(--ag-accent); }

.ag-checklist { list-style: none; margin: 1.1rem 0 1.6rem; padding: 0; display: grid; gap: .7rem; max-width: 760px; }
.ag-checklist li { position: relative; padding-left: 1.9rem; color: var(--ag-body); }
.ag-checklist li::before {
	content: ""; position: absolute; left: 0; top: .12em;
	width: 20px; height: 20px; border-radius: 6px; background: var(--ag-accent-soft);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f7a80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center; background-size: 13px;
}

/* Two-column content + sticky aside */
.ag-two { display: grid; grid-template-columns: 1.75fr 1fr; gap: 3rem; align-items: start; }
.ag-aside {
	background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-radius);
	padding: 1.6rem; box-shadow: var(--ag-shadow); position: sticky; top: 96px;
}
.ag-aside h3 { font-size: 1.05rem; margin-bottom: .9rem; }
.ag-aside ul { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.ag-aside ul a { color: var(--ag-body); font-size: .96rem; }
.ag-aside ul a:hover { color: var(--ag-accent-ink); }
.ag-aside .ag-btn { width: 100%; }

/* Related service cards row */
.ag-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ag-related a {
	display: block; background: var(--ag-surface); border: 1px solid var(--ag-line);
	border-radius: var(--ag-radius); padding: 1.3rem; box-shadow: var(--ag-shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ag-related a:hover { transform: translateY(-4px); box-shadow: var(--ag-shadow-lg); border-color: #d7dbe2; }
.ag-related h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.ag-related p { color: var(--ag-muted); font-size: .92rem; }
.ag-more { color: var(--ag-accent-ink); font-weight: 600; font-size: .9rem; margin-top: .8rem; display: inline-block; }
a.ag-tile:hover .ag-more { text-decoration: underline; }

/* CTA band */
.ag-cta-band { background: var(--ag-surface); border-top: 1px solid var(--ag-line); text-align: center; }
.ag-cta-band h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
.ag-cta-band p { color: var(--ag-muted); margin: 1rem auto 1.9rem; max-width: 50ch; font-size: 1.1rem; }

@media (max-width: 860px) {
	.ag-two { grid-template-columns: 1fr; gap: 2rem; }
	.ag-aside { position: static; }
	.ag-related { grid-template-columns: 1fr; }
}
