/*
Theme Name: VFactor 2026
Theme URI: https://www.vfactor.ph
Author: VFactor Inc.
Description: Editorial, type-led block theme for VFactor Inc. (VFI) — events and brand communication. Bold condensed headlines, black and white with VFI red, full-bleed photography, work grid driven by posts, and section patterns for every page.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vfactor-2026
Tags: block-patterns, full-site-editing, portfolio, one-column, custom-colors, editor-style
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }
.screen-reader-text:focus { clip: auto; height: auto; width: auto; }
:focus-visible { outline: 2px solid var(--wp--preset--color--brand-deep); outline-offset: 3px; }

/* Wider display cut of Archivo for hero-style headings */
.vfi-display,
h1.wp-block-heading,
h1.wp-block-post-title { font-stretch: 112%; }

/* ---------- Header ---------- */
.vfi-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .vfi-header { top: var(--wp-admin--admin-bar--height, 32px); }
.vfi-header__inner { min-height: 84px; }
.vfi-logo img { width: auto; height: 44px; display: block; }
.vfi-footer .vfi-logo img { width: 128px; height: auto; }
.vfi-header .wp-block-navigation-item__content { padding: 12px 4px; }
.vfi-header .wp-block-navigation .current-menu-item > a,
.vfi-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--brand-deep); }
@media (max-width: 600px) { .vfi-header .wp-block-buttons { display: none; } }

/* ---------- Footer ---------- */
.vfi-footer { padding-block: 5rem 2.5rem; }
.vfi-footer a { color: var(--wp--preset--color--smoke); }
.vfi-footer a:hover { color: var(--wp--preset--color--paper); }
.vfi-footer .vfi-logo img { filter: brightness(0) invert(1); }
.vfi-footer__label { font-size: var(--wp--preset--font-size--xs); letter-spacing: .14em; text-transform: uppercase; color: #9a9a9a; margin-bottom: 1rem; }
.vfi-footer__cols { padding-bottom: 4rem; border-bottom: 1px solid #333; }
.vfi-footer__bottom { padding-top: 1.75rem; font-size: var(--wp--preset--font-size--s); color: #9a9a9a; }
.vfi-footer__contact a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.vfi-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.vfi-footer .wp-block-social-links a { color: var(--wp--preset--color--paper); }
.vfi-footer__social { gap: 1.1rem !important; margin-top: .25rem; }
.vfi-footer__social .wp-social-link { font-size: 26px; }
.vfi-footer__social .wp-social-link a { padding: 0; }
.vfi-footer__social .wp-social-link:hover { transform: none; opacity: .75; }

/* ---------- Section rhythm ---------- */
.vfi-section { padding-block: clamp(3.5rem, 6vw, 5rem); }
.vfi-section--tight { padding-block: clamp(2.5rem, 4vw, 3.5rem); }
.vfi-section--top { padding-top: clamp(3.5rem, 6vw, 5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.vfi-rule-top { border-top: 1.5px solid var(--wp--preset--color--ink); }
.vfi-rule-y { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }

/* ---------- Type helpers ---------- */
.vfi-eyebrow {
	font-size: var(--wp--preset--font-size--xs); font-weight: 600;
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--wp--preset--color--brand-deep);
	margin-bottom: 1.25rem !important;
}
.has-ink-background-color .vfi-eyebrow,
.vfi-hero .vfi-eyebrow { color: var(--wp--preset--color--brand); }
.vfi-hero .vfi-eyebrow { color: #fff; display: flex; align-items: center; gap: 12px; }
.vfi-hero .vfi-eyebrow::before { content: ""; width: 36px; height: 3px; background: var(--wp--preset--color--brand); }
.vfi-lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: #3a3a3a; max-width: 40rem; }
.has-ink-background-color .vfi-lede, .vfi-hero .vfi-lede { color: #f1f1f1; }
.vfi-muted { color: var(--wp--preset--color--mute); }
.vfi-accent { color: var(--wp--preset--color--brand); }

/* Arrow text link with red underline */
.vfi-link-arrow a {
	display: inline-flex; align-items: center; gap: 10px;
	font-weight: 600; font-size: clamp(1.125rem, 1.4vw, 1.3rem);
	border-bottom: 2px solid var(--wp--preset--color--brand); padding-bottom: 6px;
}
.vfi-link-arrow a::after { content: "→"; transition: transform .2s; }
.vfi-link-arrow a:hover::after { transform: translateX(4px); }

/* Outline / light buttons */
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; color: inherit; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #fff; border-color: var(--wp--preset--color--ink); }
.vfi-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--ink); border-color: #fff; }
.has-brand-deep-background-color .wp-block-button__link { background: var(--wp--preset--color--ink); }
.has-brand-deep-background-color .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--ink); }

/* ---------- Hero ---------- */
.vfi-hero {
	position: relative; min-height: min(820px, 92vh);
	display: flex; flex-direction: column; justify-content: flex-end;
	background-color: #1c1c1c; color: #fff;
	padding-top: 7.5rem; padding-bottom: 4.5rem;
	overflow: hidden; isolation: isolate;
}
.vfi-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: -1; }
.vfi-hero > * { width: 100%; }
/* Background showreel: sits above the photo, below the dark overlay; fades in only once playing */
.vfi-hero > .vfi-hero__video { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; margin: 0 !important; max-width: none !important; width: auto; }
.vfi-hero__video iframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; max-width: none; max-height: none; border: 0; opacity: 0; transition: opacity 1.2s ease; }
.vfi-hero.is-video-playing .vfi-hero__video iframe { opacity: 1; }
.vfi-hero h1 { color: #fff; max-width: 15ch; }
/* Hero headline 20% smaller on tablet/desktop; phones keep the full size */
@media (min-width: 782px) {
	.vfi-hero h1 { font-size: calc(var(--wp--preset--font-size--mega) * 0.8) !important; }
}
.vfi-hero__foot { margin-top: 3rem !important; }

/* Full-bleed photo strip under page titles */
.vfi-bleed img { width: 100%; aspect-ratio: 21 / 9; min-height: 300px; object-fit: cover; display: block; }

/* ---------- Clients ---------- */
.vfi-clients { padding-block: 2.5rem; }
.vfi-clients .vfi-eyebrow { color: var(--wp--preset--color--mute); }
.vfi-client-names { display: flex; flex-wrap: wrap; gap: .25em 0; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.75rem); letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.vfi-client-names span::after { content: "/"; color: var(--wp--preset--color--brand); margin: 0 .55em; }
.vfi-client-names span:last-child::after { content: none; }

/* ---------- Work grid (query loop) ---------- */
.vfi-work .wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 4rem 2rem; }
.vfi-work--feature .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
.vfi-work--feature .wp-block-post-template > li:first-child .wp-block-post-featured-image img { aspect-ratio: 16 / 7 !important; }
.vfi-work--stagger .wp-block-post-template > li:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }
.vfi-work .wp-block-post-featured-image { overflow: hidden; border-radius: 4px; margin-bottom: 1.4rem; }
.vfi-work .wp-block-post-featured-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.vfi-work li:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.vfi-work .wp-block-post-title { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 700; margin: 0 0 .5rem; }
.vfi-work .wp-block-post-title a:hover { color: var(--wp--preset--color--brand-deep); }
.vfi-work .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--s); color: var(--wp--preset--color--mute); margin: 0; }
.vfi-work .wp-block-post-excerpt__more-text { display: none; }

/* Work carousel (home): horizontal, swipeable, snaps to cards */
.vfi-work--carousel { position: relative; }
.vfi-work--carousel .wp-block-post-template {
	display: flex !important; flex-wrap: nowrap; gap: 2rem;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
	margin: 0; padding: 0 0 .5rem; list-style: none;
}
.vfi-work--carousel .wp-block-post-template::-webkit-scrollbar { display: none; }
.vfi-work--carousel .wp-block-post-template > li { flex: 0 0 min(42%, 620px); margin: 0 !important; scroll-snap-align: start; }
@media (max-width: 900px) { .vfi-work--carousel .wp-block-post-template > li { flex-basis: 70%; } }
@media (max-width: 600px) { .vfi-work--carousel .wp-block-post-template > li { flex-basis: 86%; } .vfi-work--carousel .wp-block-post-template { gap: 1rem; } }
.vfi-carousel-nav { display: flex; justify-content: flex-end; gap: .75rem; margin: -1.75rem 0 1.5rem; }
.vfi-carousel-nav[hidden] { display: none; }
.vfi-carousel-btn {
	width: 52px; height: 52px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
	background: #fff; color: var(--wp--preset--color--ink); border: 1.5px solid var(--wp--preset--color--ink); cursor: pointer;
	transition: background .2s, color .2s, opacity .2s;
}
.vfi-carousel-btn:hover:not(:disabled) { background: var(--wp--preset--color--ink); color: #fff; }
.vfi-carousel-btn:disabled { opacity: .3; cursor: default; }

/* Filter chips on Our Work */
.vfi-chips { padding-block: 1.4rem; }
.vfi-chips .wp-block-button__link { background: #fff; color: var(--wp--preset--color--ink); border: 1.5px solid #d4d4d4; font-weight: 500; padding: .75rem 1.25rem; }
.vfi-chips .wp-block-button:first-child .wp-block-button__link { background: var(--wp--preset--color--ink); color: #fff; border-color: var(--wp--preset--color--ink); }
.vfi-chips .wp-block-button__link:hover { border-color: var(--wp--preset--color--ink); background: #fff; color: var(--wp--preset--color--ink); }

/* ---------- Services list (home) ---------- */
.vfi-svc-list { border-top: 1.5px solid var(--wp--preset--color--ink); }
.vfi-svc-row {
	display: grid !important; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.2fr) 40px;
	gap: 1.5rem; align-items: center;
	padding: 2.1rem 1rem; border-bottom: 1.5px solid var(--wp--preset--color--ink);
	transition: background .25s, color .25s; margin: 0 !important;
}
.vfi-svc-row > * { margin: 0 !important; }
.vfi-svc-row:hover { background: var(--wp--preset--color--ink); color: #fff; }
.vfi-svc-row:hover .vfi-num { color: var(--wp--preset--color--brand); }
.vfi-svc-row::after { content: "↗"; font-size: 1.75rem; line-height: 1; }
.vfi-svc-name { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.05; }
.vfi-svc-name a:hover { color: inherit; }
.vfi-svc-desc { font-size: 1rem; line-height: 1.5; opacity: .8; }
.vfi-num { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.125rem; color: var(--wp--preset--color--brand-deep); }
@media (max-width: 760px) {
	.vfi-svc-row { grid-template-columns: 48px minmax(0, 1fr) 28px; }
	.vfi-svc-desc { display: none; }
}

/* ---------- Line-up (Samsung Sound Session) ---------- */
.vfi-lineup { list-style: none; padding: 0; margin: 0; counter-reset: vfi; font-family: var(--wp--preset--font-family--display); }
.vfi-lineup li { counter-increment: vfi; display: flex; gap: 1.5rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid #333; font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 600; }
.vfi-lineup li:last-child { border-bottom: 0; }
.vfi-lineup li::before { content: counter(vfi, decimal-leading-zero); color: #8f8f8f; font-size: .9375rem; width: 2rem; flex: none; }

/* ---------- Feature rows (services page) ---------- */
.vfi-feature { border-top: 1.5px solid var(--wp--preset--color--ink); padding-block: clamp(3rem, 5vw, 4.5rem); }
.vfi-feature .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.vfi-feature h2 { font-size: clamp(2.25rem, 4.6vw, 4.25rem); }
.vfi-dash-list { list-style: none; padding: 0; display: grid; gap: .6rem; font-weight: 500; font-size: 1rem; }
.vfi-dash-list li::before { content: "— "; }

/* Capabilities (dark, 4 col) */
.vfi-caps { border-top: 1px solid #3a3a3a; gap: 0 !important; }
.vfi-caps > .wp-block-column { padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 1px solid #3a3a3a; }
.vfi-caps h3 { font-size: 1.625rem; margin: 0 0 .5rem; }
.vfi-caps p { color: var(--wp--preset--color--smoke); font-size: 1rem; }

/* Steps / disciplines with red top rule */
.vfi-steps > .wp-block-column { border-top: 3px solid var(--wp--preset--color--brand); padding-top: 1.4rem; }
.vfi-steps h3 { font-size: 1.75rem; margin: 0 0 .6rem; }
.vfi-steps p { font-size: 1rem; }
.has-ink-background-color .vfi-steps p { color: var(--wp--preset--color--smoke); }

/* Stats (about) */
.vfi-stats > .wp-block-column { border-top: 1.5px solid var(--wp--preset--color--ink); padding-top: 1.4rem; }
.vfi-stat { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(3.5rem, 6vw, 6rem); line-height: 1; letter-spacing: -0.03em; margin: 0 0 .4rem; }

/* Placeholders for photos still to supply */
.vfi-ph { aspect-ratio: 4 / 5; background: #3a3a3a; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #b0b0b0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 1rem; }

/* "Let's talk" headline matches the "What we do" size on desktop */
@media (min-width: 782px) {
	.vfi-talk h2.has-mega-font-size { font-size: var(--wp--preset--font-size--xxl) !important; }
}

/* CTA band */
.vfi-cta { padding-block: 3.5rem; }
.vfi-cta h2 { font-size: clamp(2.25rem, 5vw, 4.5rem); }

/* Contact details list */
.vfi-details > * { border-top: 1.5px solid var(--wp--preset--color--ink); padding-top: .9rem; margin: 0 0 1.6rem !important; }
.vfi-details .vfi-label { font-size: var(--wp--preset--font-size--xs); letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--mute); font-weight: 600; display: block; margin-bottom: .3rem; }
.vfi-details strong { font-size: 1.25rem; }

/* Jetpack form inside the red "Let's talk" band and the contact panel */
.vfi-form-panel { background: var(--wp--preset--color--sand); border-radius: 6px; padding: clamp(1.75rem, 4vw, 3.5rem) !important; }
.vfi-form-panel input, .vfi-form-panel textarea, .vfi-talk input, .vfi-talk textarea {
	background: transparent !important; border: 0 !important; border-bottom: 1.5px solid #bdbdbd !important; border-radius: 0 !important;
	font: inherit !important; font-size: 1.125rem !important; padding: .75rem 0 !important; box-shadow: none !important;
}
.vfi-form-panel input:focus, .vfi-form-panel textarea:focus { border-bottom-color: var(--wp--preset--color--brand-deep) !important; outline: none; }
.vfi-form-panel label, .vfi-talk label { font-size: var(--wp--preset--font-size--xs) !important; letter-spacing: .12em; text-transform: uppercase; font-weight: 600 !important; }
.vfi-talk input, .vfi-talk textarea { color: #fff !important; border-bottom-color: rgba(255,255,255,.7) !important; }
.vfi-talk .wp-block-button__link, .vfi-talk button[type="submit"] { background: var(--wp--preset--color--ink) !important; color: #fff !important; border-radius: 999px !important; }

/* ---------- Case study (single post) ---------- */
.vfi-case-back a { display: inline-flex; gap: 8px; font-size: .9375rem; color: var(--wp--preset--color--mute); }
.vfi-case-back a::before { content: "←"; }
.vfi-case-hero img { width: 100%; aspect-ratio: 21 / 9; min-height: 320px; object-fit: cover; display: block; }
.vfi-case-body { font-size: 1.1875rem; }
.vfi-case-body > p:first-child { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.5rem); line-height: 1.18; letter-spacing: -0.02em; }
.vfi-next { padding-block: clamp(3.5rem, 6vw, 5rem); border-bottom: 1px solid var(--wp--preset--color--line); }
.vfi-next .wp-block-post-navigation-link { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(2.5rem, 6vw, 6rem); line-height: .95; letter-spacing: -0.03em; }
.vfi-next .post-navigation-link__label { display: block; font-family: var(--wp--preset--font-family--body); font-size: .875rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--mute); margin-bottom: .9rem; }
.vfi-next a:hover { color: var(--wp--preset--color--brand); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
