/*
Theme Name: ater.architects
Author: 7am.agency
Description: Custom theme for ater.architects, ported from the Squarespace site.
Version: 4.3.4
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ater
*/

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(assets/fonts/figtree-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(assets/fonts/figtree-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(assets/fonts/figtree-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(assets/fonts/figtree-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url(assets/fonts/archivo-black-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url(assets/fonts/archivo-black-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Cyrillic: Figtree and Archivo Black have none — Onest (Ukrainian-designed, similar geometry) fills in for Cyrillic only. */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(assets/fonts/onest-cyrillic-400.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(assets/fonts/onest-cyrillic-700.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url(assets/fonts/onest-cyrillic-900.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
	--gutter: 22px;
	--gap: 20px;
	--block-gap: 34px;
	--section-gap: 72px;
	--photo-h: 88vh;
	--text: #2b2b2b;
	--muted: #d9d9d9;
	--quiet: #707070;
	--line: #ececec;
	--placeholder: #f3f1ee;
	--font-body: "Figtree", system-ui, sans-serif;
	--font-display: "Archivo Black", "Figtree", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 400 15px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Header: small type, top right; transparent over the home hero, black on dark pages */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); color: #000; transition: background .35s, color .35s; }
.site-logo img { width: 104px; transition: filter .35s; }
.site-header__right { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.site-nav a, .lang-switch a { font: 500 14px/1 var(--font-body); letter-spacing: 0; text-decoration: none; color: inherit; opacity: .5; transition: opacity .2s; }
.site-nav li { position: relative; }
.site-nav .site-nav__sub { position: absolute; top: 100%; left: -12px; display: block; min-width: 110px; padding: 10px 12px 12px; background: #fff; color: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .2s, transform .2s, visibility .2s; }
.site-nav .site-nav__sub li + li { margin-top: 10px; }
.site-nav .site-nav__sub a { opacity: .55; }
.site-nav .site-nav__sub a:hover { opacity: 1; }
.site-nav .has-sub:hover .site-nav__sub, .site-nav .has-sub:focus-within .site-nav__sub { opacity: 1; visibility: visible; transform: none; }
.site-nav a:hover, .site-nav .is-current a, .lang-switch a:hover, .lang-switch .is-current a { opacity: 1; }
.lang-switch { display: flex; gap: 6px; margin: 0; padding: 0 0 0 16px; list-style: none; border-left: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent); }
.lang-switch a { font-size: 12px; letter-spacing: .06em; }
.has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; color: #fff; }
.has-hero .site-logo img, .is-dark .site-logo img, .header-dark .site-logo img { filter: invert(1); }
.has-hero.is-scrolled .site-header { background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); color: #000; }
.has-hero.is-scrolled .site-logo img { filter: none; }
.is-dark .site-header, .header-dark .site-header { background: #000; color: #fff; }

.site-main { padding: 0 var(--gutter) var(--section-gap); }
.single-project .site-main { padding-bottom: 0; }

/* Footer: one quiet line */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 26px var(--gutter) 28px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); }
.site-footer a { color: inherit; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #000; }
.site-footer__mail { color: #000 !important; }
.site-footer__social { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.site-footer__legal { margin: 0; }

/* Mobile menu (Menu+ → full-screen): calm white list */
.menu-toggle { display: none; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; color: inherit; font: 500 14px/1 var(--font-body); cursor: pointer; }
.menu-toggle__icon { position: relative; width: 10px; height: 10px; }
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1.5px; margin-top: -.75px; background: currentColor; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.menu-toggle__icon::after { transform: rotate(90deg); }
.menu-open .menu-toggle__icon::after { transform: rotate(0deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; justify-content: space-between; padding: 120px var(--gutter) 28px; background: #fff; color: #000; overflow-y: auto; opacity: 0; transition: opacity .3s ease; }
.mobile-menu[hidden] { display: none; }
.menu-open .mobile-menu { opacity: 1; }
.mobile-menu__nav ul { margin: 0; padding: 0; list-style: none; }
.mobile-menu__nav li { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(.05s * var(--i) + .05s); }
.menu-open .mobile-menu__nav li { opacity: 1; transform: none; }
.mobile-menu__nav a { display: block; padding: 5px 0; color: #000; text-decoration: none; font: 700 38px/1.1 var(--font-body); letter-spacing: -.04em; }
.mobile-menu__parent { display: flex; align-items: center; gap: 10px; padding: 5px 0; border: 0; background: none; color: #000; font: 700 38px/1.1 var(--font-body); letter-spacing: -.04em; cursor: pointer; }
.is-current > .mobile-menu__parent { color: #b5b5b5; }
.mobile-menu__plus { position: relative; width: 14px; height: 14px; }
.mobile-menu__plus::before, .mobile-menu__plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 2px; margin-top: -1px; background: currentColor; transition: transform .3s; }
.mobile-menu__plus::after { transform: rotate(90deg); }
.mobile-menu__parent[aria-expanded="true"] .mobile-menu__plus::after { transform: rotate(0deg); }
.mobile-menu__sub { margin: 2px 0 10px; padding: 0 0 0 2px; list-style: none; }
.mobile-menu__sub[hidden] { display: none; }
.mobile-menu__nav .mobile-menu__sub li { opacity: 1; transform: none; }
.mobile-menu__nav .mobile-menu__sub li { transition-delay: .3s; }
.mobile-menu__nav .mobile-menu__sub a { padding: 3px 0; font: 600 22px/1.25 var(--font-body); letter-spacing: -.02em; color: #000 !important; }
.mobile-menu__nav .is-current a { color: #b5b5b5; }
.mobile-menu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; opacity: 0; transition: opacity .5s ease .25s; }
.menu-open .mobile-menu__foot { opacity: 1; }
.mobile-menu__foot a { color: #000; text-decoration: none; }
.mobile-menu__foot .lang-switch { margin: 0 0 18px; padding: 0; border: 0; gap: 14px; }
.mobile-menu__foot .lang-switch .is-current { display: list-item; }
.mobile-menu__foot .lang-switch a { font-size: 14px; color: #000; }
.mobile-menu__social { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; list-style: none; }
.mobile-menu__social a { color: var(--quiet) !important; }
.menu-open { overflow: hidden; }
.menu-open .site-header { background: #fff !important; backdrop-filter: none !important; color: #000 !important; }
.menu-open .site-logo img { filter: none !important; }

/* Home hero */
.hero { position: relative; height: 100svh; min-height: 560px; margin: 0 calc(-1 * var(--gutter)); color: #fff; overflow: hidden; background: #2a2622; }
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 100%); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; padding: 104px var(--gutter) 28px; }
.hero__title { margin: 0; font: 700 clamp(44px, 11.2vw, 196px)/.88 var(--font-body); letter-spacing: -.045em; }
.hero__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font: 500 15px/1 var(--font-body); }
.hero__year { font: 700 clamp(28px, 4.4vw, 72px)/1 var(--font-body); letter-spacing: -.04em; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: auto; }
.hero__lead { max-width: 560px; margin: 0; font: 500 clamp(17px, 1.5vw, 22px)/1.35 var(--font-body); letter-spacing: -.01em; }
.hero__links { display: flex; gap: 22px; font-size: 14px; white-space: nowrap; }
.hero__links a { color: #fff; text-decoration: none; opacity: .85; }
.hero__links a:hover { opacity: 1; }
.hero__cta { opacity: 1 !important; border-bottom: 1px solid #fff; }
.hero__credit { position: absolute; right: var(--gutter); top: 50%; color: #fff; font-size: 11px; letter-spacing: .12em; text-decoration: none; opacity: .7; writing-mode: vertical-rl; }

/* Work grid with type filter */
.work { padding-top: 56px; scroll-margin-top: 40px; }
.work__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 24px; }
.work__title { margin: 0; font: 700 clamp(34px, 4.4vw, 64px)/1 var(--font-body); letter-spacing: -.04em; color: #000; }
.work__filter { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.work__filter button { padding: 0; border: 0; background: none; font: 500 14px/1.6 var(--font-body); color: #000; opacity: .58; cursor: pointer; transition: opacity .2s; }
.work__filter a { font: 500 14px/1.6 var(--font-body); color: #000; opacity: .58; text-decoration: none; transition: opacity .2s; }
.work__filter a:hover { opacity: 1; }
.work__filter button:hover, .work__filter .is-active { opacity: 1; }
.work__filter .is-active { text-decoration: underline; text-underline-offset: 4px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 8px; }
.project-card { display: block; color: #000; text-decoration: none; }
.project-card.is-hidden { display: none; }
.project-card__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--card-bg, var(--placeholder)); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.project-card:hover .project-card__media img { transform: scale(1.03); }
.project-card__caption { display: flex; justify-content: flex-start; align-items: baseline; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.3; }
.project-card__name { font-weight: 700; letter-spacing: .02em; }
.project-card__type { color: var(--quiet); }
.project-card__type:not(:empty)::before { content: "|"; margin-right: 8px; color: #c4c4c4; }

/* Content flow */
.entry > * { margin-top: 0; margin-bottom: var(--block-gap); }
.entry img { background: var(--placeholder); }
.entry strong { font-weight: 700; color: #000; }

/* Text: a readable column instead of full-width lines. */
.entry > p { max-width: 680px; margin-left: auto; margin-right: auto; margin-bottom: 1em; }
.entry > :not(p) + p { margin-top: calc(var(--section-gap) - var(--block-gap)); }
.entry > p + :not(p) { margin-top: calc(var(--section-gap) - 1em); }
.entry a { text-underline-offset: 3px; }

/* Single photos: never taller than the screen, centred. The first one is the hero. */
.entry .wp-block-image { margin-left: 0; margin-right: 0; }
.entry > .wp-block-image img { width: auto; max-height: var(--photo-h); margin-inline: auto; }
.entry > .wp-block-image:first-child img { width: 100%; max-height: var(--photo-h); object-fit: cover; }

/* Galleries: 2/3/4 per row, 2:3 portrait crop, a pair always fits on one screen. */
.entry .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: var(--gap); gap: var(--gap); margin-inline: auto; justify-content: center; }
.entry .wp-block-gallery.has-nested-images > figure.wp-block-image { flex: 0 0 auto; aspect-ratio: 2 / 3; margin: 0; }
.entry .wp-block-gallery.has-nested-images > figure.wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.entry .wp-block-gallery.has-nested-images.columns-2 { max-width: calc(var(--photo-h) * 4 / 3 + var(--gap)); }
.entry .wp-block-gallery.has-nested-images.columns-3 { max-width: calc(var(--photo-h) * 2 + 2 * var(--gap)); }
.entry .wp-block-gallery.has-nested-images.columns-4 { max-width: calc(var(--photo-h) * 8 / 3 + 3 * var(--gap)); }
.entry .wp-block-gallery.has-nested-images.columns-2 > figure.wp-block-image { width: calc(50% - var(--gap) / 2); }
.entry .wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image { width: calc((100% - 2 * var(--gap)) / 3); }
.entry .wp-block-gallery.has-nested-images.columns-4 > figure.wp-block-image { width: calc((100% - 3 * var(--gap)) / 4); }

/* Project header: title + details beside the floor plan. */
.project-head { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 48px; align-items: center; padding: calc(var(--section-gap) - var(--block-gap)) 0; }
.project-head__title { margin: 0 0 32px; font: 400 clamp(36px, 4.4vw, 64px)/1 var(--font-display); text-transform: uppercase; letter-spacing: -.01em; color: #000; }
.project-meta { display: grid; gap: 10px; margin: 0; font-size: 13px; }
.project-meta > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.project-meta dt { color: var(--quiet); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; line-height: 1.9; }
.project-meta dd { margin: 0; color: #000; }
.project-meta a { text-decoration: none; border-bottom: 1px solid currentColor; }
.project-head__plan .wp-block-image { margin: 0; }
.project-head__plan img { width: auto; max-height: 75vh; margin-left: auto; background: none; }

/* Next project */
/* End of project: CTA, then next project */
.project-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 32px; margin-top: var(--section-gap); padding: 36px 0; border-top: 1px solid var(--line); }
.project-cta__text { margin: 0; font: 700 clamp(22px, 2.4vw, 34px)/1.1 var(--font-body); letter-spacing: -.03em; color: #000; }
.project-cta__link { padding: 15px 24px; border: 1px solid #000; border-radius: 999px; background: #000; color: #fff; font: 600 14px/1 var(--font-body); text-decoration: none; transition: background .2s, color .2s; }
.project-cta__link:hover { background: #fff; color: #000; }
.project-cta + .next-project { margin-top: 0; }
.contact__ref { margin: 0; font-size: 14px; opacity: .7; }
.contact__ref strong { font-weight: 700; }

/* Photo viewer (site.js): full screen, swipe / arrows / keys */
.entry .wp-block-image img { cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #fff; opacity: 0; transition: opacity .25s ease; touch-action: pan-y; }
.viewer.is-open { opacity: 1; }
.viewer[hidden] { display: none; } /* display:flex above would otherwise keep the closed viewer over the page, swallowing clicks */
.viewer__img { max-width: 100vw; max-height: 100svh; object-fit: contain; transition: opacity .2s ease; user-select: none; -webkit-user-drag: none; }
.viewer__img.is-loading { opacity: 0; }
.viewer__bar { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); font: 500 14px/1 var(--font-body); color: #000; pointer-events: none; }
.viewer__bar--top { top: 0; }
.viewer__bar--bottom { bottom: 0; justify-content: center; gap: 28px; }
.viewer button { pointer-events: auto; padding: 10px 6px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; mix-blend-mode: difference; color: #fff; }
.viewer__count { mix-blend-mode: difference; color: #fff; font-variant-numeric: tabular-nums; }
.viewer__nav { font-size: 20px !important; }
.viewer-open { overflow: hidden; }

.next-project { margin-top: var(--section-gap); border-top: 1px solid var(--line); }
.next-project a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 0; text-decoration: none; }
.next-project__label { color: var(--quiet); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.next-project__title { font: 400 clamp(32px, 4vw, 56px)/1 var(--font-display); text-transform: uppercase; transition: opacity .2s; }
.next-project a:hover .next-project__title { opacity: .55; }

/* Info page: photo with dark text card, second photo beside it. */
.info-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; margin-top: 0; }
.info-layout > * { margin: 0; }
.info-layout .project-intro { position: relative; display: grid; align-items: center; }
.info-layout .project-intro > .wp-block-image { grid-area: 1 / 1; margin: 0; }
.info-layout .project-intro__card { grid-area: 1 / 1; justify-self: end; width: 80%; padding: 48px; background: #000; color: #fff; }
.info-layout .project-intro__card > * { margin: 0; }
.info-layout .project-intro__card h2 { margin-bottom: 20px; font: 400 28px/1.1 var(--font-display); }
.info-layout .project-intro__card p { font-size: 14px; line-height: 1.7; }
.info-layout .project-intro__card p + p { margin-top: 1em; }
.info-layout .project-intro__card strong { color: #fff; font-weight: 400; }
.info-layout .project-intro__card a { color: #fff; text-decoration: none; }
.info-layout .project-intro__card a:hover { text-decoration: underline; }
.info-layout .project-intro__card p:last-child a { margin-right: 12px; text-transform: uppercase; font-weight: 700; font-size: 12px; letter-spacing: .06em; }
.info-layout img { width: 100%; }

/* Contact form (Info page) */
.contact { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 48px; margin-top: var(--section-gap); padding-top: var(--section-gap); border-top: 1px solid var(--line); }
.contact__title { margin: 0 0 16px; font: 400 clamp(28px, 3vw, 40px)/1.05 var(--font-display); text-transform: uppercase; color: #000; }
.contact__intro p { margin: 0 0 1em; max-width: 360px; }
.contact__direct a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact__form { display: grid; gap: 18px; max-width: 760px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact__field { display: grid; gap: 6px; }
.contact__field span { color: var(--quiet); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.contact__field input, .contact__field select, .contact__field textarea { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #cfcfcf; border-radius: 0; background: transparent; font: inherit; color: #000; transition: border-color .2s; }
.contact__field textarea { resize: vertical; min-height: 120px; }
.contact__field :focus { outline: none; border-bottom-color: #000; }
.contact__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--quiet); }
.contact__consent input { margin-top: 3px; accent-color: #000; }
.contact__submit { justify-self: start; padding: 14px 28px; border: 1px solid #000; background: #000; color: #fff; font: 700 13px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.contact__submit:hover { background: #fff; color: #000; }
.contact__submit[disabled] { opacity: .5; cursor: wait; }
.contact__notice { margin: 0; padding: 14px 16px; background: var(--placeholder); color: #000; }
.contact__notice--error { background: #fbeaea; }
.contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Plain text pages (privacy policy) */
.entry.type-page:not(:has(.info-layout)) { padding-top: 40px; }
.entry h1.wp-block-heading:not(.screen-reader-text) { max-width: 680px; margin: 0 auto 32px; font: 400 clamp(32px, 4vw, 48px)/1.05 var(--font-display); text-transform: uppercase; color: #000; }
.entry > h2.wp-block-heading { max-width: 680px; margin: 40px auto 12px; font-size: 17px; color: #000; }
.entry > ul { max-width: 680px; margin-left: auto; margin-right: auto; padding-left: 1.2em; }

/* About (Info page) */
.about { padding-top: 0; }
.about__intro { display: flex; flex-direction: column; justify-content: space-between; min-height: 72svh; margin: 0 calc(-1 * var(--gutter)); padding: 72px var(--gutter) 36px; background: #000; color: #fff; }
.about__intro-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-top: 48px; }
.about__cta { color: #fff; font-size: 14px; text-decoration: none; border-bottom: 1px solid #fff; }
.about > section, .about > header { margin-bottom: calc(var(--section-gap) * 1.5); }
.about > section:last-child { margin-bottom: 0; }
.about__lead { max-width: 1200px; margin: 0; font: 700 clamp(34px, 5.4vw, 88px)/1 var(--font-body); letter-spacing: -.04em; color: #fff; }
.about__since { margin: 0; color: rgba(255, 255, 255, .55); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.about__studio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.about__portrait { margin: 0; }
.about__portrait img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--placeholder); }
.about__portrait figcaption { margin-top: 10px; color: var(--quiet); font-size: 12px; }
.about__text p { max-width: 560px; margin: 0 0 1em; font-size: 17px; line-height: 1.6; color: #111; }
.about__facts { max-width: 560px; margin-top: 40px; }
.about__h2 { margin: 0 0 32px; color: var(--quiet); font: 400 11px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.about__step-num { display: block; margin-bottom: 28px; color: var(--quiet); font-size: 12px; letter-spacing: .08em; }
.about__contact { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 48px; padding-top: 32px; border-top: 1px solid var(--line); margin-bottom: 0 !important; }
.about__write { margin: 0 0 24px; max-width: 340px; }
.about__email { display: inline-block; font-size: clamp(20px, 2vw, 26px); color: #000; text-decoration: none; border-bottom: 1px solid var(--line); }
.about__phone { display: block; margin-top: 10px; color: #000; text-decoration: none; }
.about__social { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.about__social a, .about__legal a { text-decoration: none; color: var(--quiet); transition: color .2s; }
.about__social a:hover, .about__legal a:hover { color: #000; }
.about__legal { margin: 32px 0 0; color: var(--quiet); font-size: 12px; }
.contact__form-wrap .contact__form { max-width: none; }
.js .reveal-block { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.js .reveal-block.is-in { opacity: 1; transform: none; }

/* Service pages (tpl-service.php) */
.service__head { padding: 56px 0 var(--section-gap); }
.service__title { max-width: 1100px; margin: 0; font: 700 clamp(36px, 6vw, 96px)/.95 var(--font-body); letter-spacing: -.045em; color: #000; }
.service__lead { max-width: 620px; margin: 28px 0 28px; font-size: 19px; line-height: 1.45; color: #222; }
.service__cta { display: inline-block; padding: 15px 24px; border-radius: 999px; background: #000; color: #fff; font: 600 14px/1 var(--font-body); text-decoration: none; }
.service__text > p, .service__text > h2 { margin-left: 0; margin-right: auto; }
.service__text > h2.wp-block-heading { max-width: 680px; margin: 44px 0 12px; font: 700 22px/1.2 var(--font-body); letter-spacing: -.02em; color: #000; }
.service__projects { margin-top: var(--section-gap); }
.about__service-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #000; }
.about__service-list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); color: #000; text-decoration: none; font: 500 clamp(18px, 2vw, 26px)/1.2 var(--font-body); letter-spacing: -.02em; }
.about__service-list a:hover { opacity: .6; }

/* Awards / Press */
.collection { padding-top: 56px; }
.collection__empty { margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 17px; }
div.project-card { cursor: default; }

/* Project page grid: photos sit on the left edge in tile-wide columns, text in the column next to them. */
.single-project .entry { --tile-w: min(calc(var(--photo-h) * 2 / 3), calc((100vw - 2 * var(--gutter) - var(--gap)) / 2)); }
.split__media .wp-block-image { margin: 0; }
.split__text p, .lead-text p { max-width: 680px; margin: 0 0 1em; }
.split__text p:last-child, .lead-text p:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
	.single-project .entry > p, .single-project .entry > .lead-text { max-width: 680px; margin-left: calc(var(--tile-w) + var(--gap)); margin-right: 0; }
	.single-project .entry > .split { display: grid; grid-template-columns: var(--tile-w) minmax(0, 680px); gap: var(--gap); align-items: start; }
	.single-project .entry > .split, .single-project .entry > .lead-text { margin-top: calc(var(--section-gap) - var(--block-gap)); margin-bottom: var(--section-gap); }
	.single-project .split__media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
	.single-project .entry > .wp-block-image:not(:first-child) img { margin-inline: 0; max-width: min(100%, calc(2 * var(--tile-w) + var(--gap))); }
	.single-project .entry .wp-block-gallery.has-nested-images { margin-left: 0; margin-right: 0; justify-content: flex-start; }
}

/* Project photos are centred as one block (two tiles wide); text starts at the second tile. */
@media (min-width: 768px) {
	.single-project .entry { --side: max(0px, calc((100vw - 2 * var(--gutter) - 2 * var(--tile-w) - var(--gap)) / 2)); }
	.single-project .entry > .split, .single-project .entry > .wp-block-gallery, .single-project .entry > .wp-block-image:not(:first-child) { margin-left: var(--side) !important; }
	.single-project .entry > p, .single-project .entry > .lead-text { margin-left: calc(var(--side) + var(--tile-w) + var(--gap)); }
	/* Rows of three or four are wider than the two-tile block: centre them on the page instead. */
	.single-project .entry > .wp-block-gallery.columns-3, .single-project .entry > .wp-block-gallery.columns-4 { margin-left: auto !important; margin-right: auto !important; justify-content: center; }
}

/* Dark pages (Contact) */
.is-dark, .is-dark .site-main { background: #000; color: #fff; }
.is-dark .site-footer { border-color: #222; color: rgba(255, 255, 255, .5); }
.is-dark .site-footer__mail { color: #fff !important; }
.is-dark .site-footer a:hover { color: #fff; }

.contact-page { padding: 56px 0 24px; }
.contact-page__title { max-width: 1100px; margin: 0; font: 700 clamp(40px, 7vw, 120px)/.92 var(--font-body); letter-spacing: -.045em; }
.contact-page__lead { max-width: 560px; margin: 28px 0 0; color: rgba(255, 255, 255, .65); font-size: 17px; line-height: 1.5; }
.contact-page__grid { display: grid; grid-template-columns: minmax(260px, 1fr) 1.5fr; gap: 64px; margin-top: 80px; padding-top: 32px; border-top: 1px solid #222; }
.contact-page__label { margin: 28px 0 8px; color: rgba(255, 255, 255, .62); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.contact-page__label:first-child { margin-top: 0; }
.contact-page__big { color: #fff; font: 500 clamp(20px, 2vw, 28px)/1.2 var(--font-body); letter-spacing: -.01em; text-decoration: none; border-bottom: 1px solid #333; }
.contact-page__big:hover { border-color: #fff; }
.contact-page__text { margin: 0; font-size: 17px; }
.contact-page__social { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 40px 0 0; padding: 0; list-style: none; font-size: 14px; }
.contact-page__social a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.contact-page__social a:hover { color: #fff; }
.is-dark .contact__field span, .is-dark .contact__consent { color: rgba(255, 255, 255, .5); }
.is-dark .contact__field input, .is-dark .contact__field select, .is-dark .contact__field textarea { border-bottom-color: #333; color: #fff; }
.is-dark .contact__field select option { color: #000; }
.is-dark .contact__field :focus { border-bottom-color: #fff; }
.is-dark .contact__consent input { accent-color: #fff; }
.is-dark .contact__consent a { color: #fff; }
.is-dark .contact__submit { background: #fff; color: #000; border-color: #fff; }
.is-dark .contact__submit:hover { background: #000; color: #fff; }
.is-dark .contact__notice { background: #111; color: #fff; }
.is-dark .contact__notice--error { background: #3a1212; }

/* Journal */
.journal { padding: 56px 0 0; }
.journal__title { margin: 0; font: 700 clamp(40px, 7vw, 120px)/.92 var(--font-body); letter-spacing: -.045em; color: #000; }
.journal__lead { max-width: 520px; margin: 24px 0 0; color: var(--quiet); font-size: 17px; }
.journal__empty { margin: 72px 0 0; padding-top: 28px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 17px; }
.journal__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 8px; margin-top: 64px; }
.journal-card { display: flex; flex-direction: column; gap: 8px; color: #000; text-decoration: none; }
.journal-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--placeholder); }
.journal-card__media img { width: 100%; height: 100%; object-fit: cover; }
.journal-card__date { margin-top: 6px; color: var(--quiet); font-size: 12px; }
.journal-card__title { font: 700 20px/1.2 var(--font-body); letter-spacing: -.01em; }
.journal-card__excerpt { color: #444; font-size: 14px; }
.journal__pages ul { display: flex; gap: 16px; margin: 48px 0 0; padding: 0; list-style: none; }
.article__head { max-width: 760px; margin: 0 auto; padding: 56px 0 40px; }
.article__back { color: var(--quiet); font-size: 13px; text-decoration: none; }
.article__title { margin: 24px 0 12px; font: 700 clamp(32px, 4.4vw, 64px)/1 var(--font-body); letter-spacing: -.035em; color: #000; }
.article__date { margin: 0; color: var(--quiet); font-size: 13px; }
.article__cover { margin: 0 0 var(--section-gap); }
.article__cover img { width: 100%; max-height: 88vh; object-fit: cover; }

/* Reveal on scroll (site.js). Hidden only when JS runs; one consistent, quick fade. */
@media (prefers-reduced-motion: no-preference) {
	.js .entry > *, .js .project-card, .js .next-project { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
	.js .entry > .is-in, .js .project-card.is-in, .js .next-project.is-in { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
	:root { --gutter: 16px; --gap: 10px; --block-gap: 10px; --section-gap: 40px; }
	body { font-size: 15px; }
	.site-header { padding: 14px var(--gutter); }
	.site-logo img { width: 66px; }
	.site-header__right { gap: 10px; }
	/* Phones: links move into the full-screen menu behind Menu+. */
	.site-header__right > .site-nav, .site-header__right > .lang-switch { display: none; }
	.menu-toggle { display: inline-flex; }
	.hero__inner { padding: 96px var(--gutter) 22px; }
	.hero__meta { margin-top: 10px; font-size: 13px; }
	.hero__bottom { flex-direction: column; align-items: stretch; gap: 22px; }
	.hero__lead { font-size: 17px; }
	.hero__links { justify-content: space-between; gap: 12px; font-size: 13px; }
	.hero__credit { display: none; }
	.work { padding-top: 40px; }
	.work__head { flex-direction: column; align-items: flex-start; margin-bottom: 18px; }
	.work__filter { gap: 4px 14px; }
	.work__filter button { font-size: 13px; }
	.project-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
	/* Name | type on one line. */
	.project-card__caption { gap: 5px; margin-top: 7px; font-size: 11px; white-space: nowrap; }
	.project-card__name { flex: none; }
	.project-card__type { overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
	.project-card__type:not(:empty)::before { margin-right: 5px; }
	.collection { padding-top: 36px; }

	/* Project page on phones: photo → title + details → lead text → floor plan → the rest. */
	.single-project .entry { display: flex; flex-direction: column; }
	.single-project .entry > * { order: 7; }
	.single-project .entry > .wp-block-image:first-child { order: 1; }
	.single-project .project-head { display: contents; }
	.single-project .project-head__info { order: 2; padding: 24px 0 28px; }
	/* Only the first paragraph goes above the plan; the rest of that text follows it. */
	.single-project .entry > .lead-text, .single-project .entry > .split--lead, .single-project .split--lead > .split__text { display: contents; }
	.single-project .lead-text > p, .single-project .split--lead > .split__text > p { order: 5; margin: 0 0 1em; }
	.single-project .lead-text > p:first-child, .single-project .split--lead > .split__text > p:first-child { order: 3; margin-bottom: 28px; }
	.single-project .project-head__plan { order: 4; margin-bottom: 28px; }
	.single-project .split--lead > .split__media { order: 6; margin: 14px 0 var(--block-gap); }
	.single-project .entry > .split:not(.split--lead) { display: flex; flex-direction: column; margin-top: 30px; }
	.single-project .split:not(.split--lead) > .split__text { order: 1; margin-bottom: 30px; }
	.single-project .split:not(.split--lead) > .split__media { order: 2; }
	.single-project .split__media img { width: 100%; }
	.about__intro { min-height: 0; padding: 40px var(--gutter) 28px; }
	.about__intro-foot { margin-top: 40px; }
	.about__intro-foot { flex-direction: column; align-items: flex-start; gap: 18px; }
	.contact-page { padding-top: 36px; }
	.service__head { padding-top: 32px; }
	.service__lead { font-size: 17px; }
	.contact-page__grid { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }
	.journal { padding-top: 36px; }
	.journal__list { grid-template-columns: 1fr; gap: 40px; }

	.entry > .wp-block-image img, .entry > .wp-block-image:first-child img { width: 100%; max-height: none; }
	.entry .wp-block-gallery.has-nested-images { max-width: none !important; }
	/* Core gallery widths use an ID selector, so these need !important. 3 in a row → one wide + a pair; an odd last photo goes full width. */
	.entry .wp-block-gallery.has-nested-images > figure.wp-block-image { width: calc(50% - var(--gap) / 2) !important; }
	.entry .wp-block-gallery.has-nested-images > figure.wp-block-image:last-child:nth-child(odd):not(:first-child) { width: 100% !important; aspect-ratio: 4 / 5; }
	.entry .wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image:first-child { width: 100% !important; aspect-ratio: 4 / 5; }
	.entry .wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image:nth-child(3):last-child { width: calc(50% - var(--gap) / 2) !important; aspect-ratio: 2 / 3; }

	.project-head { grid-template-columns: 1fr; gap: 28px; padding: 24px 0; }
	.project-head__title { margin-bottom: 20px; }
	.project-meta > div { grid-template-columns: 100px 1fr; }
	.project-head__plan img { max-height: none; width: 100%; margin: 0; }

	.info-layout { grid-template-columns: 1fr; }
	.info-layout .project-intro { display: block; }
	.info-layout .project-intro__card { width: auto; padding: 32px 24px; }

	.contact, .contact__row { grid-template-columns: 1fr; gap: 24px; }
	.about__studio, .about__contact { grid-template-columns: 1fr; }
	.about__studio { gap: 28px; }
		.about__text p { font-size: 16px; }
	.site-footer { flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px var(--gutter) 28px; }
	.site-footer__social { gap: 16px; }
}
