/*
Theme Name: Hancas
Theme URI: https://hancas.nereal.us
Description: Lightweight one-page theme for the Hancas site. No page builder, no jQuery, no external fonts or scripts. Content of the front page is edited in inc/content.php.
Author: Hancas
Author URI: https://hancas.nereal.us
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: hancas
*/

:root {
	--bg: #fff;
	--bg-alt: #f5f6f8;
	--text: #14161a;
	--muted: #5b616b;
	--line: #e3e5e9;
	--accent: #1f5eff;
	--accent-strong: #1747c9;
	--wrap: 1120px;
	--pad: 20px;
	--radius: 10px;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #111317;
		--bg-alt: #1a1d23;
		--text: #eceef2;
		--muted: #a2a8b3;
		--line: #2a2e36;
		--accent: #6f96ff;
		--accent-strong: #3b66f0;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--bg); padding: 8px 14px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.site-logo { display: block; line-height: 0; text-decoration: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.wm-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.wm-tag { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.site-logo img { height: 40px; width: auto; }
.site-title { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--text); line-height: 1; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a { border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; color: var(--text); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 8px var(--pad) 16px; }
	.main-nav a { display: block; padding: 12px 0; }
}

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 8px; line-height: 1.2; }
.section .lead { color: var(--muted); max-width: 640px; margin: 0 0 36px; }

.hero { position: relative; overflow: hidden; color: #fff; padding: 120px 0 104px; background: #0b1020; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; opacity: 0; transition: opacity 1.4s ease; }
.hero-bg img.on { opacity: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(8,12,24,.88) 0%, rgba(8,12,24,.62) 55%, rgba(8,12,24,.30) 100%); }
.hero .eyebrow { margin: 0 0 16px; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: #b9c8ff; font-weight: 600; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.08; margin: 0 0 20px; letter-spacing: -.02em; max-width: 780px; }
.hero-text { font-size: 1.15rem; color: #dfe4f2; max-width: 640px; margin: 0 0 32px; }
.btn { display: inline-block; background: var(--accent-strong); color: #fff; text-decoration: none; font-weight: 600; padding: 13px 26px; border-radius: 8px; border: 0; cursor: pointer; font-size: 1rem; transition: background .15s, transform .15s; }
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn.light { background: #fff; color: #0b1020; }
.btn.light:hover { background: #e8eeff; color: #0b1020; }
.btn.outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); margin-left: 8px; }
.btn.outline:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 520px) { .btn.outline { margin: 12px 0 0; } .hero { padding: 88px 0 72px; } }

.about-grid { display: grid; gap: 48px; grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }
.about-p { color: var(--muted); font-size: 1.05rem; margin: 0 0 16px; }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li { border: 1px solid var(--line); background: var(--bg-alt); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .95rem; }

.num { display: inline-block; font-weight: 700; font-size: .9rem; color: var(--accent); letter-spacing: .06em; margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.steps li { border-top: 3px solid var(--accent); padding-top: 18px; }
.steps h3 { margin: 0 0 8px; font-size: 1.25rem; }
.steps p { margin: 0; color: var(--muted); }


.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 8px 28px rgba(15,25,60,.10); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }

.works { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.work { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.work[hidden] { display: none; }
.work a { display: block; text-decoration: none; color: inherit; }
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 14px; }
.work figcaption { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.work figcaption span { font-size: .8rem; color: var(--muted); }


/* contact form */
.contact-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1.3fr; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 24px; } }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.form-row input, .form-row textarea { width: 100%; padding: 11px 12px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.form-row textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid var(--line); }
.notice.ok { border-color: #2e9d57; }
.notice.err { border-color: #d33; }

/* content pages */
.entry { padding: 56px 0 72px; max-width: 760px; }
.entry h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 20px; }
.entry .meta { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.entry-content > * + * { margin-top: 1em; }
.post-list article { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 4px; font-size: 1.3rem; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.contact-line { font-size: 1.1rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
