/* ============================================================
   Juiczy theme — design tokens + base styles
   Tokens are CSS custom properties so we can adjust globally.
   ============================================================ */

:root {
	--juiczy-orange: #FF6B18;
	--ink: #1A1A1A;
	--muted: #6B6B6B;
	--bg: #0d0d0d;
	--bg-soft: #121212;
	--card: rgba(255,255,255,0.04);
	--card-hover: rgba(255,255,255,0.07);
	--border: rgba(255,255,255,0.10);
	--border-strong: rgba(255,255,255,0.20);
	--text: #FAFAFA;
	--text-muted: rgba(255,255,255,0.65);
	--text-faint: rgba(255,255,255,0.40);

	--container: 1080px;
	--container-narrow: 760px;
	--section-py: clamp(64px, 10vw, 128px);

	--radius-card: 12px;
	--radius-btn: 8px;
	--radius-pill: 999px;

	--font-display: 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
	--font-body:    'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
	--font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, video, canvas { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }

ul { padding-left: 1.2em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- buttons ---------- */
.btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: var(--radius-btn);
	font-weight: 600;
	font-size: 15px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: filter .2s, background .2s, border-color .2s, transform .15s;
	white-space: nowrap;
}
.btn-primary { background: var(--juiczy-orange); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: rgba(255,255,255,.10); color: var(--text); border-color: rgba(255,255,255,.15); }
.btn-secondary:hover { background: rgba(255,255,255,.15); }
.btn-pill { border-radius: var(--radius-pill); background: #fff; color: #000; padding: 12px 26px; font-weight: 700; }
.btn-pill:hover { transform: scale(1.03); }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	padding: 18px 0;
	pointer-events: none;
}
.site-header > .container { pointer-events: auto; }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; line-height: 1; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.brand-by { font-size: 11px; color: rgba(255,255,255,.45); letter-spacing: .02em; }
@media (max-width: 600px) {
	.brand-by { display: none; }
}
.primary-nav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.nav-link { text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.85); transition: color .2s; }
.nav-link:hover { color: #fff; }
@media (max-width: 720px) {
	.nav-link.nav-anchor { display: none; }
	.primary-nav { gap: 14px; }
}
.nav-divider { width: 1px; height: 14px; background: rgba(255,255,255,.30); }
.lang-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.lang-toggle .lang { color: rgba(255,255,255,.45); }
.lang-toggle .lang.is-active { color: #fff; font-weight: 700; }
.lang-sep { color: rgba(255,255,255,.30); }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-stage {
	position: relative;
	height: 100vh;
	min-height: 600px;
	overflow: hidden;
	background: linear-gradient(180deg, #0a0a0a 0%, #161616 100%);
}
.hero-canvas {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	opacity: 0.5;
	pointer-events: none;
	mix-blend-mode: screen;
}
.hero-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 24px; pointer-events: none; }
.hero-slide {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center;
	transition: opacity .6s ease, transform .6s ease;
	will-change: opacity, transform;
}
.hero-slide:not(.is-active) { opacity: 0; transform: translateY(20px); pointer-events: none; }
.hero-slide.is-active { opacity: 1; transform: translateY(0); }

.hero-title {
	font-size: clamp(34px, 6vw, 76px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	max-width: 14ch;
	margin: 0 auto 24px;
	white-space: pre-line;
	text-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.hero-title-md {
	font-size: clamp(28px, 5vw, 60px);
	font-weight: 700;
	letter-spacing: -0.02em;
	max-width: 16ch;
	margin: 0 auto 16px;
}
.hero-sub {
	font-size: clamp(13px, 1.3vw, 16px);
	color: rgba(255,255,255,.65);
	letter-spacing: .15em;
	text-transform: uppercase;
}
.hero-sub-mono {
	font-family: var(--font-mono);
	font-size: clamp(13px, 1.2vw, 15px);
	color: rgba(255,255,255,.55);
	letter-spacing: .04em;
	max-width: 50ch;
	margin: 0 auto;
}
.hero-s2 { align-items: flex-start; text-align: left; padding-left: clamp(24px, 8vw, 120px); padding-right: 24px; }
.hero-s2 .hero-title-md, .hero-s2 .hero-sub-mono { margin-left: 0; max-width: 30ch; }
.hero-s3 { align-items: flex-end; text-align: right; padding-right: clamp(24px, 8vw, 120px); padding-left: 24px; }
.hero-s3 .hero-title-md, .hero-s3 .hero-sub-mono { margin-right: 0; max-width: 30ch; }

.hero-scrolling-cue {
	position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
	width: 1px; height: 48px; background: rgba(255,255,255,.20);
}
.hero-scrolling-cue span {
	display: block; width: 1px; height: 16px;
	background: rgba(255,255,255,.7);
	animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(32px); opacity: 0; } }

/* ---------- sections ---------- */
.section { padding: var(--section-py) 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-title { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.01em; }
.section-sub { color: var(--text-muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.7; max-width: 56ch; white-space: pre-line; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- note cards ---------- */
.note-card {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 280px;
	padding: 32px;
	border: 1px solid var(--border);
	border-radius: var(--radius-card);
	background: var(--card);
	text-align: center;
	transition: background .3s, border-color .3s, transform .3s;
}
.note-card:hover { background: var(--card-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.note-card-title { font-size: 20px; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; margin-bottom: 24px; }
.note-card-cta { font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; opacity: .65; }
.note-card:hover .note-card-cta { opacity: 1; }

/* ---------- work cards ---------- */
.work-intro { max-width: 56ch; margin-bottom: 56px; }
.work-card {
	display: flex; flex-direction: column;
	padding: 36px;
	border: 1px solid var(--border);
	border-radius: var(--radius-card);
	background: var(--card);
	transition: background .3s, border-color .3s;
}
.work-card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.work-card-index { font-family: var(--font-mono); font-size: 13px; letter-spacing: .25em; color: var(--juiczy-orange); margin-bottom: 16px; }
.work-card-title { font-size: 24px; line-height: 1.3; margin-bottom: 24px; }
.work-card-list { list-style: none; padding: 0; margin: 0 0 24px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.work-card-list li + li { margin-top: 6px; }
.work-card-soul { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--border); font-style: italic; color: rgba(255,255,255,.85); font-size: 15px; line-height: 1.6; }

.work-cta-row { margin-top: 64px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.work-cta-label { font-size: 18px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-photo { aspect-ratio: 4 / 5; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--card); overflow: hidden; }
.about-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.30); font-family: var(--font-mono); letter-spacing: .25em; font-size: 12px; }
.about-img { width: 100%; height: 100%; object-fit: cover; }
.about-body { font-size: 17px; line-height: 1.75; color: rgba(255,255,255,.78); }
.about-body p + p { margin-top: 16px; }
.about-body ul { padding-left: 0; list-style: none; }
.about-body ul li { padding-left: 18px; position: relative; }
.about-body ul li::before { content: "•"; color: var(--juiczy-orange); position: absolute; left: 0; }

/* ---------- single article ---------- */
.section-article .back-link { display: inline-block; margin-bottom: 32px; color: var(--text-muted); font-size: 14px; }
.section-article .back-link:hover { color: var(--text); }
.article-header { margin-bottom: 48px; }
.article-title { font-size: clamp(28px, 4.5vw, 52px); margin-bottom: 16px; }
.article-meta { color: var(--text-muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.article-thumb { margin-top: 32px; border-radius: var(--radius-card); overflow: hidden; }
.article-body { font-size: 17px; line-height: 1.85; color: rgba(255,255,255,.85); }
.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 26px; margin: 40px 0 16px; }
.article-body h3 { font-size: 21px; margin: 32px 0 12px; }
.article-body a { color: var(--juiczy-orange); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--juiczy-orange); color: rgba(255,255,255,.75); font-style: italic; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body code { background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-body pre { background: rgba(255,255,255,.05); padding: 18px; border-radius: 8px; overflow: auto; }
.article-cta { margin-top: 64px; padding: 32px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.article-cta p { margin: 0 0 16px; font-size: 17px; }

/* ---------- archive ---------- */
.archive-header { margin-bottom: 56px; }
.note-list { display: flex; flex-direction: column; gap: 0; }
.note-list-item {
	display: block;
	padding: 32px 0;
	border-bottom: 1px solid var(--border);
	transition: opacity .3s;
}
.note-list-item:hover { opacity: 0.85; }
.note-list-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; margin-bottom: 8px; }
.note-list-title { font-size: clamp(22px, 2.5vw, 30px); margin-bottom: 12px; line-height: 1.3; }
.note-list-excerpt { color: var(--text-muted); margin-bottom: 12px; line-height: 1.7; }
.note-list-cta { color: var(--juiczy-orange); font-weight: 600; font-size: 14px; letter-spacing: .05em; }

.pagination { margin-top: 48px; }

/* ---------- footer ---------- */
.site-footer { background: #0a0a0a; border-top: 1px solid var(--border); padding: 64px 0 32px; color: var(--text-muted); font-size: 14px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.brand-footer { line-height: 1.3; }
.footer-tag { margin: 12px 0 4px; max-width: 40ch; }
.footer-stamp { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: .1em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; }
.footer-nav a { color: var(--text-muted); transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-rights { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.05); font-size: 12px; color: var(--text-faint); }

/* ---------- 404 / page ---------- */
.section-page .page-body { font-size: 17px; line-height: 1.8; }
.section-404 { padding: 160px 0; }
.section-404 .section-title { font-size: 96px; color: var(--juiczy-orange); margin-bottom: 12px; }

/* ---------- contact page + Fluent Forms override ---------- */
.contact-header { margin-bottom: 64px; max-width: 60ch; }
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-form-wrap {
	padding: 36px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-card);
}

.contact-sidebar { padding: 36px; background: rgba(255,107,24,0.04); border: 1px solid rgba(255,107,24,0.20); border-radius: var(--radius-card); }
.contact-sidebar-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; color: var(--text); }
.contact-direct { list-style: none; padding: 0; margin: 0 0 32px; }
.contact-direct li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.contact-direct li:last-child { border-bottom: 0; }
.contact-label { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; color: var(--text-faint); }
.contact-direct a { color: var(--text); font-weight: 600; transition: color .2s; }
.contact-direct a:hover { color: var(--juiczy-orange); }
.contact-foot { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; padding-top: 16px; border-top: 1px solid var(--border); }

/* Fluent Forms — restyle to match dark theme */
.ff-default,
.fluentform .ff-el-form-control,
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform input[type="url"],
.fluentform input[type="number"],
.fluentform textarea,
.fluentform select {
	background: rgba(255,255,255,0.05) !important;
	color: var(--text) !important;
	border: 1px solid var(--border) !important;
	border-radius: var(--radius-btn) !important;
	padding: 12px 16px !important;
	font-family: var(--font-body) !important;
	font-size: 15px !important;
	width: 100% !important;
	box-shadow: none !important;
	transition: border-color .2s, background .2s !important;
}
.fluentform input[type="text"]:focus,
.fluentform input[type="email"]:focus,
.fluentform input[type="tel"]:focus,
.fluentform textarea:focus,
.fluentform select:focus {
	background: rgba(255,255,255,0.08) !important;
	border-color: var(--juiczy-orange) !important;
	outline: none !important;
}
.fluentform textarea { min-height: 140px !important; resize: vertical !important; }
.fluentform input::placeholder,
.fluentform textarea::placeholder { color: var(--text-faint) !important; }

.fluentform .ff-el-input--label label,
.fluentform label,
.fluentform .ff-el-input--content label {
	color: var(--text-muted) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	margin-bottom: 6px !important;
	text-transform: uppercase !important;
	letter-spacing: .08em !important;
	display: block !important;
}

.fluentform .ff-el-group { margin-bottom: 20px !important; }
.fluentform .ff-el-form-check label { text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; }

.fluentform .ff_btn_style,
.fluentform button[type="submit"],
.fluentform .ff-btn-submit {
	background: var(--juiczy-orange) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--radius-btn) !important;
	padding: 14px 36px !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	letter-spacing: .02em !important;
	cursor: pointer !important;
	font-family: var(--font-body) !important;
	box-shadow: none !important;
	transition: filter .2s !important;
}
.fluentform button[type="submit"]:hover,
.fluentform .ff_btn_style:hover { filter: brightness(1.1) !important; }

.fluentform .text-danger,
.fluentform .error,
.fluentform .ff-el-is-error .text-danger { color: #ff8b61 !important; font-size: 13px !important; }
.fluentform .ff-el-is-error input,
.fluentform .ff-el-is-error textarea { border-color: #ff8b61 !important; }

.fluentform .ff-message-success,
.fluentform .ff_form_success {
	background: rgba(255,107,24,0.10) !important;
	color: var(--juiczy-orange) !important;
	border: 1px solid rgba(255,107,24,0.30) !important;
	padding: 16px !important;
	border-radius: var(--radius-card) !important;
	font-weight: 600 !important;
}

/* ---------- search ---------- */
.search-form { display: flex; gap: 12px; }
.search-form input[type="search"] { flex: 1; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-btn); color: var(--text); }
.search-form input[type="search"]:focus { outline: none; border-color: var(--juiczy-orange); }

/* ---------- WP core compat ---------- */
.alignwide { max-width: var(--container); margin-left: auto; margin-right: auto; }
.aligncenter { margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 50%; top: 12px; transform: translateX(-50%); background: #fff; color: #000; padding: 8px 16px; z-index: 100; border-radius: 4px; }

/* ---------- admin bar offset ---------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
