/*
Theme Name: Fornita
Theme URI: https://fornita.co.uk
Author: Fornita
Description: One-page theme for Fornita smart vending. Built-in Machines (card grid) and enquiry form; no shop, prices, basket or checkout. Every enquiry goes to hello@fornita.co.uk.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: Proprietary
Text Domain: fornita
*/

/* ---------- Fonts (Poppins, self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/poppins-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/poppins-latin-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/poppins-latin-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/poppins-latin-700.woff2) format('woff2'); }

/* ---------- Brand tokens ---------- */
:root {
	--navy: #0B1F4B;   /* text, headings */
	--blue: #1D4ED8;   /* buttons, links */
	--light: #BFE3FF;  /* backgrounds */
	--cyan: #22D3EE;   /* small accents only */
	--silver: #E6EBF2; /* section backgrounds, borders */
	--ink: #0E1013;
	--text: #3D4655;
	--muted: #5B6577;
	--pale: #F4F7FC;
	--sky: #7CC4FF;
	--radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: var(--navy);
	background: #fff;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; left: 12px; top: 12px; z-index: 100;
	background: #fff; color: var(--navy); padding: 12px 18px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
	font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1a44c2; color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #12306e; color: #fff; }
.btn-cyan { background: var(--cyan); color: var(--navy); }
.btn-cyan:hover { background: #5fe3f5; color: var(--navy); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-xl { min-height: 56px; padding: 0 30px; font-size: 18px; margin-top: 8px; }
.btn-sm { padding: 0 18px; font-size: 14px; }

/* ---------- Header (sticky) ---------- */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--silver);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner {
	max-width: 1200px; margin: 0 auto; padding: 12px 24px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand .custom-logo { display: block; max-height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.brand-name .i, .footer-name .i { color: var(--blue); }
.brand-tag { font-size: 12px; color: var(--muted); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--navy); text-decoration: none; }
.main-nav a:hover { color: var(--blue); }
.main-nav .btn-blue, .main-nav .btn-blue:hover { color: #fff; }

.nav-toggle {
	display: none; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--silver); border-radius: 12px;
	background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle-bars { display: block; width: 22px; }
.nav-toggle-bars span { display: block; height: 2px; margin: 5px 0; background: var(--navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-open .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-bottom: 1px solid var(--silver); padding: 6px 24px 20px;
		box-shadow: 0 16px 30px rgba(11, 31, 75, .08);
	}
	.main-nav.is-open { display: flex; }
	.main-nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid var(--silver); font-size: 17px; }
	.main-nav .nav-cta { margin-top: 16px; min-height: 52px; }
}

/* ---------- Top banner ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero-glow {
	position: absolute; right: -120px; top: -120px; width: 620px; height: 620px; border-radius: 50%; pointer-events: none;
	background: radial-gradient(circle, rgba(34, 211, 238, .35), rgba(14, 16, 19, 0) 65%);
	animation: fnGlow 5s ease-in-out infinite;
}
.hero-inner {
	position: relative; max-width: 1200px; margin: 0 auto; padding: 72px 24px 56px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
}
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; animation: fnRise .8s ease-out both; }
.hero-badge {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
	border: 1px solid #2A3342; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--sky);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.hero-intro { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: #C9D3E3; }
.slogan { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: .01em; line-height: 1.15; }
.slogan span { color: var(--cyan); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.hero-visual { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.hero-frame {
	position: relative; width: 100%; max-width: 460px; aspect-ratio: 4 / 5; overflow: hidden;
	border-radius: 24px; background: #161A20; border: 1px solid #262C35;
}
.hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-svg { display: block; animation: fnFloat 6s ease-in-out infinite; }

.marquee { border-top: 1px solid #222832; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 48px; padding: 18px 0; font-size: 15px; font-weight: 500; color: var(--sky); }
.marquee .sep { color: #3A4456; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-pale { background: var(--pale); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); }
.eyebrow-light { color: var(--sky); }
.section h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head-text { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.section-head-text.narrow { margin-bottom: 32px; }
.admin-note { padding: 16px 20px; border: 1px dashed var(--blue); border-radius: 12px; color: var(--navy); background: #fff; }

.prose p { margin: 0 0 1em; line-height: 1.7; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--blue); }

/* Category filter */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
	min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid #C9D6F5; background: #fff; color: var(--navy);
	font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Machine cards: 3 per row on a computer, 2 on a tablet, 1 on a phone */
.machine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 1024px) { .machine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .machine-grid { grid-template-columns: 1fr; } }

.machine-card {
	display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
	border: 1px solid var(--silver); background: #fff; transition: transform .25s ease, box-shadow .25s ease;
}
.machine-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11, 31, 75, .14); }
.machine-card[hidden] { display: none; }
.card-media {
	position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
	aspect-ratio: 4 / 3; background: var(--pale); /* every photo is cropped to this same shape */
}
.card-media a { display: block; width: 100%; height: 100%; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { width: auto; height: 70%; }
.card-cat {
	position: absolute; left: 14px; top: 14px; padding: 4px 10px; border-radius: 999px;
	background: #fff; font-size: 12px; font-weight: 600; color: var(--blue);
}
.card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px; }
.card-body h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body p { flex: 1; margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.card-body .btn { align-self: flex-start; }

/* Where we work */
.where-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.where-tile {
	display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius);
	background: #fff; color: var(--blue); transition: background .2s ease, transform .2s ease;
}
.where-tile:hover { background: #EAF2FF; transform: translateY(-3px); }
.where-label { font-size: 18px; font-weight: 600; color: var(--navy); }
.where-text { font-size: 14px; line-height: 1.5; color: var(--text); }

/* About */
.about-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.about-story { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about-story .prose p { font-size: 17px; }
.about-cards { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about-card { padding: 26px; border: 1px solid var(--silver); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.about-card h3 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.about-card .prose p { font-size: 16px; line-height: 1.6; }
.about-card-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.about-card-dark h3 { color: var(--sky); }
.about-card-dark ol { padding-left: 20px; font-size: 16px; line-height: 1.8; }

/* FAQ */
.faq-group { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.faq-group-title { margin: 0 0 4px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.faq-item { border: 1px solid var(--silver); border-radius: 16px; background: #fff; }
.faq-item summary {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 18px 22px;
	font-size: 17px; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-sign {
	position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #EAF2FF;
}
.faq-sign::before, .faq-sign::after {
	content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--blue); border-radius: 2px;
}
.faq-sign::after { transform: rotate(90deg); transition: transform .2s ease; }
.faq-item[open] .faq-sign::after { transform: rotate(0deg); }
.faq-answer { padding: 0 22px 20px; font-size: 15px; }
.faq-answer p { font-size: 15px; line-height: 1.65; }

/* Contact */
.contact { background: var(--ink); color: #fff; }
.contact-inner {
	max-width: 1200px; margin: 0 auto; padding: 88px 24px 72px;
	display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.contact h2 { max-width: 760px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.contact .btn-xl { max-width: 100%; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9D3E3; border-top: 1px solid #222832; font-size: 14px; }
.site-footer a { color: #C9D3E3; }
.site-footer a:hover { color: #fff; }
.footer-main {
	max-width: 1200px; margin: 0 auto; padding: 28px 24px 20px;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { border-radius: 8px; background: #fff; }
.footer-brand svg rect:first-child { fill: #fff; }
.footer-name { font-size: 20px; font-weight: 600; color: #fff; }
.footer-name .i { color: var(--cyan); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.footer-social { display: inline-flex; gap: 14px; }
.footer-social a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin: -10px 0; }
.footer-legal {
	max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; font-size: 11px; line-height: 1.6; color: #8A94A6;
}

/* "Email us" button visible at all times */
.float-cta {
	position: fixed; right: 22px; bottom: 22px; z-index: 30; min-height: 52px; padding: 0 22px;
	box-shadow: 0 10px 30px rgba(11, 31, 75, .35);
}
@media (max-width: 480px) { .float-cta { right: 14px; bottom: 14px; } }

/* ---------- Plain pages (privacy policy) and machine pages ---------- */
.page-wrap { max-width: 860px; margin: 0 auto; padding: 64px 24px 96px; }
.page-article h1 { font-size: clamp(30px, 4.5vw, 42px); line-height: 1.15; font-weight: 700; margin-bottom: 24px; }
.page-article .prose h2 { margin: 1.8em 0 .5em; font-size: 22px; font-weight: 600; }
.page-article .prose ul { padding-left: 22px; margin: 0 0 1em; color: var(--text); line-height: 1.7; }
.back-link { margin-top: 40px; }
.machine-page { max-width: 1100px; }
.machine-single { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.machine-single-media { flex: 1 1 380px; min-width: 0; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--pale); display: flex; align-items: center; justify-content: center; }
.machine-single-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-single-body { flex: 1 1 380px; min-width: 0; }
.machine-single-body h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 16px; }

/* ---------- Animation ---------- */
@keyframes fnDrop { 0%, 35% { transform: translateY(0); opacity: 1; } 62% { transform: translateY(132px); opacity: 1; } 63%, 100% { transform: translateY(132px); opacity: 0; } }
@keyframes fnPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes fnSweep { 0% { transform: translateX(-140px); } 100% { transform: translateX(320px); } }
@keyframes fnFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fnMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fnRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fnGlow { 0%, 100% { opacity: .25; } 50% { opacity: .55; } }
.fn-drop { animation: fnDrop 3.2s ease-in infinite; transform-box: fill-box; }
.fn-drop2 { animation: fnDrop 3.2s ease-in 1.6s infinite; transform-box: fill-box; }
.fn-pulse { animation: fnPulse 1.6s ease-in-out infinite; }
.fn-sweep { animation: fnSweep 4.5s linear infinite; }
.fn-marquee { animation: fnMarquee 28s linear infinite; }

@media (max-width: 640px) {
	.section { padding: 64px 0; }
	.hero-inner { padding: 48px 24px 40px; gap: 32px; }
	.contact-inner { padding: 64px 24px 56px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Enquiry form ---------- */
.enquiry-wrap { max-width: 760px; }
.enquiry-wrap .eyebrow { margin-bottom: 10px; }
.enquiry-wrap .lede { margin-bottom: 28px; }
.enquiry-form { display: flex; flex-direction: column; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--navy); }
.req { color: var(--blue); }
.enquiry-form input[type="text"], .enquiry-form input[type="email"], .enquiry-form input[type="tel"],
.enquiry-form select, .enquiry-form textarea {
	width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid #C9D6F5; border-radius: 12px;
	font-family: inherit; font-size: 16px; color: var(--navy); background: #fff;
}
.enquiry-form textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus { outline: 3px solid var(--cyan); outline-offset: 1px; border-color: var(--blue); }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--text); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--blue); }
.enquiry-form .btn { align-self: flex-start; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-bottom: 24px; padding: 16px 20px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.form-note-ok { background: #E7F8EE; border: 1px solid #9ADBB4; color: #0B3D22; }
.form-note-err { background: #FDECEC; border: 1px solid #F2A5A5; color: #6B1414; }
.form-note a { color: inherit; }
