/*
 Theme Name: SIDEA
 Theme URI: https://sideafoundation.org
 Author: SIDEA Foundation
 Description: Block theme for Фондация „СИДЕЯ" (SIDEA Foundation). theme.json plus templates, parts and patterns; no JavaScript build.
 Requires at least: 6.7
 Tested up to: 7.1
 Requires PHP: 8.3
 Version: 0.3.4
 License: GPL-2.0-or-later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Template: wp-kit-base-theme
 Text Domain: sidea
 Tags: full-site-editing, block-patterns, translation-ready
*/

/*
 * Design: "Signal from the coast".
 *
 * The emblem is three circles joined by a line. That line is the site's
 * organising idea: it sits under the mark, marks section edges and returns in
 * the footer. Pink is a signal, not a surface: the mark, the tick that opens a
 * category, links and a single rule. Everything else is paper, ink and
 * generous white.
 *
 * The page is a twelve-column editorial grid. Type carries the personality:
 * an oversized serif display against a quiet system sans. Colour and spacing
 * only ever reference the theme's semantic presets.
 */

:root {
  --sidea-rule: 1px solid var(--wp--preset--color--border);
  --sidea-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sidea-gutter: clamp(1.25rem, 4vw, 3.5rem);
  --sidea-measure: 62ch;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.026'/%3E%3C/svg%3E");
}

::selection {
  background: var(--wp--preset--color--brand-dark);
  color: var(--wp--preset--color--paper);
}

.wp-site-blocks {
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.sidea-translatable-content p,
.sidea-page p {
  max-width: var(--sidea-measure);
}

.sidea-translatable-content a,
.sidea-page a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

.wp-block-post-featured-image {
  margin: 0;
}

.wp-block-post-featured-image img {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- primitives */

/* Uppercase micro-label with the emblem's first dot. */
.sidea-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidea-eyebrow::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--wp--preset--color--brand);
}

.wp-element-button {
  transition:
    transform 0.2s var(--sidea-ease),
    background-color 0.2s var(--sidea-ease),
    box-shadow 0.2s var(--sidea-ease);
}

@media (hover: hover) {
  .wp-element-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--wp--preset--color--brand) 22%, transparent);
  }
}

.wp-element-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ------------------------------------------------------------------- header */

.sidea-header {
  position: relative;
  z-index: 5;
  border-bottom: var(--sidea-rule);
  background: var(--wp--preset--color--paper);
}

.sidea-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--wp--preset--color--brand);
}

.sidea-header .sidea-mark--wordmark {
  height: clamp(1.6rem, 2.4vw, 2.15rem);
}

.sidea-site-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem clamp(0.85rem, 1.8vw, 1.5rem);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sidea-site-navigation a {
  position: relative;
  display: inline-block;
  padding-block: 0.2rem;
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.sidea-site-navigation a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--wp--preset--color--brand);
  transition: right 0.25s var(--sidea-ease);
}

.sidea-site-navigation a:focus-visible::after {
  right: 0;
}

.sidea-site-navigation a:focus-visible {
  color: var(--wp--preset--color--ink);
}

@media (hover: hover) {
  .sidea-site-navigation a:hover::after {
    right: 0;
  }

  .sidea-site-navigation a:hover {
    color: var(--wp--preset--color--ink);
  }
}

.sidea-locale-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding-inline: 0.5rem;
  border: var(--sidea-rule);
  border-radius: 2px;
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    border-color 0.2s var(--sidea-ease),
    color 0.2s var(--sidea-ease);
}

.sidea-locale-switcher:focus-visible {
  border-color: var(--wp--preset--color--brand-dark);
  color: var(--wp--preset--color--brand-dark);
}

@media (hover: hover) {
  .sidea-locale-switcher:hover {
    border-color: var(--wp--preset--color--brand-dark);
    color: var(--wp--preset--color--brand-dark);
  }
}

/* --------------------------------------------------------------------- hero */

.sidea-hero {
  position: relative;
  overflow: hidden;
}

/* An oversized, cropped emblem ring: the mark at architectural scale. */
.sidea-hero::after {
  content: "";
  position: absolute;
  top: -32%;
  right: -12%;
  width: min(48rem, 62vw);
  aspect-ratio: 1;
  border: 1px solid var(--wp--preset--color--brand);
  border-radius: 50%;
  opacity: 0.16;
  pointer-events: none;
}

.sidea-hero__grid {
  position: relative;
  align-items: end;
}

.sidea-hero__grid > *,
.sidea-about-teaser__grid > *,
.sidea-radar__grid > *,
.sidea-page-about__grid > *,
.sidea-cta__grid > *,
.sidea-footer__inner > *,
.sidea-project > *,
.sidea-card > * {
  max-width: none;
  margin-inline: 0;
}

/* These containers space their children with `gap`; core's flow margins would
   stack on top of it and break the alignment between a row's image and text. */
.sidea-hero__grid > * + *,
.sidea-about-teaser__grid > * + *,
.sidea-radar__grid > * + *,
.sidea-page-about__grid > * + *,
.sidea-cta__grid > * + *,
.sidea-footer__inner > * + *,
.sidea-project > * + *,
.sidea-card > * + * {
  margin-block-start: 0;
}

.sidea-hero__mark {
  position: relative;
  padding-bottom: clamp(2.75rem, 5vw, 4rem);
}

.sidea-hero__mark .sidea-mark--full {
  width: min(100%, 32rem);
  height: auto;
  max-width: 100%;
}

.sidea-hero__lead {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.sidea-hero__lead p {
  max-width: 22ch;
  margin: 0;
}

/* The lead is the page's opening sentence, so its display type belongs to the
   paragraph. A heading added there by mistake stays a normal heading instead
   of becoming a second hero headline. */
.sidea-hero__lead h1,
.sidea-hero__lead h2,
.sidea-hero__lead h3 {
  font-size: var(--wp--preset--font-size--large);
  letter-spacing: 0;
  line-height: 1.2;
}

.sidea-hero__body .wp-block-buttons {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* The emblem's signal: three dots joined by a rule, under the mark. */
.sidea-signal {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(14rem, 60%);
  height: 1.5rem;
  margin: 0;
  border: 0;
  background: none;
}

.sidea-signal::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--wp--preset--color--brand);
}

.sidea-signal::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--wp--preset--color--brand);
  box-shadow:
    1.55rem 0 0 var(--wp--preset--color--brand),
    3.1rem 0 0 var(--wp--preset--color--brand);
  transform: translateY(-50%);
}

.sidea-hero__meta {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1rem;
  border-top: var(--sidea-rule);
}

.sidea-hero__meta-item {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- projects */

.sidea-projects {
  border-top: var(--sidea-rule);
}

.sidea-projects__head {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  border-bottom: var(--sidea-rule);
}

.sidea-projects__head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

/* Category groups open with a prominent heading above their description and rows. */
.sidea-projects__group + .sidea-projects__group {
  margin-top: clamp(6rem, 12vw, 10rem);
}

.sidea-projects__group-heading {
  margin: clamp(3rem, 7vw, 4rem) 0 0;
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--serif);
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  text-transform: uppercase;
}

.sidea-projects__description {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.6;
}

/* Rows separate by space alone, on the listing and on the home teaser alike:
   the padding is the separator, and no rule draws the boundary between two
   Projects. */
.sidea-project {
  align-items: start;
  padding-block: clamp(2.5rem, 4.5vw, 3.75rem);
}

.sidea-project__media {
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}

.sidea-project__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--sidea-ease);
}

@media (hover: hover) {
  .sidea-project:hover .sidea-project__media img {
    transform: scale(1.03);
  }
}

/* Every other project mirrors its row. A block layout attribute cannot say
   "alternate", so this one rule stays in CSS — and only above the tablet
   breakpoint, where the blocks themselves place both columns side by side.
   Below it, the blocks stack the row and this rule would put the body in a
   narrower column than the image. */
@media (min-width: 901px) {
  .sidea-projects__list .wp-block-post:nth-child(even) .sidea-project__media,
  .sidea-projects__list .wp-block-post:nth-child(even) .sidea-project__body {
    /* Same row: the body comes second in the document but first in the
       layout, so grid's auto-placement would otherwise push it down a row. */
    grid-row: 1;
  }

  .sidea-projects__list .wp-block-post:nth-child(even) .sidea-project__media {
    grid-column: 7 / -1;
  }

  .sidea-projects__list .wp-block-post:nth-child(even) .sidea-project__body {
    grid-column: 1 / span 5;
  }
}

.sidea-project__body :is(h2, h3) {
  margin: 0;
  font-size: var(--wp--preset--font-size--large);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.sidea-project__body :is(h2, h3) a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.sidea-project__body :is(h2, h3) a::after {
  content: "\2192";
  margin-left: 0.22em;
  color: var(--wp--preset--color--brand);
  font-size: 0.8em;
  vertical-align: 0.02em;
}

.sidea-project__body :is(h2, h3) a:focus-visible {
  color: var(--wp--preset--color--brand);
}

@media (hover: hover) {
  .sidea-project__body :is(h2, h3) a:hover {
    color: var(--wp--preset--color--brand);
  }
}

.sidea-project__summary {
  max-width: 46ch;
}

.sidea-project__summary p {
  margin: 0;
  color: var(--wp--preset--color--muted);
}

/* ------------------------------------------------------------- about teaser */

.sidea-about-teaser {
  border-top: var(--sidea-rule);
}

.sidea-projects-teaser {
  border-top: var(--sidea-rule);
}

.sidea-about-teaser__grid,
.sidea-projects-teaser__grid {
  align-items: end;
}

.sidea-projects-teaser__grid {
  row-gap: clamp(2rem, 4vw, 3.5rem);
  align-items: end;
}

.sidea-projects-teaser__media {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

.sidea-projects-teaser__media img {
  display: block;
  width: 100%;
  height: clamp(18rem, 34vw, 32rem);
  object-fit: cover;
  object-position: center 48%;
}

.sidea-about-teaser__statement h2,
.sidea-projects-teaser__statement h2 {
  margin: 1.25rem 0 0;
  max-width: 15ch;
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.sidea-about-teaser__line,
.sidea-projects-teaser__line {
  max-width: 34ch;
  margin: 1.5rem 0 0;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.4;
}

.sidea-about-teaser__link,
.sidea-projects-teaser__link {
  justify-self: end;
  margin: 0;
  white-space: nowrap;
}

.sidea-about-teaser__link p,
.sidea-projects-teaser__link p {
  margin: 0;
}

.sidea-about-teaser__link a,
.sidea-projects-teaser__link a {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--wp--preset--color--brand);
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s var(--sidea-ease);
}

.sidea-about-teaser__link a:focus-visible,
.sidea-projects-teaser__link a:focus-visible {
  color: var(--wp--preset--color--brand);
}

@media (hover: hover) {
  .sidea-about-teaser__link a:hover,
  .sidea-projects-teaser__link a:hover {
    color: var(--wp--preset--color--brand);
  }
}

/* ----------------------------------------------------------------- partners */

.sidea-partners-strip {
  border-top: var(--sidea-rule);
}

.sidea-partners-strip__head {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.sidea-partners-strip__head p {
  margin: 0;
}

.sidea-partners-strip__head h2 {
  margin: 1.25rem 0 0;
  max-width: 15ch;
  font-size: clamp(2.25rem, 5vw, 4.75rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.sidea-partners-strip__head .sidea-partners-strip__link {
  flex: none;
  align-self: end;
  margin-left: auto;
  white-space: nowrap;
}

.sidea-partners-strip__head a {
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.sidea-partners-strip__head a:focus-visible {
  color: var(--wp--preset--color--brand-dark);
}

@media (hover: hover) {
  .sidea-partners-strip__head a:hover {
    color: var(--wp--preset--color--brand-dark);
  }
}

.sidea-partners-strip .wp-block-post > .wp-block-group {
  min-height: clamp(5.5rem, 9vw, 7.5rem);
  padding: clamp(1rem, 2vw, 1.5rem);
  border: var(--sidea-rule);
  background: var(--wp--preset--color--paper);
}

/* The logo carries the visual weight; the name is the caption. */
.sidea-partners-strip .wp-block-group.screen-reader-text {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: normal;
}

.sidea-partners-strip .wp-block-post-featured-image {
  width: 100%;
}

.sidea-partners-strip .wp-block-post-featured-image img {
  width: 100%;
  height: clamp(2.5rem, 4vw, 3.5rem);
  filter: grayscale(1);
  opacity: 0.7;
  transition:
    filter 0.3s var(--sidea-ease),
    opacity 0.3s var(--sidea-ease);
}

@media (hover: hover) {
  .sidea-partners-strip .wp-block-post:hover img {
    filter: none;
    opacity: 1;
  }
}

/* -------------------------------------------------------------------- RADAR */

.sidea-radar {
  position: relative;
  overflow: hidden;
}

/* One oversized ring, cut by the band edge: the emblem at architectural scale. */
.sidea-radar::before {
  content: "";
  position: absolute;
  top: -55%;
  right: -12%;
  width: min(52rem, 70vw);
  aspect-ratio: 1;
  border: 1px solid var(--wp--preset--color--brand);
  border-radius: 50%;
  opacity: 0.32;
  pointer-events: none;
}

.sidea-radar::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: -30%;
  width: min(22rem, 30vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--wp--preset--color--brand);
  opacity: 0.12;
  pointer-events: none;
}

.sidea-radar__grid {
  position: relative;
  align-items: end;
}

/* The grey micro-label needs more weight than `muted` holds on the tinted
   band: #737373 on #FFE6F0 measures 4.03:1, below the 4.5:1 body-text floor. */
.sidea-radar .sidea-eyebrow {
  color: var(--wp--preset--color--brand-dark);
}

.sidea-radar__body h2 {
  margin: 1.25rem 0 1.25rem;
  font-size: clamp(3.25rem, 8vw, 7rem);
  letter-spacing: -0.045em;
  line-height: 0.86;
}

.sidea-radar__body p {
  max-width: 42ch;
  margin: 0;
}

.sidea-radar__cta {
  justify-self: end;
}

/* ---------------------------------------------------------------------- CTA */

.sidea-cta {
  position: relative;
  overflow: hidden;
}

.sidea-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--wp--preset--color--brand);
}

.sidea-cta::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -55%;
  width: min(34rem, 45vw);
  aspect-ratio: 1;
  border: 1px solid var(--wp--preset--color--brand);
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
}

.sidea-cta__grid {
  position: relative;
  align-items: end;
}

.sidea-cta h2 {
  max-width: 14ch;
  margin: 0;
  color: var(--wp--preset--color--paper);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.sidea-cta__buttons {
  justify-self: end;
}

.sidea-cta .wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid var(--wp--preset--color--paper);
  background: transparent;
  /* The 1px border sits on top of the theme's button padding, so take it back
     out to keep both buttons on the same baseline and height. */
  padding: calc(0.85rem - 1px) calc(1.6rem - 1px);
  color: var(--wp--preset--color--paper);
}

@media (hover: hover) {
  .sidea-cta .wp-block-button.is-style-outline .wp-block-button__link:hover {
    border-color: var(--wp--preset--color--brand);
    color: var(--wp--preset--color--brand);
  }
}

/* ------------------------------------------------------------------ listings */

.sidea-listing--team .wp-block-post-template,
.sidea-listing--partners .wp-block-post-template,
.sidea-projects__list .wp-block-post-template {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The grid gap owns the rhythm; core's flow-list margins would offset items. */
.sidea-listing .wp-block-post-template > li + li,
.sidea-projects__list .wp-block-post-template > li + li {
  margin-block-start: 0;
}

.sidea-card__media {
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}

.sidea-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--sidea-ease);
}

@media (hover: hover) {
  .sidea-card:hover .sidea-card__media img {
    transform: scale(1.025);
  }
}

.sidea-card__body :is(h2, h3) {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.sidea-card__body :is(h2, h3) a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

.sidea-card__body :is(h2, h3) a:focus-visible {
  color: var(--wp--preset--color--brand);
}

@media (hover: hover) {
  .sidea-card__body :is(h2, h3) a:hover {
    color: var(--wp--preset--color--brand);
  }
}

.sidea-listing--team .sidea-card__body :is(h2, h3) {
  font-size: clamp(1.25rem, 1.9vw, 1.75rem);
  line-height: 1.1;
}

.sidea-card__meta {
  margin-top: 0.35rem;
}

.sidea-card__meta p {
  margin: 0;
}

/* The Bio reads as prose under the role. An empty Bio renders no block at all,
   so a member without one leaves no gap. */
.sidea-listing--team .sidea-card__body .sidea-translatable-content {
  margin-top: 0.75rem;
}

/* Team: portrait-led. Partners: a quiet wall of logos. */
.sidea-listing--team .sidea-card__media img {
  aspect-ratio: 1;
}

.sidea-listing--partners .sidea-card__media {
  padding: clamp(1.5rem, 4vw, 3rem);
}

.sidea-listing--partners .sidea-card__media img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
}

@media (hover: hover) {
  .sidea-listing--partners .sidea-card:hover img {
    filter: none;
    opacity: 1;
  }
}

.sidea-listing--partners .sidea-card__body :is(h2, h3) {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.15;
}

.sidea-listing--partners .sidea-card__body :is(h2, h3) a::after {
  content: "\2197";
  margin-left: 0.18em;
  color: var(--wp--preset--color--brand);
  font-size: 0.7em;
  vertical-align: super;
}

/* -------------------------------------------------------------------- pages */

/* The inner column is already the wide measure; children should fill it. */
.sidea-page__inner .alignwide {
  max-width: none;
  margin-inline: 0;
}

.sidea-page__head,
.sidea-page-about__head {
  position: relative;
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.sidea-page__head::before,
.sidea-page-about__head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 4rem;
  height: 3px;
  background: var(--wp--preset--color--brand);
}

.sidea-page__head h1,
.sidea-page-about__head h1 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.sidea-page__content {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.sidea-page-about__content {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: var(--sidea-rule);
}

.sidea-page-about__content p {
  max-width: 64ch;
  margin-top: 0;
}

/* Each section heading opens a new section, so it gets more room above than
   the paragraph it follows. The first one sits at the top rule. */
.sidea-page-about__content h2 {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}

.sidea-page-about__content h2:first-of-type {
  margin-top: 0;
}

/* ------------------------------------------------------------- project page */

.sidea-project-page__grid > * {
  max-width: none;
  margin-inline: 0;
}

.sidea-project-page__grid > * + * {
  margin-block-start: 0;
}

.sidea-project-page__head {
  position: relative;
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.sidea-project-page__head::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 4rem;
  height: 3px;
  background: var(--wp--preset--color--brand);
}

.sidea-project-page__head > * {
  margin-block: 0;
}

.sidea-project-page__head > * + * {
  margin-block-start: clamp(1rem, 2vw, 1.5rem);
}

.sidea-project-page__category {
  margin: 0;
}

.sidea-project-page__head h1 {
  max-width: 24ch;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.sidea-project-page__lead p {
  max-width: 46ch;
  margin: 0;
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.sidea-project-page__lead:not(:has(.sidea-translatable-field)) {
  display: none;
}

.sidea-project-page__media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.sidea-project-page__media:not(:has(img)) {
  display: none;
}

.sidea-project-page__body {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: var(--sidea-rule);
}

.sidea-project-page__body:not(:has(.sidea-translatable-content)) {
  display: none;
}

.sidea-project-page__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: var(--sidea-rule);
}

.sidea-project-page__external,
.sidea-project-page__back {
  font-weight: 600;
  text-decoration: none;
}

.sidea-project-page__external {
  color: var(--wp--preset--color--ink);
}

.sidea-project-page__external::after {
  content: "\2197";
  margin-left: 0.25em;
  color: var(--wp--preset--color--brand);
  font-size: 0.8em;
  vertical-align: super;
}

.sidea-project-page__back {
  color: var(--wp--preset--color--muted);
}

.sidea-project-page__back::before {
  content: "\2190";
  margin-right: 0.35em;
  color: var(--wp--preset--color--brand);
}

@media (hover: hover) {
  .sidea-project-page__external:hover,
  .sidea-project-page__back:hover {
    color: var(--wp--preset--color--brand-dark);
  }
}

.sidea-contact__band {
  position: relative;
}

/* The band is wide; the reading column starts at its left edge. */
.sidea-contact__band > * {
  max-width: 38rem;
  margin-inline: 0;
}

.sidea-contact__band::after {
  content: "";
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--wp--preset--color--brand);
  box-shadow:
    1.55rem 0 0 var(--wp--preset--color--brand),
    3.1rem 0 0 var(--wp--preset--color--brand);
}

.sidea-contact__band h1 {
  max-width: 16ch;
  margin-top: 0;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  letter-spacing: -0.035em;
  line-height: 0.94;
}

/* ------------------------------------------------------------------- footer */

.sidea-footer {
  position: relative;
  border-top: var(--sidea-rule);
}

.sidea-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 6rem;
  height: 3px;
  background: var(--wp--preset--color--brand);
}

.sidea-footer__brand {
  align-items: flex-start;
}

.sidea-footer .sidea-mark--wordmark {
  height: clamp(2.5rem, 5vw, 4rem);
}



.sidea-footer .sidea-site-navigation {
  justify-content: flex-start;
}

.sidea-footer__nav .wp-block-group.is-layout-flex {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.sidea-footer .sidea-site-navigation a::after {
  display: none;
}

.sidea-footer .sidea-site-navigation a:focus-visible {
  color: var(--wp--preset--color--brand-dark);
}

@media (hover: hover) {
  .sidea-footer .sidea-site-navigation a:hover {
    color: var(--wp--preset--color--brand-dark);
  }
}

/* ------------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .sidea-hero__mark {
    animation: sidea-rise 0.8s var(--sidea-ease) both;
  }

  .sidea-hero__body {
    animation: sidea-rise 0.8s 0.12s var(--sidea-ease) both;
  }

  .sidea-signal::before {
    transform-origin: left;
    animation: sidea-draw 0.9s 0.35s var(--sidea-ease) both;
  }
}

@keyframes sidea-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sidea-draw {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  /* Let the wordmark, locale switcher and navigation reflow as header rows. */
  .sidea-header .sidea-header__inner .sidea-header__actions {
    display: contents;
  }

  .sidea-header .sidea-locale-switcher {
    order: 2;
  }

  .sidea-header .sidea-site-navigation {
    order: 3;
    flex-basis: 100%;
    padding-top: 0.85rem;
    border-top: var(--sidea-rule);
  }

  .sidea-hero::after {
    top: -18%;
    right: -30%;
    width: 30rem;
  }

  .sidea-hero__mark {
    padding-bottom: 2.75rem;
  }

  .sidea-hero__lead p {
    max-width: 24ch;
  }

  /* Stacked, the right-hand calls to action sit at the left edge again. */
  .sidea-about-teaser__link,
  .sidea-radar__cta,
  .sidea-cta__buttons {
    justify-self: start;
  }

  .sidea-contact__band::after {
    display: none;
  }

  /* Every column span collapses to the full row at this breakpoint, so the
     column gap is invisible — but it still sizes the tracks. The emitted
     12-column grids use a section-sized `blockGap` (30–50px), and eleven of
     those gaps are wider than the container on a phone: the tracks resolve to
     0 and each full-row child grows to the gap total, overflowing the page.
     Drop the column gap and keep the block gap for the stacked rhythm. */
  .wp-block-group.sidea-hero__grid,
  .wp-block-group.sidea-about-teaser__grid,
  .wp-block-group.sidea-radar__grid,
  .wp-block-group.sidea-page-about__grid,
  .wp-block-group.sidea-project-page__grid,
  .wp-block-group.sidea-cta__grid,
  .wp-block-group.sidea-footer__inner,
  .wp-block-group.sidea-project {
    column-gap: 0;
  }
}

@media (max-width: 600px) {
  /* Two tidy rows of links instead of a five-plus-one wrap. */
  .sidea-header .sidea-site-navigation {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 0.55rem 1.5rem;
  }

  .sidea-hero__meta {
    justify-content: flex-start;
  }
}

/* Reduced motion: the Base theme stops animation and transition; the Site
   only resets its own smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* The wordmark scales by height, so it stays compact wherever it is used. */
.sidea-mark {
  display: block;
  width: auto;
  height: auto;
}

.sidea-mark--wordmark {
  width: auto;
  height: clamp(1.75rem, 2.5vw, 2.25rem);
}
