/*
 * Creative Chinuch: shared styles (ported from the V2 site).
 * Section-specific styles live with their blocks in /blocks/<name>/style.css
 * and only load on pages that use them.
 */

:root {
	--cc-pink: #EC297B;
	--cc-orange: #F05A28;
	--cc-ink: #111111;
	--cc-paper: #ffffff;
	--cc-graphite: #3C3E43;
	--cc-stone: #5A5C61;
	--cc-mist: #F1F1F1;
	--cc-line: #E3E3E3;
	--cc-gutter: clamp(16px, 2vw, 24px);
	--cc-edge: clamp(8px, 2vw, 24px);
	--cc-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base ---------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cc-paper); color: var(--cc-ink); font-family: "Inter Tight", system-ui, sans-serif; overflow-x: clip; }
img { max-width: 100%; height: auto; }
.cc-sr, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.he, [lang="he"] { font-family: "Frank Ruhl Libre", "Times New Roman", serif; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks p, .wp-site-blocks h1, .wp-site-blocks h2, .wp-site-blocks h3, .wp-site-blocks h4, .wp-site-blocks figure { margin-top: 0; margin-bottom: 0; }

/* Page in / page out --------------------------------------------------------- */
@keyframes pgIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes inUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes veil { from { opacity: 1; } to { opacity: 0; } }
.wp-site-blocks { transition: opacity .35s ease; }
.home .wp-site-blocks { animation: pgIn .6s ease both; }
body.cc-leaving .wp-site-blocks { opacity: 0 !important; }
.cc-veil { position: fixed; inset: 0; z-index: 100; background: var(--cc-pink); pointer-events: none; animation: veil 1s cubic-bezier(.4, 0, .2, 1) both; }
.cc-in { animation: inUp 1s var(--cc-ease) both; }
.cc-d-100 { animation-delay: 100ms; } .cc-d-150 { animation-delay: 150ms; } .cc-d-200 { animation-delay: 200ms; }
.cc-d-250 { animation-delay: 250ms; } .cc-d-300 { animation-delay: 300ms; } .cc-d-350 { animation-delay: 350ms; }
.cc-d-400 { animation-delay: 400ms; } .cc-d-450 { animation-delay: 450ms; } .cc-d-500 { animation-delay: 500ms; }
.cc-d-550 { animation-delay: 550ms; } .cc-d-600 { animation-delay: 600ms; } .cc-d-650 { animation-delay: 650ms; }
.cc-d-700 { animation-delay: 700ms; } .cc-d-750 { animation-delay: 750ms; } .cc-d-800 { animation-delay: 800ms; }
.cc-d-900 { animation-delay: 900ms; } .cc-d-1000 { animation-delay: 1000ms; }

/* Header: fixed, transparent, logo + inline links (no hamburger) ------------- */
.cc-site-header { position: fixed; top: 16px; left: var(--cc-edge); right: var(--cc-edge); z-index: 30; }
.admin-bar .cc-site-header { top: calc(16px + var(--wp-admin--admin-bar--height, 0px)); }
.cc-hdr { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.cc-hdr__logo { flex: none; width: 44px; height: 44px; margin: 0; }
.cc-hdr__logo a, .cc-hdr__logo img { display: block; width: 100% !important; height: 100% !important; object-fit: contain; }
.cc-hdr__logo img { transition: filter .45s ease; }
.cc-hdr__nav .wp-block-navigation__container { display: flex; flex-wrap: wrap; gap: 4px clamp(14px, 1.8vw, 26px); }
.cc-hdr__nav { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.cc-hdr__nav .wp-block-navigation-item__content { padding: 0; color: var(--cc-ink); text-decoration: none; transition: color .3s ease; }
.home .cc-hdr__nav .wp-block-navigation-item__content { transition-duration: .45s; }
.cc-hdr__nav .wp-block-navigation-item__content:hover,
.cc-hdr__nav .wp-block-navigation-item__content:focus-visible { color: var(--cc-pink); }
/* Header over pink (Home's pink scene) */
body.cc-hdr-pink .cc-hdr__nav .wp-block-navigation-item__content { color: var(--cc-paper); }
body.cc-hdr-pink .cc-hdr__nav .wp-block-navigation-item__content:hover { color: var(--cc-ink); }
body.cc-hdr-pink .cc-hdr__logo img { filter: brightness(0) invert(1); }
@media (max-width: 420px) {
	.cc-hdr__nav .wp-block-navigation__container { gap: 4px 12px; }
	.cc-hdr__nav { font-size: 14px; }
}

/* Page skins (page templates) ------------------------------------------------- */
/* Dark (About): near-black page, white header and logo, white veil (1.2 s) */
body.page-template-page-dark { background: #0B0B0B; color: #ffffff; }
body.page-template-page-dark .cc-hdr__nav .wp-block-navigation-item__content { color: #ffffff; }
body.page-template-page-dark .cc-hdr__logo img { filter: brightness(0) invert(1); }
body.page-template-page-dark .cc-veil { background: #ffffff; animation-duration: 1.2s; }
/* Call (Book a Call): near-black page, white links, logo keeps its colours, pink veil */
body.page-template-page-call { background: #0B0B0B; color: #ffffff; }
body.page-template-page-call .cc-hdr__nav .wp-block-navigation-item__content { color: #ffffff; }
/* Pink (Contact): pink page, white header and logo, white veil (1.2 s) */
body.page-template-page-pink { background: var(--cc-pink); color: #ffffff; }
body.page-template-page-pink .cc-hdr__nav .wp-block-navigation-item__content { color: #ffffff; }
body.page-template-page-pink .cc-hdr__nav .wp-block-navigation-item__content:hover { color: var(--cc-ink); }
body.page-template-page-pink .cc-hdr__logo img { filter: brightness(0) invert(1); }
body.page-template-page-pink .cc-veil { background: #ffffff; animation-duration: 1.2s; }
body.page-template-page-dark .cc-ftr, body.page-template-page-call .cc-ftr, body.page-template-page-pink .cc-ftr { border-top: 0; }

/* Footer --------------------------------------------------------------------- */
.cc-ftr { position: relative; z-index: 1; background: var(--cc-paper); color: var(--cc-ink); padding: clamp(48px, 6vw, 88px) var(--cc-gutter) 32px; display: flex; flex-direction: column; gap: clamp(48px, 6vw, 80px); }
body:not(.home) .cc-ftr { border-top: 1px solid var(--cc-line); }
.cc-ftr__map { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px 32px; max-width: 900px; }
.cc-ftr__col { display: flex; flex-direction: column; gap: 8px; }
.cc-ftr__h { margin: 0 0 8px !important; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.cc-ftr__l { font-size: 18px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
.cc-ftr__l a { color: var(--cc-ink); text-decoration: none; }
.cc-ftr__l a:hover, .cc-ftr__l a:focus-visible { color: var(--cc-pink); }
.cc-ftr__base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.cc-ftr__mark { font-size: clamp(40px, 8vw, 128px); font-weight: 800; line-height: .9; letter-spacing: -0.04em; color: var(--cc-pink); }
.cc-ftr__meta { margin-left: auto !important; font-size: 14px; font-weight: 500; text-align: right; }

/* Shared controls ------------------------------------------------------------- */
.cc-go, .wp-block-button.is-style-cc-go .wp-block-button__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--cc-ink); color: var(--cc-paper); text-decoration: none; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.cc-go:hover, .cc-go:focus-visible, .wp-block-button.is-style-cc-go .wp-block-button__link:hover { background: var(--cc-pink); color: var(--cc-paper); }
.cc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--cc-ink); background: transparent; color: var(--cc-ink); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.cc-chip:hover { background: var(--cc-mist); }
.cc-chip.on, .cc-chip[aria-pressed="true"] { background: var(--cc-ink); color: var(--cc-paper); }
.cc-chip .ct { font-size: 12px; font-weight: 500; opacity: .6; font-variant-numeric: tabular-nums; }
.cc-lnk { color: var(--cc-ink); font-weight: 600; font-size: 15px; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.cc-lnk:hover, .cc-lnk:focus-visible { color: var(--cc-pink); }
:focus-visible { outline: 2px solid var(--cc-pink); outline-offset: 3px; }

/* Standard templates (pages V2 didn't design: Latest, posts, plain pages, search, 404) */
.cc-std-head { padding: 128px var(--cc-gutter) clamp(32px, 4vw, 56px); display: flex; flex-direction: column; gap: 14px; }
.cc-std-label { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #8A8C90; }
.cc-std-title { margin: 0; max-width: 16em; font-size: clamp(48px, 8vw, 140px); font-weight: 700; line-height: .9; letter-spacing: -0.055em; }
.cc-std-lead { max-width: 32em; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.4; color: var(--cc-graphite); }
.cc-std-search { max-width: 520px; margin-top: 12px; }
.cc-std-hero { margin: 0 var(--cc-gutter) clamp(40px, 5vw, 72px) !important; overflow: hidden; border-radius: clamp(10px, 1.2vw, 18px); }
.cc-std-hero img { display: block; width: 100%; height: auto; }
.cc-prose { padding: 0 var(--cc-gutter) clamp(80px, 10vw, 140px); max-width: 760px; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.6; }
.cc-prose > * + * { margin-top: 1em !important; }
.cc-prose h2 { font-size: clamp(30px, 3.4vw, 52px); line-height: 1; letter-spacing: -0.04em; margin-top: 1.4em !important; }
.cc-prose h3 { font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.02em; margin-top: 1.2em !important; }
.cc-prose a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cc-prose a:hover { color: var(--cc-pink); }
.cc-std-nav { display: flex; justify-content: space-between; gap: 24px; padding: clamp(32px, 4vw, 56px) var(--cc-gutter) clamp(80px, 10vw, 140px); border-top: 1px solid var(--cc-line); font-weight: 600; }
.cc-std-nav a:hover { color: var(--cc-pink); }
.cc-cards { padding: 0 var(--cc-gutter) clamp(80px, 10vw, 140px); }
.cc-cards__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(12px, 1.6vw, 24px); list-style: none; margin: 0; padding: 0; }
.cc-cards__im { margin: 0 0 14px !important; overflow: hidden; border-radius: clamp(8px, .9vw, 14px); background: var(--cc-mist); }
.cc-cards__im img { display: block; width: 100%; height: 100% !important; object-fit: cover; filter: grayscale(1); transition: filter .45s ease, transform .7s var(--cc-ease); }
.cc-cards__grid li:hover .cc-cards__im img, .cc-cards__im a:focus-visible img { filter: none; transform: scale(1.04); }
.cc-cards__t { margin: 0 0 4px !important; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.cc-cards__t a:hover { color: var(--cc-pink); }
.cc-cards__c, .cc-cards__c a { font-size: 14px; color: #8A8C90; }
.cc-cards__pages { margin-top: clamp(40px, 5vw, 64px); font-weight: 600; }
.cc-cards__none { font-size: 20px; color: var(--cc-graphite); }
@media (hover: none) { .cc-cards__im img { filter: none; } }
.cc-404 { min-height: 80vh; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 140px var(--cc-gutter) clamp(48px, 6vw, 88px); box-sizing: border-box; }
.cc-404__t { margin: 0; font-size: clamp(120px, 26vw, 420px); font-weight: 700; line-height: .8; letter-spacing: -0.07em; color: var(--cc-pink); }
.cc-404 .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Large screens (V2 scales the chrome up) ------------------------------------- */
@media (min-width: 1800px) {
	.cc-hdr__nav { font-size: 18px; }
	.cc-hdr__logo { width: 56px; height: 56px; }
	.cc-ftr__l { font-size: 21px; }
	.cc-chip, .cc-go, .cc-tag, .cc-back { font-size: 17px; }
}
@media (min-width: 2400px) {
	.cc-hdr__nav { font-size: 21px; }
	.cc-hdr__logo { width: 66px; height: 66px; }
	.cc-ftr__l { font-size: 24px; }
	.cc-chip, .cc-go, .cc-tag, .cc-back { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.cc-in, .cc-veil, .home .wp-site-blocks { animation: none !important; }
	.cc-veil { opacity: 0; }
	.wp-site-blocks { transition: none; }
}
