/*
Theme Name: izi-automation
Theme URI: https://izi-automation.nl
Author: izi-automation
Description: Custom dark and orange theme for izi-automation. Bold editorial homepage plus a built-in Downloads section for website templates, PDFs and wallpapers, with optional login gate and download counter.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: izi
*/

:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --bg-3: #171b24;
  --line: #232835;
  --text: #e9ecf2;
  --muted: #9aa3b2;
  --orange: #f07535;
  --orange-2: #ff9a5c;
  --orange-ink: #1a0d05;
  --radius: 14px;
  --wrap: 1180px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-2); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: var(--orange); color: var(--orange-ink); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.eyebrow { font: 500 13px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--orange); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: 600 15px/1 var(--font-body); letter-spacing: .02em; border: 2px solid transparent; cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--orange); color: var(--orange-ink); }
.btn-primary:hover { background: var(--orange-2); color: var(--orange-ink); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--orange); z-index: 200; }

/* header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(11,13,18,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.admin-bar .site-header { top: 32px; }
.site-header.scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font: 700 20px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.brand:hover { color: var(--text); }
.brand .dash { color: var(--orange); }
.custom-logo { height: 42px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; align-items: center; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--text); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 24px 16px 32px; transform: translateY(-130%); transition: transform .35s; }
  .nav.open { transform: none; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 18px; }
  .nav a { font-size: 20px; color: var(--text); }
}

/* hero */
.hero { position: relative; min-height: calc(100svh - 72px); display: grid; align-items: center; overflow: hidden; padding: 80px 0; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60% 50% at 80% 30%, rgba(240,117,53,.18), transparent 70%),
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  opacity: .55; -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 85%); mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 85%); }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(52px, 11vw, 132px); font-weight: 700; text-transform: uppercase; line-height: .92; letter-spacing: -.04em; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--orange); }
.hero-sub { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 560px; margin: 26px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.float-code { position: absolute; z-index: 1; font: 500 13px/1.6 var(--font-mono); color: var(--muted); background: rgba(17,20,27,.85); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; white-space: pre; box-shadow: 0 20px 50px rgba(0,0,0,.4); animation: drift 9s ease-in-out infinite; }
.float-code b { color: var(--orange); font-weight: 500; }
.float-code i { color: #7fc8a9; font-style: normal; }
.fc-1 { right: 4%; top: 16%; }
.fc-2 { right: 12%; bottom: 12%; animation-delay: -4s; }
@keyframes drift { 50% { transform: translateY(-14px); } }
@media (max-width: 1080px) { .float-code { display: none; } }

/* marquee */
.band { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 18px 0; }
.band-track { display: flex; gap: 48px; width: max-content; animation: scroll 32s linear infinite; font: 600 clamp(18px, 2.4vw, 26px)/1 var(--font-display); text-transform: uppercase; color: var(--muted); }
.band-track span::after { content: "\25C6"; color: var(--orange); margin-left: 48px; font-size: .6em; vertical-align: middle; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* sections */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section-head { max-width: 700px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(36px, 5.5vw, 64px); }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head-row .section-head { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; overflow: hidden; transition: border-color .3s, transform .3s; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(240,117,53,.14), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { border-color: rgba(240,117,53,.5); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: rgba(240,117,53,.12); color: var(--orange); margin-bottom: 22px; }
.card h3 { font-size: 22px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.code-window { background: #07090d; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.code-bar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.code-bar i:first-child { background: var(--orange); }
.code-bar span { margin-left: auto; font: 12px var(--font-mono); color: var(--muted); }
.code-window pre { margin: 0; padding: 22px; font: 14px/1.75 var(--font-mono); color: var(--text); overflow-x: auto; }
.code-window .k { color: var(--orange); }
.code-window .c { color: #5d6678; }
.code-window .s { color: #7fc8a9; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 30px; position: relative; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 8px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }

/* process */
.process { background: var(--orange); color: var(--orange-ink); border-radius: calc(var(--radius) * 1.5); padding: clamp(36px, 6vw, 72px); }
.process .eyebrow { color: var(--orange-ink); }
.process .eyebrow::before { background: var(--orange-ink); }
.process h2 { font-size: clamp(34px, 5vw, 58px); }
.steps { list-style: none; margin: 32px 0 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 28px 0; border-top: 3px solid var(--orange-ink); font-size: clamp(18px, 2.2vw, 22px); }
.steps li:last-child { border-bottom: 3px solid var(--orange-ink); }
.steps strong { font-family: var(--font-display); }
.steps .num { font: 700 clamp(36px, 5vw, 54px)/1 var(--font-display); }
@media (max-width: 520px) { .steps li { grid-template-columns: 64px 1fr; gap: 12px; } }

/* downloads */
.dl-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 10px 18px; border-radius: 999px; font: 500 14px var(--font-body); cursor: pointer; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.active { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.dl-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s, transform .3s; }
.dl-card:hover { border-color: rgba(240,117,53,.5); transform: translateY(-4px); }
.dl-card[hidden] { display: none; }
.dl-thumb { aspect-ratio: 4/3; background: var(--bg-3); position: relative; overflow: hidden; display: grid; place-items: center; }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.dl-card:hover .dl-thumb img { transform: scale(1.05); }
.dl-thumb .ph { font: 700 44px var(--font-display); color: var(--line); text-transform: uppercase; }
.dl-badge { position: absolute; top: 12px; left: 12px; background: rgba(11,13,18,.85); color: var(--orange); font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; }
.dl-lock { left: auto; right: 12px; color: var(--text); }
.dl-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.dl-body h3 { font-size: 20px; margin-bottom: 8px; }
.dl-body h3 a { color: var(--text); }
.dl-body p { color: var(--muted); font-size: 15px; flex: 1; }
.dl-meta { display: flex; justify-content: space-between; align-items: center; font: 12px var(--font-mono); color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 8px; }
.dl-meta a { font-weight: 600; }
.dl-single { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding: 56px 0 100px; }
@media (max-width: 860px) { .dl-single { grid-template-columns: 1fr; } }
.dl-single .dl-thumb { border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 32px; }
.dl-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: 100px; }
.dl-box dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0 0 24px; font-size: 15px; }
.dl-box dt { color: var(--muted); }
.dl-box dd { margin: 0; text-align: right; }
.dl-box .btn { width: 100%; justify-content: center; margin-top: 8px; }
.notice { background: rgba(240,117,53,.08); border: 1px solid rgba(240,117,53,.3); border-radius: 10px; padding: 14px 16px; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; }

/* cta */
.cta { text-align: center; }
.cta h2 { font-size: clamp(40px, 7vw, 88px); text-transform: uppercase; letter-spacing: -.03em; }
.cta h2 span { color: var(--orange); }
.cta p { color: var(--muted); font-size: 19px; max-width: 560px; margin: 0 auto 32px; }

/* content pages */
.page-hero { padding: clamp(60px, 9vw, 110px) 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(40px, 7vw, 80px); }
.page-hero p { color: var(--muted); font-size: 19px; max-width: 620px; margin: 0; }
.entry { padding: 56px 0 100px; }
.entry-content { max-width: 760px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 34px; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { border-left: 3px solid var(--orange); margin: 1.5em 0; padding: 4px 0 4px 22px; color: var(--muted); font-size: 20px; }
.entry-content code { font-family: var(--font-mono); background: var(--bg-3); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.entry-content pre { background: #07090d; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; }
.entry-content input, .entry-content textarea, .entry-content select { width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 14px; font: inherit; }
.alignwide { max-width: var(--wrap); }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: none; }
.post-list { display: grid; gap: 18px; }
.post-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--bg-2); }
.post-item h2 { font-size: 26px; }
.post-item h2 a { color: var(--text); }
.post-item time { font: 12px var(--font-mono); color: var(--muted); }
.post-item p { color: var(--muted); margin: 8px 0 0; }
.pagination, .nav-links { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.page-numbers.current { background: var(--orange); color: var(--orange-ink); border-color: var(--orange); }

/* footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font: 600 13px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--orange); }
.footer-tag { color: var(--muted); max-width: 320px; margin-top: 16px; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font: 13px var(--font-mono); color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
