/* =========================================================
   STUDIO AVELIN – SUBPAGE BASE
   Shared shell (tokens, header, footer, typography) for every
   page that is NOT the front page. home.css stays front-page only.
   ========================================================= */

.sa-page,
.sa-front-header,
.sa-front-footer {
  --sa-front-bg: #F2F2F2;
  --sa-front-ink: #151922;
  --sa-front-muted: rgba(21, 25, 34, 0.66);
  --sa-front-soft: rgba(21, 25, 34, 0.08);
  --sa-front-line: rgba(21, 25, 34, 0.14);
  --sa-front-card: #FAFAFA;
  --sa-front-lime: #C7F000;
  background: var(--sa-front-bg);
  color: var(--sa-front-ink);
  font-family: var(--sa-font-secondary, "Raleway", sans-serif);
}

.sa-subpage {
  --sa-shell: 1400px;
  --sa-pad: 1.5rem;
}

@media (min-width: 768px) {
  .sa-subpage {
    --sa-pad: 3rem;
  }
}

@media (min-width: 1280px) {
  .sa-subpage {
    --sa-pad: 5rem;
  }
}

body:has(.sa-page) .wp-site-blocks > header:not(.sa-front-header),
body:has(.sa-page) .wp-site-blocks > .wp-block-template-part:first-child:not(.sa-front-header),
body:has(.sa-page) .wp-site-blocks > footer:not(.sa-front-footer) {
  display: none;
}

.sa-page *,
.sa-page *::before,
.sa-page *::after,
.sa-front-header *,
.sa-front-footer *,
.sa-front-footer *::before,
.sa-front-footer *::after {
  box-sizing: border-box;
}

.sa-page a,
.sa-front-header a,
.sa-front-footer a {
  color: inherit;
  text-decoration: none;
}

.sa-page a:focus-visible,
.sa-front-header a:focus-visible,
.sa-front-footer a:focus-visible {
  outline: 2px solid var(--sa-front-lime);
  outline-offset: 4px;
}

.sa-page h1,
.sa-page h2,
.sa-page h3,
.sa-page h4,
.sa-page p {
  color: inherit;
  margin: 0;
}

.sa-page h1,
.sa-page h2,
.sa-page h3,
.sa-page h4,
.sa-front-header,
.sa-front-eyebrow,
.sa-front-kicker,
.sa-front-button,
.sa-front-link,
.sa-status {
  font-family: var(--sa-font-primary, "Poppins", sans-serif);
}

.sa-page h1 {
  font-size: 2.55rem;
  font-weight: 300;
  line-height: 1.05;
}

.sa-page h2 {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.1;
}

.sa-page h3 {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.16;
}

.sa-page p {
  font-size: 0.95rem;
  line-height: 1.75;
}

.sa-page img,
.sa-page svg {
  display: block;
  max-width: 100%;
}

.sa-page {
  min-height: 60vh;
  overflow-x: hidden;
}

/* Keep the accessibility shortcut off-canvas until it receives keyboard focus. */
.sa-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--sa-front-ink, #151922);
  color: #fff;
  font-family: var(--sa-font-display, "Poppins", sans-serif);
  font-size: 0.8rem;
}

.sa-skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Header ---------- */

.sa-front-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 90px;
  background-color: #F2F2F2 !important;
  border-bottom: 1px solid rgba(21, 25, 34, 0.12);
  display: flex;
  align-items: center;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.admin-bar .sa-front-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .sa-front-header {
    top: 46px;
  }
}

.sa-front-header__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

@media (min-width: 1024px) {
  .sa-front-header__inner {
    padding: 0 4rem;
  }
}

/* Brand & Custom A/ Monogram Logo */
.sa-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #151922;
  background: none !important;
}

.sa-brand__mark {
  flex-shrink: 0;
  display: block;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.sa-brand__mark span {
  color: #C7F000;
}

.sa-brand__name {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #151922;
  letter-spacing: -0.01em;
  line-height: 1;
}

.sa-brand::after,
.sa-front-brand::after {
  display: none !important;
}

/* Desktop Navigation */
.sa-front-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.sa-front-nav__list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem 0;
}

.sa-front-nav__item {
  position: relative;
  margin: 0;
  padding: 0;
}

.sa-language-switch,
.sa-mobile-menu__language {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.sa-language-switch {
  margin-left: 0.5rem;
}

.sa-language-switch__link {
  color: rgba(21, 25, 34, 0.48);
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease;
}

.sa-language-switch__link:hover,
.sa-language-switch__link.is-active {
  color: #151922;
}

.sa-language-switch__link.is-active {
  text-decoration: underline;
  text-decoration-color: #C7F000;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3rem;
}

.sa-front-nav__link {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #151922;
  text-decoration: none;
  text-shadow: 0 0 0 transparent;
  transition: text-shadow 220ms ease;
  white-space: nowrap;
  display: block;
  background-image: none !important;
}

.sa-front-nav__link:hover,
.sa-front-nav__link.is-active {
  color: #151922;
  font-weight: 500;
  text-shadow: 0.25px 0 0 currentColor, -0.25px 0 0 currentColor;
}

/* Baseline & Sliding Lime Segment */
.sa-nav-baseline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: rgba(21, 25, 34, 0.14);
  pointer-events: none;
}

.sa-nav-baseline__indicator {
  position: absolute;
  top: -1px;
  height: 2px;
  background-color: #C7F000;
  left: 0;
  width: 1px;
  opacity: 0;
  transform-origin: left center;
  will-change: transform, opacity;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .sa-nav-baseline__indicator {
    transition: none !important;
  }
}

/* Mobile Toggle */
.sa-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #151922;
  cursor: pointer;
  padding: 0.5rem 0;
}

@media (max-width: 899px) {
  .sa-front-nav {
    display: none !important;
  }
  .sa-nav-toggle {
    display: flex;
    align-items: center;
  }
}

/* Mobile Dropdown Panel */
.sa-mobile-menu {
  display: none;
  position: fixed;
  top: 90px;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #F2F2F2;
  padding: clamp(2rem, 7vh, 4.5rem) 2rem 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 999;
}

body.admin-bar .sa-mobile-menu {
  top: 122px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .sa-mobile-menu {
    top: 136px;
  }
}

.sa-mobile-menu.is-open {
  display: block;
}

html.sa-menu-open,
body.sa-menu-open {
  overflow: hidden;
}

.sa-mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vh, 2.25rem);
}

.sa-mobile-menu__link {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: #151922;
  text-decoration: none;
  display: inline-block;
  position: relative;
  transition: color 200ms ease;
  width: fit-content;
}

.sa-mobile-menu__link.is-active {
  font-weight: 600;
  border-bottom: 2px solid #C7F000;
  padding-bottom: 0.25rem;
}

.sa-mobile-menu__language {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

/* ---------- Shared page primitives ---------- */

.sa-page__inner {
  width: min(calc(100% - 3rem), 1400px);
  margin-right: auto;
  margin-left: auto;
}

.sa-front-grid {
  background-image:
    linear-gradient(to right, rgba(21, 25, 34, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 25, 34, 0.06) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 48px 48px;
}

.sa-page-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--sa-front-line);
}

.sa-page-head > .sa-front-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
}

.sa-page-head__inner {
  position: relative;
  z-index: 1;
  padding-top: 4.5rem;
  padding-bottom: 4rem;
}

.sa-page-head h1 {
  max-width: 16ch;
  margin-top: 1.6rem;
}

.sa-page-head__lead {
  max-width: 34rem;
  margin-top: 1.75rem !important;
  color: var(--sa-front-muted);
  font-size: 1rem;
}

.sa-front-eyebrow,
.sa-front-kicker,
.sa-status,
.sa-meta,
.sa-front-footer nav p,
.sa-front-footer__brand span {
  color: var(--sa-front-muted);
  font-family: var(--sa-font-primary, "Poppins", sans-serif);
  font-size: 0.68rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0 !important;
}

.sa-front-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.sa-front-eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--sa-front-lime);
}

.sa-front-eyebrow--line::before {
  width: 2.5rem;
  height: 1px;
  border-radius: 0;
  background: rgba(21, 25, 34, 0.5);
}

.sa-front-highlight {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.sa-front-highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.09em;
  z-index: -1;
  height: 0.24em;
  background: var(--sa-front-lime);
}

.sa-front-button,
.sa-front-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.sa-page .sa-front-button {
  min-height: 3rem;
  border-radius: 0;
  padding: 0 1.5rem;
  background: var(--sa-front-lime);
  color: var(--sa-front-ink);
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1),
    background-color 300ms ease, box-shadow 400ms ease;
}

.sa-page .sa-front-button:hover,
.sa-page .sa-front-button:focus-visible {
  background: #D2FF00;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(21, 25, 34, 0.5);
}

.sa-front-button span,
.sa-front-link span {
  display: inline-block;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sa-front-button:hover span,
.sa-front-link:hover span {
  transform: translateX(6px);
}

.sa-front-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
}

.sa-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--sa-front-line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--sa-front-ink);
}

.sa-status::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--sa-front-lime);
}

.sa-page-section > .sa-page__inner {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.sa-page-section + .sa-page-section {
  border-top: 1px solid var(--sa-front-line);
}

/* ---------- Project notes ---------- */

.sa-subpage .sa-project-body {
  max-width: 48rem;
}

.sa-subpage .sa-project-body > p {
  color: var(--sa-front-ink);
  font-size: 1.05rem;
  line-height: 1.75;
}

.sa-subpage .sa-project-body > p + p {
  margin-top: 1.25rem;
}

.sa-subpage .sa-detail-list {
  display: grid;
  margin: 3rem 0 0;
  padding: 0;
  border-top: 1px solid var(--sa-front-line);
  list-style: none;
}

.sa-subpage .sa-detail-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 0.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--sa-front-line);
  font-size: 0.95rem;
  line-height: 1.55;
}

.sa-subpage .sa-detail-label {
  color: var(--sa-front-muted);
  font-family: var(--sa-font-primary, "Poppins", sans-serif);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sa-subpage .sa-page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sa-front-line);
}

.sa-subpage .sa-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 767px) {
  .sa-subpage .sa-project-body > p {
    font-size: 1rem;
  }

  .sa-subpage .sa-detail-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .sa-subpage .sa-page-foot {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 3rem;
  }
}

/* ---------- Footer ---------- */

.sa-front-footer {
  border-top: 1px solid rgba(21, 25, 34, 0.14);
  background-color: #F2F2F2 !important;
  color: #151922;
  padding: 5rem 0 3rem;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
}

.sa-footer-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (min-width: 1024px) {
  .sa-footer-container {
    padding: 0 4rem;
  }
}

/* Spacious 2-Part Main Area */
.sa-footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  margin-bottom: 4.5rem;
}

@media (min-width: 1024px) {
  .sa-footer-main {
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
    gap: 4rem;
    align-items: start;
  }
}

/* Left Side: Brand & Large Statement */
.sa-footer-left {
  display: flex;
  flex-direction: column;
}

.sa-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.sa-footer-brand .sa-brand__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #C7F000;
  display: inline-block;
  flex-shrink: 0;
}

.sa-footer-brand-name {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: #151922;
  letter-spacing: -0.01em;
}

.sa-footer-statement {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.25em;
  white-space: nowrap;
}

.sa-stmt-dark {
  color: #151922;
  display: block;
}

.sa-stmt-outline {
  display: block;
  color: #A8CC00;
}

/* Right Side: Three Navigation Columns */
.sa-footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}

@media (min-width: 640px) {
  .sa-footer-nav-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.sa-footer-col {
  display: flex;
  flex-direction: column;
}

.sa-footer-col-label {
  display: block;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6F7174;
  margin-bottom: 1.25rem;
}

.sa-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sa-footer-links a {
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #151922;
  text-decoration: none;
  transition: color 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
}

.sa-footer-links a:hover {
  color: #C7F000;
}

/* Divider & Lime Segment Signature */
.sa-footer-divider-wrap {
  width: 100%;
  margin-bottom: 2.25rem;
}

.sa-footer-divider {
  position: relative;
  width: 100%;
  height: 1px;
  background-color: rgba(21, 25, 34, 0.14);
}

.sa-footer-lime-segment {
  position: absolute;
  top: -0.5px;
  left: 0;
  height: 2px;
  width: 45px;
  background-color: #C7F000;
  transition: width 300ms ease;
}

.sa-front-footer:hover .sa-footer-lime-segment {
  width: 75px;
}

/* Bottom Area: Three-Part Balanced Row */
.sa-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: var(--sa-font-display, "Geist", "Inter", sans-serif);
  font-size: 0.8125rem;
  color: #6F7174;
}

@media (min-width: 768px) {
  .sa-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.sa-footer-bottom-left {
  color: #6F7174;
}

.sa-footer-bottom-center {
  color: #6F7174;
  letter-spacing: 0.02em;
}

.sa-footer-bottom-right a {
  color: #151922;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sa-footer-bottom-right a:hover {
  color: #C7F000;
}

@media (min-width: 640px) {
  .sa-page h1 {
    font-size: 3.4rem;
  }
}

@media (min-width: 760px) {
  .sa-front-header__inner,
  .sa-page__inner,
  .sa-front-footer__inner,
  .sa-front-footer__bottom {
    width: min(calc(100% - 6rem), 1400px);
  }

  .sa-front-header__inner {
    min-height: 5rem;
  }

  .sa-front-nav {
    display: flex;
  }

  .sa-front-header__hello {
    display: none;
  }

  .sa-page-head__inner {
    padding-top: 7.5rem;
    padding-bottom: 6rem;
  }

  .sa-page-section > .sa-page__inner {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }

  .sa-page h2 {
    font-size: 2.8rem;
  }

  .sa-front-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .sa-front-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .sa-page h1 {
    font-size: 4.4rem;
  }
}

@media (min-width: 1280px) {
  .sa-front-header__inner,
  .sa-page__inner,
  .sa-front-footer__inner,
  .sa-front-footer__bottom {
    width: min(calc(100% - 10rem), 1400px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-page *,
  .sa-page *::before,
  .sa-page *::after,
  .sa-front-header *,
  .sa-front-footer * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
