/* Nephis Basic: structure shared by the three looks. Each look sets the tokens in its own file. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--muted) var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body-face); font-size: var(--body-size, 16px); line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--select, rgba(0,0,0,.14)); color: var(--ink); }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }
.visually-hidden, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; z-index: 100; left: 12px; top: 12px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ground); color: var(--ink); }

/* WordPress block resets inside the theme */
.wp-site-blocks { padding: 0; }
.wp-block-image, .wp-block-gallery, .wp-block-post-featured-image { margin: 0; }
.wp-block-image img, .wp-block-post-featured-image img { height: auto; }
.wp-block-image a { display: block; height: 100%; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 0; background: none; color: inherit; padding: 0; font: inherit; }
.wp-block-heading { font-weight: 400; }
.wp-block-group.wrap, .wrap { width: min(100% - 2 * var(--gutter), var(--max, 1240px)); margin-inline: auto; }
.wp-block-query, .wp-block-post-template { margin: 0; padding: 0; list-style: none; }

/* Labels: tracked small capitals */
.label, .label a { font-family: var(--label-face, var(--body-face)); font-size: 11.5px; letter-spacing: var(--label-track, .2em); text-transform: uppercase; font-weight: var(--label-weight, 500); line-height: 1.5; text-decoration: none; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 30; color: var(--header-on-photo, #fff); transition: background-color .35s ease, color .35s ease, box-shadow .35s ease; }
.site-header.is-solid { background: var(--ground); color: var(--ink); box-shadow: 0 1px 0 var(--line-soft); }
.site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; gap: 24px; }
.site-header nav ul { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.site-header nav a { display: inline-block; text-decoration: none; padding-block: 6px; }
.site-header nav a:hover { text-decoration: underline; }
.site-header .nav-right ul { justify-content: flex-end; }
.lang { display: inline-flex; gap: 6px; align-items: center; }
.lang a { text-decoration: none; opacity: .75; }
.lang a[aria-current] { opacity: 1; }
.menu-btn { display: none; }
.admin-bar .site-header { top: 32px; }

/* Pages that do not open on a photograph start under the solid header */
.nb-inner .nb-main { padding-top: var(--header-h, 76px); }

/* Slideshow built from a gallery */
.nb-slides { position: relative; overflow: hidden; display: block !important; }
.nb-slides > .wp-block-image { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; opacity: 0; transition: opacity 1.4s ease; }
.nb-slides > .wp-block-image:first-child { opacity: 1; }
.nb-slides.is-ready > .wp-block-image { opacity: 0; }
.nb-slides.is-ready > .wp-block-image.is-on { opacity: 1; }
.nb-slides > .wp-block-image img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.nb-slides > .wp-block-image.is-on img { animation: nb-push 9s ease-out both; }
@keyframes nb-push { from { transform: scale(1.045); } to { transform: scale(1); } }
.nb-slides figcaption { display: none; }
.arrow { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 40px; }
.arrow svg { width: 44px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1; }
.counter { font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; }

/* Wide and tall versions of one picture */
@media (max-width: 860px) { .nb-only-wide { display: none !important; } }
@media (min-width: 861px) { .nb-only-tall { display: none !important; } }

/* Entry reveal (only after the script marks an element as below the fold) */
.nb-reveal.is-pre { opacity: 0; transform: translate3d(0, 28px, 0); }
.nb-reveal.is-pre.is-in { opacity: 1; transform: none; transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1.2s cubic-bezier(.16,1,.3,1); }
.photo-reveal { overflow: hidden; }
.photo-reveal.is-pre { opacity: 1; transform: none; clip-path: inset(12% 0 0 0); }
.photo-reveal.is-pre img { transform: scale(1.08); }
.photo-reveal.is-pre.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.3s cubic-bezier(.16,1,.3,1); }
.photo-reveal.is-pre.is-in img { transform: none; transition: transform 1.6s cubic-bezier(.16,1,.3,1); }

/* Journal list and article, shared skeleton */
.nb-journal-head { padding-block: clamp(64px, 9vw, 128px) clamp(36px, 5vw, 64px); }
.nb-journal-list { padding-bottom: clamp(80px, 10vw, 140px); }
.nb-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(36px, 5vw, 72px) clamp(20px, 3vw, 44px); }
.nb-posts > li { display: grid; gap: 12px; align-content: start; }
.nb-post-photo { overflow: hidden; }
.nb-post-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.nb-post-photo a:hover img { transform: scale(1.03); }
.nb-post-title a { text-decoration: none; }
.nb-post-excerpt p { font-size: 15px; color: var(--muted); }
.nb-pagination { margin-top: 56px; }
.nb-article-head { padding-block: clamp(64px, 9vw, 120px) clamp(28px, 4vw, 48px); max-width: 920px; }
.nb-article-photo { width: min(100% - 2 * var(--gutter), 1200px); margin: 0 auto clamp(40px, 6vw, 80px) !important; }
.nb-article-photo img { width: 100%; }
.nb-article-body { width: min(100% - 2 * var(--gutter), 680px); margin-inline: auto; font-size: 17px; line-height: 1.8; }
.nb-article-body > * + * { margin-top: 1.1em; }
.nb-article-body .wp-block-image { margin-block: 2em; }
.nb-article-body h2 { font-size: 30px; line-height: 1.2; margin-top: 1.8em; }
.nb-article-back { padding-block: 56px clamp(80px, 10vw, 140px); max-width: 680px; }
.nb-404-inner { padding-block: clamp(96px, 14vw, 200px); text-align: center; }
.nb-404-inner h1 { font-size: clamp(36px, 4vw, 60px); margin-bottom: 16px; }

/* Phone menu panel */
.menu-panel { display: none; }

@media (max-width: 860px) {
  .site-header .bar { grid-template-columns: auto 1fr auto; min-height: 64px; }
  .site-header nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
  .menu-panel { position: fixed; inset: 0; z-index: 25; background: var(--ground); color: var(--ink); padding: 96px var(--gutter) 40px; flex-direction: column; gap: 22px; }
  body.menu-open .menu-panel { display: flex; }
  body.menu-open .site-header { color: var(--ink); background: var(--ground); }
  .menu-panel > a { text-decoration: none; font-size: 26px; font-family: var(--display); }
  .nb-inner .nb-main { padding-top: 64px; }
  .nb-posts { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

@media (prefers-reduced-motion: reduce) {
  .nb-slides > .wp-block-image, .site-header { transition: none; }
  .nb-slides > .wp-block-image.is-on img { animation: none; }
}

/* Shared inner-page fixes */
.steps .steps-title { grid-column: 1 / -1; }
.gallery-grid { grid-auto-flow: dense; }
.wp-block-button__link { white-space: nowrap; }
@media (max-width: 420px) { .wp-block-button__link { padding-inline: 20px !important; } }
