/*
Theme Name: OnlineMenu Site
Theme URI: https://onlinemenu.se/
Author: OnlineMenu.se
Description: Huvudwebbplats för OnlineMenu.se – QR-meny, hemsida och menyskärmar för restauranger. Satt som en menytavla: granngrönt, saffran och Familjen Grotesk. Utan sidbyggare och utan externa typsnitt.
Version: 1.2.1
Requires at least: 6.2
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: onlinemenu-site
*/

/* Familjen Grotesk by Familjen STHLM – SIL Open Font License (assets/fonts/OFL-familjen-grotesk.txt). Served locally. */
@font-face {
	font-family: "Familjen Grotesk";
	src: url("assets/fonts/familjen-grotesk.woff") format("woff");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--accent: #1e4a38;            /* spruce – boards, buttons, links */
	--ink: #13221b;               /* text and headings */
	--paper: #ffffff;
	--mist: #ebf0ec;              /* quiet section ground */
	--saffron: #f2b33d;           /* prices on boards, light CTA */
	--line: #d5ddd8;
	--muted: #4c5a53;
	--board-edge: #0f241b;
	--font: "Familjen Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--measure: 34rem;
	--gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.125rem; line-height: 1.55; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.375rem); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
.icon { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.12em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }

.container { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 6px; font: inherit; font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--board-edge); }
.btn-saffron { background: var(--saffron); color: var(--ink); }
.btn-saffron:hover { background: #ffc85c; }
.link-quiet { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-thickness .2s, color .2s; }
.link-quiet:hover { color: var(--accent); text-decoration-thickness: 2px; }
.link-light { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 600; text-underline-offset: 5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--accent); color: var(--saffron); }
.brand-mark .icon { width: 19px; height: 19px; }
.brand-logo { display: block; width: auto; height: 40px; border-radius: 6px; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav ul a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); font-weight: 500; text-decoration: none; transition: color .2s; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--ink); }
.site-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle-close { display: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-mist { background: var(--mist); }
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.lead { max-width: var(--measure); margin-top: 24px; color: var(--muted); font-size: 1.3125rem; line-height: 1.5; }
.trust { margin-top: 32px; color: var(--muted); font-size: 1rem; }
.split-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.split-head p { max-width: var(--measure); color: var(--muted); font-size: 1.1875rem; }
.page-head { max-width: 44rem; }
.caption { margin-top: 16px; color: var(--muted); font-size: .9375rem; }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.hero-copy h1 { max-width: 13.5ch; }

/* ---------- Menu board (signature element) ---------- */
.board { container-type: inline-size; }
.board-screen { position: relative; overflow: hidden; border: 12px solid var(--board-edge); border-radius: 10px; background: radial-gradient(120% 90% at 15% 0%, #275c46 0%, var(--accent) 55%, #18402f 100%); color: #f4f1e8; padding: 7cqi 7.5cqi; box-shadow: 0 40px 70px -40px rgba(19, 34, 27, .55); }
.board-hero .board-screen, .board-wide .board-screen { aspect-ratio: 16 / 10; display: flex; flex-direction: column; justify-content: center; }
.board-live { width: 100%; }
.board-live .board-screen { padding: 0; background: #000; }
.live-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.live-frame iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.board-stand { width: 18%; height: 16px; margin: 0 auto; border-radius: 0 0 6px 6px; background: var(--board-edge); }
.board-flat .board-stand { display: none; }
.board-flat .board-screen { border-width: 0; border-radius: 12px; }
.board-title { margin-bottom: 4cqi; padding-bottom: 2.4cqi; border-bottom: 1px solid rgba(244, 241, 232, .25); font-size: clamp(.85rem, 3.4cqi, 1.5rem); font-weight: 700; letter-spacing: -0.01em; }
.board-rows { margin: 0; padding: 0; list-style: none; }
.board-rows li, .board-total { display: flex; align-items: baseline; gap: .55em; font-size: clamp(.95rem, 4.1cqi, 1.6rem); line-height: 1.25; }
.board-rows li + li { margin-top: 1.6cqi; }
.board-rows span, .board-total span { font-weight: 500; }
.board-rows i, .board-total i { flex: 1 1 auto; min-width: 1.5em; border-bottom: 2px dotted rgba(242, 179, 61, .55); transform: translateY(-.28em); }
.board-rows b, .board-total b { color: var(--saffron); font-weight: 700; white-space: nowrap; }
.board-total { margin-top: 4cqi; padding-top: 3cqi; border-top: 1px solid rgba(244, 241, 232, .25); font-size: clamp(1.05rem, 4.7cqi, 1.85rem); }
.board-total span { font-weight: 700; }

/* One orchestrated moment: the board switches on row by row. */
@media (prefers-reduced-motion: no-preference) {
	.board-animate .board-title, .board-animate .board-rows li, .board-animate .board-total { opacity: 0; animation: board-on .5s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(250ms + var(--i, 0) * 130ms); }
	.board-animate .board-rows i, .board-animate .board-total i { transform-origin: left; animation: leader .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(350ms + var(--i, 0) * 130ms); }
}
@keyframes board-on { from { opacity: 0; } to { opacity: 1; } }
@keyframes leader { from { transform: translateY(-.28em) scaleX(0); } to { transform: translateY(-.28em) scaleX(1); } }

/* ---------- Trio (three places) ---------- */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.trio-item { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 2px solid var(--ink); }
.trio-item p { color: var(--muted); }
.trio-item .link-quiet { margin-top: 4px; align-self: flex-start; }

/* ---------- Steps (a real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; }
.steps li::before { content: counter(step); display: block; margin-bottom: 8px; color: var(--accent); font-size: 4rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.steps p { color: var(--muted); }

/* ---------- Spec list ---------- */
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; margin: 0; }
.specs > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 8px 24px; padding: 22px 0; border-top: 1px solid #c3cec7; }
.specs dt { font-weight: 700; }
.specs dd { margin: 0; color: var(--muted); }

/* ---------- Examples ---------- */
.example-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.example-list li { border-top: 1px solid var(--line); }
.example-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 32px; padding: 26px 0; text-decoration: none; }
.example-name { flex: 1 1 auto; }
.example-name { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.02em; transition: color .2s; }
.example-place { color: var(--muted); }
.example-url { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.example-list a:hover .example-name { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Quote ---------- */
.quote { margin: 0; max-width: 46rem; }
.quote blockquote { margin: 0; }
.quote p { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.quote figcaption { margin-top: 20px; color: var(--muted); }

/* ---------- Prices ---------- */
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 64px; align-items: start; }
.price-copy h1 { max-width: 12ch; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 44px; }
.price-prefix { color: var(--muted); font-size: 1.3125rem; font-weight: 500; }
.price-amount { font-size: clamp(3.25rem, 6vw, 4.75rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.price-amount-sm { font-size: 2.375rem; }
.price-unit { color: var(--muted); font-size: 1.3125rem; font-weight: 500; }
.price-setup { max-width: var(--measure); margin-top: 18px; color: var(--muted); }
.price-note { margin-top: 18px; color: var(--muted); font-size: .9375rem; }
.price-grid .board { margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; border-bottom: 1px solid #c3cec7; }
.faq details { border-top: 1px solid #c3cec7; }
.faq summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 14px 48px 14px 0; font-size: 1.1875rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { max-width: var(--measure); padding: 0 0 24px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.contact-tip { max-width: var(--measure); margin-top: 32px; padding-left: 18px; border-left: 3px solid var(--saffron); color: var(--muted); }
.contact-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.contact-list li { border-top: 1px solid var(--line); }
.contact-list a { display: flex; flex-direction: column; gap: 4px; padding: 26px 0; text-decoration: none; }
.contact-label { color: var(--muted); font-size: 1rem; }
.contact-value { font-size: clamp(1.5rem, 2.8vw, 2.125rem); font-weight: 700; letter-spacing: -0.02em; transition: color .2s; overflow-wrap: anywhere; }
.contact-list a:hover .contact-value { color: var(--accent); }

/* ---------- Phone (QR page) ---------- */
.hero-visual-phone { display: flex; justify-content: center; }
.live-phone { width: 300px; height: 610px; padding: 10px; border-radius: 46px; background: var(--board-edge); box-shadow: 0 40px 70px -40px rgba(19, 34, 27, .55); }
.live-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 36px; background: #fff; }
.mock-phone { width: 230px; padding: 9px; border-radius: 36px; background: var(--board-edge); box-shadow: 0 40px 70px -40px rgba(19, 34, 27, .55); }
.mock-phone-screen { height: 460px; overflow: hidden; border-radius: 28px; background: #fffaf3; padding: 14px 12px; font-size: 11px; color: #241e1c; }
.mp-top { display: flex; align-items: center; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid #efe6db; }
.mp-logo { width: 18px; height: 18px; border-radius: 50%; background: #761b23; }
.mp-title { font-weight: 700; font-size: 12px; }
.mp-chips { display: flex; gap: 5px; margin: 10px 0; }
.mp-chips span { padding: 3px 8px; border-radius: 99px; background: #f3ebe1; font-weight: 600; font-size: 9.5px; }
.mp-chips .is-on { background: #761b23; color: #fff; }
.mp-heading { margin: 4px 0 8px; color: #761b23; font-family: Georgia, serif; font-weight: 700; font-size: 16px; text-align: center; }
.mp-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; padding: 6px; border: 1px solid #efe6db; border-radius: 10px; background: #fff; }
.mp-thumb { width: 34px; height: 34px; border-radius: 8px; background: radial-gradient(circle at 35% 35%, #ffd9a0 0 18%, #e2553f 19% 30%, #f3c06b 31% 62%, #c98b3b 63%); }
.mp-thumb-1 { background: radial-gradient(circle at 60% 40%, #f7e3b5 0 22%, #c4472f 23% 34%, #f0b85a 35% 62%, #b97a30 63%); }
.mp-thumb-2 { background: radial-gradient(circle at 45% 55%, #7fb069 0 14%, #f5d48c 15% 58%, #c58a3a 59%); }
.mp-text strong { display: block; font-size: 11px; }
.mp-text small { display: block; color: #8a7f78; font-size: 9px; }
.mp-price { color: #761b23; font-weight: 700; font-size: 10.5px; white-space: nowrap; }

.tv-stage { max-width: 980px; margin-top: 56px; }

/* ---------- CTA band ---------- */
.cta { padding: clamp(64px, 8vw, 104px) 0; background: var(--accent); color: #dce6e0; }
.cta h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); max-width: 16ch; }
.cta p { max-width: var(--measure); margin-top: 16px; font-size: 1.1875rem; }

/* ---------- Generic pages ---------- */
.prose { max-width: 42rem; }
.prose h1 { margin-bottom: 28px; font-size: clamp(2.2rem, 4vw, 3rem); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose h2 { margin: 1.6em 0 .6em; font-size: 1.6rem; }
.prose a { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 28px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { max-width: 20rem; margin-top: 12px; color: var(--muted); }
.footer-title { margin-bottom: 8px; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.footer-links { display: grid; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.hero-grid, .price-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
	.hero-copy h1 { max-width: 14ch; }
	.trio, .steps { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.specs { grid-template-columns: minmax(0, 1fr); }
	.split-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 40px; }
}
@media (max-width: 860px) {
	.nav-toggle { display: grid; place-items: center; }
	.site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 12px var(--gutter) 24px; border-bottom: 1px solid var(--line); background: #fff; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav ul a { min-height: 52px; padding: 0; font-size: 1.1875rem; color: var(--ink); border-bottom: 1px solid var(--line); }
	.site-nav ul a[aria-current="page"] { text-underline-offset: 6px; }
	.nav-open .site-nav { display: flex; }
	.nav-open .nav-toggle-open { display: none; }
	.nav-open .nav-toggle-close { display: block; }
	.nav-cta { min-height: 50px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	body { font-size: 1.0625rem; }
	.lead { font-size: 1.1875rem; }
	.specs > div { grid-template-columns: minmax(0, 1fr); }
	.example-list a { flex-direction: column; gap: 4px; }
	.board-screen { border-width: 8px; }
	.board-hero .board-screen, .board-wide .board-screen { aspect-ratio: auto; }
	.live-phone { width: 270px; height: 550px; }
	.btn { width: 100%; }
	.actions .link-quiet { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
