/*
 * Kukburi — shared design system + header/footer chrome.
 * Ported ~verbatim from the HTML prototypes (see HANDOFF.md Section 4).
 *
 * These :root custom properties duplicate the theme.json color palette
 * (--wp--preset--color--*) on purpose: theme.json drives the block-editor
 * color pickers, while this file preserves the exact --ink/--paper/etc. names
 * the ported prototype markup and CSS already use, so nothing has to be
 * rewritten and re-verified token-by-token.
 *
 * Page-section styles (hero, menu grid, testimonials, FAQ, item-detail modal,
 * journal...) are NOT included here — those belong to each page template as
 * it gets built and aren't part of the shared header/footer pass.
 *
 * Read HANDOFF.md Section 9 before editing:
 *  1. Specificity trap: a broad rule like `.navactions button` beats `.burger`
 *     regardless of media queries, because class+element > class alone. Don't
 *     add broad `.navactions *` style rules without checking this again.
 *  2. Padding stacks across nested elements — check every nested layer when
 *     adjusting spacing on mobile, not just the outermost section.
 *  3. Hard breakpoints, not clamp(): the logo and nav intentionally snap at
 *     780px instead of scaling fluidly. Don't reintroduce clamp() here for
 *     "responsiveness" — that includes flex `gap`, not just element size.
 */

:root {
	--ink: #001E54;
	--paper: #ECE2CC;
	--paper-2: #E1D3AF;
	--brown: #B57552;
	--green: #3B5442;
	--cream-card: #FBF6EA;
	--line: rgba(0, 30, 84, 0.14);
	--shadow: 0 18px 40px -18px rgba(0, 30, 84, 0.35);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: 'Jost', sans-serif;
	-webkit-font-smoothing: antialiased;
}
body[dir="rtl"]{ font-family: 'Noto Naskh Arabic', 'Jost', sans-serif; }

/* Parallel-language content blocks: one real Gutenberg block subtree per
 * language, visibility toggled by the html[lang] attribute — the same
 * attribute assets/js/site.js already sets on every language switch via
 * `document.documentElement.lang = lang`. No custom data-* attributes on
 * these blocks, so nothing here is at risk of being stripped by a Gutenberg
 * save. English is the default/fallback (WordPress's own site-locale value,
 * e.g. "en-US", never exactly matches "tr"/"ar" below, so EN shows until the
 * visitor actively switches).
 *
 * display:contents on the active wrapper (not display:block) so the group's
 * own box disappears and its single child block participates directly in
 * whatever flex/grid layout the surrounding markup expects — e.g. a button
 * inside .hero-actions or .about-split still lays out correctly.
 */
.i18n-en, .i18n-tr, .i18n-ar{ display: none; }
.i18n-en{ display: contents; }
html[lang="tr"] .i18n-en{ display: none; }
html[lang="tr"] .i18n-tr{ display: contents; }
html[lang="ar"] .i18n-en{ display: none; }
html[lang="ar"] .i18n-ar{ display: contents; }

img{ max-width: 100%; display: block; background: var(--paper-2); }
.brand img, .foot-logo img{ background: transparent; }

a{ color: inherit; text-decoration: none; }

h1, h2, h3, h4{ font-family: 'Jost', sans-serif; margin: 0; line-height: 1.05; font-weight: 900; }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3, body[dir="rtl"] h4{ font-family: 'Noto Naskh Arabic', serif; }
p{ margin: 0; }

.eyebrow{ font-family: 'Jost', sans-serif; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--brown); }
body[dir="rtl"] .eyebrow{ font-family: 'Noto Naskh Arabic', sans-serif; letter-spacing: 0; }

.wrap{ max-width: 1360px; margin: 0 auto; padding: 0 40px; }
section{ padding: 96px 0; }
@media (max-width: 600px){ section{ padding: 64px 0; } }

/* Buttons: two variants only — primary (navy bg / cream text) and
   secondary (cream bg / navy text), covering what used to be two separate
   "outline" and "on-dark" styles before they were unified. Don't reintroduce
   a third visual variant. */
.btn{
	display: inline-flex; align-items: center; gap: 8px; font-family: 'Jost', sans-serif;
	text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700;
	padding: 14px 26px; border-radius: 2px; border: 2px solid var(--ink);
	background: var(--ink); color: var(--paper); cursor: pointer;
	transition: transform .18s ease, background .18s ease, color .18s ease;
}
body[dir="rtl"] .btn{ font-family: 'Noto Naskh Arabic', sans-serif; letter-spacing: 0; text-transform: none; }
.btn:hover{ background: var(--green); border-color: var(--green); transform: translateY(-2px); }
.btn.outline, .btn.on-dark{ background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.outline:hover, .btn.on-dark:hover{ background: var(--green); border-color: var(--green); color: var(--paper); transform: translateY(-2px); }

/* core/button "Secondary (cream)" style, registered in functions.php */
.wp-block-button.is-style-kukburi-secondary .wp-block-button__link{
	background-color: var(--paper); color: var(--ink); border-color: var(--paper);
}
.wp-block-button.is-style-kukburi-secondary .wp-block-button__link:hover{
	background-color: var(--green); color: var(--paper); border-color: var(--green);
}

:focus-visible{ outline: 3px solid var(--green); outline-offset: 3px; }

/* ---------- Header ---------- */
header{ position: sticky; top: 0; z-index: 50; background: rgba(236,226,204,0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar{ background: var(--ink); color: var(--paper); font-family: 'Jost', sans-serif; font-size: .85rem; font-weight: 500; letter-spacing: .03em; text-align: center; padding: 9px 12px; }
body[dir="rtl"] .topbar{ font-family: 'Noto Naskh Arabic', sans-serif; letter-spacing: 0; }
.navrow{ display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 14px 40px; max-width: 1360px; margin: 0 auto; column-gap: 24px; }
@media (max-width: 780px){ .navrow{ padding-top: 10px; padding-bottom: 10px; } }
.brand{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img.icon{ height: 54px; width: auto; }
.brand img.wordmark{ height: 26px; width: auto; margin-top: 2px; }
nav.mainnav{ display: flex; gap: 30px; justify-self: center; white-space: nowrap; }
nav.mainnav a{ font-size: .98rem; font-weight: 600; position: relative; padding: 4px 0; }
nav.mainnav a::after{ content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--brown); transition: width .2s ease; }
nav.mainnav a:hover::after{ width: 100%; }
.navactions{ display: flex; align-items: center; gap: 16px; }
.navactions button{ background: none; border: none; cursor: pointer; color: var(--ink); font-family: 'Jost',sans-serif; font-size: .78rem; display: flex; align-items: center; gap: 6px; }
.icon-btn{ padding: 6px; border-radius: 50%; transition: background .15s ease; }
.icon-btn:hover{ background: rgba(0,30,84,0.08); }
.icon-btn svg{ display: block; flex-shrink: 0; }
.cart-btn{ position: relative; }
.cart-count{
	font-family: 'Jost',sans-serif; font-size: .68rem; font-weight: 700;
	background: var(--green); color: #fff; min-width: 16px; height: 16px; padding: 0 4px;
	border-radius: 999px; display: flex; align-items: center; justify-content: center;
	position: absolute; top: -2px; right: -4px; line-height: 1;
}

.lang-select{ position: relative; font-family: 'Jost',sans-serif; font-size: .74rem; }
.lang-current{
	display: flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--line);
	border-radius: 20px; background: var(--ink); color: var(--paper); cursor: pointer; font-family: 'Jost',sans-serif; font-size: .74rem; font-weight: 600;
}
.lang-current::after{ content: "▾"; font-size: .65em; opacity: .8; }
.lang-dropdown{
	position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
	display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--line);
	border-radius: 10px; padding: 6px; box-shadow: var(--shadow); min-width: 64px; z-index: 60;
	opacity: 0; pointer-events: none; transform-origin: top center;
	transition: opacity .15s ease, transform .15s ease;
}
.lang-select.open .lang-dropdown{ opacity: 1; pointer-events: auto; transform: translateX(-50%) scaleY(1); }
.lang-dropdown button{
	padding: 6px 12px; border: none; border-radius: 6px; background: transparent; cursor: pointer;
	font-family: 'Jost',sans-serif; font-size: .74rem; text-align: center;
}
.lang-dropdown button:hover{ background: rgba(0,30,84,0.08); }

/* Hard breakpoint at 780px: nav links + language switcher above it, hamburger
   below it. Never both — see the specificity-trap note at the top of this file. */
.burger{ display: none !important; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; margin-left: 4px; }
@media (max-width: 780px){
	.mainnav{ display: none !important; }
	.navactions .lang-select{ display: none !important; }
	.burger{ display: flex !important; }
	.mobile-nav{ display: flex !important; }
	.brand img.icon{ height: 38px; }
	.brand img.wordmark{ height: 18px; }
}
@media (max-width: 300px){
	.brand img.icon{ display: none; }
}
.burger span{ width: 22px; height: 2px; background: var(--ink); display: block; transition: .25s ease; }
.burger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity: 0; }
.burger.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
.mobile-nav{ display: none; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.mobile-nav.open{ max-height: 460px; }
.mobile-nav a{ padding: 16px 20px; border-top: 1px solid var(--line); font-weight: 600; font-size: .95rem; }
.mobile-nav .mobile-lang{ display: flex; gap: 8px; padding: 16px 20px; }
.mobile-nav .mobile-lang button{ font-family: 'Jost',sans-serif; font-size: .75rem; padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; background: transparent; cursor: pointer; }
.mobile-nav .mobile-lang button.active{ background: var(--ink); color: var(--paper); border-color: var(--ink); }

.toast{ position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 4px; font-family: 'Jost',sans-serif; font-size: .78rem; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
footer{ background: #000E28; color: var(--paper); padding: 80px 0 24px; }
.foot-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.foot-logo{ display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot-logo img.icon{ height: 46px; width: auto; }
.foot-logo img.wordmark{ height: 22px; width: auto; filter: brightness(0) invert(1); }
.foot-grid p{ opacity: .65; font-size: .88rem; line-height: 1.6; max-width: 280px; }
.foot-col h5{ font-family: 'Jost',sans-serif; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; opacity: .6; margin-bottom: 18px; }
.foot-col a{ display: block; opacity: .85; font-size: .9rem; margin-bottom: 12px; }
.foot-col a:hover{ opacity: 1; text-decoration: underline; }
/* Non-interactive footer lines (hours) that look like the links above them
 * but aren't links — see parts/footer.html. */
.foot-col .foot-static{ display: block; opacity: .85; font-size: .9rem; margin-bottom: 12px; }
.foot-bottom{ border-top: 1px solid rgba(236,226,204,.15); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .78rem; opacity: .55; }
.socials{ display: flex; gap: 14px; }

@media (max-width: 980px){
	.foot-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px){
	.topbar{ padding: 6px 10px; font-size: .68rem; letter-spacing: 0; line-height: 1.3; }
	.wrap, .navrow{ padding-left: 20px; padding-right: 20px; }
	.foot-grid{ grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce){ *{ transition: none !important; animation: none !important; } }

/* Generic reveal-on-scroll utility, reused by page-section cards once those
   templates are built. */
.reveal{ opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity: 1; transform: none; }
