/* ah2026 — visual parity with the React SPA shell */

:root {
  --ah-color-text: #000;
  --ah-color-bg: #fff;
  --ah-color-danger: #b00020;
  --ah-color-muted: rgba(0, 0, 0, 0.6);
  --ah-color-border: rgba(0, 0, 0, 0.23);
  --ah-color-border-strong: rgba(0, 0, 0, 0.5);
  --ah-color-hover: rgba(0, 0, 0, 0.04);
  --ah-font: Karla, Helvetica, Arial, sans-serif;
  --ah-space: 16px;
  --ah-space-sm: 8px;
  --ah-space-lg: 24px;
  --ah-toolbar-height: 64px;
  --ah-gallery-controls: 60px;
  --ah-nav-pad-y: 27.5px;
  --ah-focus-width: 2px;
  --ah-focus: var(--ah-focus-width) solid var(--ah-color-text);
  --ah-focus-offset: 2px;
  --ah-focus-offset-loose: 4px;
  /* Breakpoints used in @media (custom props not valid there): 600px, 900px */
}

@font-face {
  font-family: Karla;
  src: url("../fonts/karla.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

html {
  margin: 0;
}

body.ah2026-body {
  margin: 0;
  font-family: var(--ah-font);
  color: var(--ah-color-text);
  background: var(--ah-color-bg);
}

a {
  text-decoration: none;
  color: inherit;
}

/* Shared focus helpers */
.ah2026-logo:focus,
.ah2026-menu-toggle:focus,
.ah2026-menu a:focus,
.ah2026-footer-menu a:focus,
.ah2026-mobile-row a:focus,
.ah2026-lang a:focus,
.ah2026-btn:focus,
.ah2026-contact a:focus,
.ah2026-page-content a:focus,
.ah2026-gallery-image:focus {
  outline: none;
}

.ah2026-logo:focus-visible,
.ah2026-menu-toggle:focus-visible,
.ah2026-footer-menu a:focus-visible,
.ah2026-mobile-row a:focus-visible,
.ah2026-lang--compact a:focus-visible,
.ah2026-btn:focus-visible,
.ah2026-contact a:focus-visible,
.ah2026-page-content a:focus-visible {
  outline: var(--ah-focus);
  outline-offset: var(--ah-focus-offset);
}

.ah2026-gallery-image:focus-visible,
.ah2026-gallery-btn:focus-visible {
  outline: var(--ah-focus);
  outline-offset: var(--ah-focus-offset-loose);
}

/* Tall nav/lang hit areas: ring around the label, not the full padding box. */
.ah2026-menu a:focus-visible::after,
.ah2026-lang a:focus-visible::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 1.35em;
  transform: translateY(-50%);
  border: var(--ah-focus);
  pointer-events: none;
}

.ah2026-lang--compact a:focus-visible::after {
  content: none;
}

.ah2026-skip-link {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
  border: 0;
}

.ah2026-skip-link:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  overflow: visible;
  padding: 0.5rem 1rem;
  position: fixed;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 100000;
  background: #111;
  color: #fff;
  text-decoration: none;
  font: inherit;
}

.ah2026-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ah2026-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

.ah2026-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  outline: none;
}

.ah2026-spacer {
  flex: 1;
}

/* Header */
.ah2026-header {
  width: 100%;
  font-size: 18px;
  background: transparent;
  color: var(--ah-color-text);
}

.ah2026-toolbar {
  display: flex;
  align-items: center;
  min-height: var(--ah-toolbar-height);
  padding: 0 var(--ah-space);
  box-sizing: border-box;
}

.ah2026-logo {
  text-transform: uppercase;
  font-size: 26px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.ah2026-menu-toggle {
  appearance: none;
  background: none;
  border: 0;
  padding: var(--ah-space-sm);
  margin: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ah2026-menu-icon--close,
.ah2026-menu-toggle[aria-expanded="true"] .ah2026-menu-icon--open {
  display: none;
}

.ah2026-menu-toggle[aria-expanded="true"] .ah2026-menu-icon--close {
  display: block;
}

.ah2026-nav--desktop {
  display: none;
  align-items: center;
}

.ah2026-menu {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.ah2026-menu a {
  margin: 0 15px;
  padding-top: var(--ah-nav-pad-y);
  padding-bottom: var(--ah-nav-pad-y);
  display: inline-flex;
  align-items: center;
  position: relative;
}

.ah2026-menu a.active,
.ah2026-footer-menu a.active,
.ah2026-lang a.is-active,
.ah2026-lang a[aria-current="true"] {
  font-weight: 700;
}

.ah2026-lang {
  margin-left: 15px;
  display: flex;
  align-items: center;
}

.ah2026-lang a {
  padding: var(--ah-nav-pad-y) 0;
  color: inherit;
  text-decoration: none;
  position: relative;
}

.ah2026-lang--compact a {
  padding: 0;
}

.ah2026-lang-sep {
  margin: 0 5px;
}

.ah2026-icon {
  display: inline-block;
  vertical-align: middle;
}

.ah2026-nav--mobile {
  margin: 0 var(--ah-space);
}

.ah2026-nav--mobile[hidden] {
  display: none !important;
}

.ah2026-mobile-row {
  display: flex;
  justify-content: flex-end;
  padding: var(--ah-space-sm) 0;
}

.ah2026-mobile-row a {
  width: 100%;
  text-align: right;
}

@media (min-width: 900px) {
  .ah2026-menu-toggle {
    display: none;
  }

  .ah2026-nav--desktop {
    display: flex;
  }

  .ah2026-nav--mobile {
    display: none !important;
  }
}

/* Footer */
.ah2026-footer {
  display: flex;
  flex-shrink: 0;
  padding: var(--ah-space-lg);
  font-size: 18px;
}

.ah2026-footer-menu {
  display: flex;
}

.ah2026-footer-menu a {
  margin: 0 5px;
}

/* Home */
.ah2026-home-hero {
  position: relative;
  margin-left: var(--ah-space);
  margin-right: var(--ah-space);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ah2026-home-hero-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Page */
.ah2026-page-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 var(--ah-space) var(--ah-space);
}

.ah2026-page-content {
  margin: 0 var(--ah-space);
}

.ah2026-page-content table td {
  vertical-align: top;
}

.ah2026-page-content--en,
.ah2026-gallery-caption--en,
.ah2026-gallery-text--en {
  white-space: pre-wrap;
}

.ah2026-page-with-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ah-space-lg);
  margin: 0 var(--ah-space);
  align-items: start;
}

.ah2026-page-image {
  width: 100%;
  max-width: 66.666%;
  margin: 0 auto;
}

.ah2026-page-image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 900px) {
  .ah2026-page-with-image {
    grid-template-columns: 1fr 2fr;
    max-width: none;
  }

  .ah2026-page-image {
    max-width: none;
    margin: 0;
  }
}

/* Gallery */
.ah2026-gallery {
  width: 100%;
}

.ah2026-gallery-row {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.ah2026-gallery-stage {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--ah-toolbar-height));
  height: calc(100dvh - var(--ah-toolbar-height) - env(safe-area-inset-bottom, 0px));
  min-height: 0;
}

.ah2026-gallery-image-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah2026-gallery-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  display: block;
}

.ah2026-gallery-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ah2026-gallery-nav {
  flex: 0 0 auto;
  text-align: center;
}

.ah2026-gallery-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ah-color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--ah-space-sm);
}

.ah2026-gallery-btn[disabled],
.ah2026-gallery-btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.ah2026-gallery-slide-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  padding: var(--ah-space-sm);
}

.ah2026-gallery-slide-title[hidden] {
  display: block;
  visibility: hidden;
}

.ah2026-gallery-meta {
  margin-top: var(--ah-space);
  padding: 0 var(--ah-space);
}

.ah2026-gallery-meta p {
  margin: 0;
}

.ah2026-gallery-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ah-space);
}

.ah2026-gallery-caption p,
.ah2026-gallery-text p {
  margin: 0 0 32px;
}

@media (min-width: 900px) {
  .ah2026-gallery-row {
    display: grid;
    grid-template-columns: 16.666% 66.666% 16.666%;
    align-items: start;
  }

  .ah2026-gallery-stage,
  .ah2026-gallery-controls {
    display: contents;
  }

  .ah2026-gallery-image-wrap {
    grid-column: 2;
    grid-row: 1;
    display: block;
    flex: none;
    min-height: 0;
  }

  .ah2026-gallery-nav--prev {
    grid-column: 1;
    grid-row: 1;
  }

  .ah2026-gallery-nav--next {
    grid-column: 3;
    grid-row: 1;
  }

  .ah2026-gallery-slide-title {
    display: none;
  }

  .ah2026-gallery-meta {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
  }

  .ah2026-gallery-image {
    max-height: 85vh;
    width: auto;
  }

  .ah2026-gallery-meta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Contact form — MUI-like */
.ah2026-contact {
  margin: var(--ah-space-lg) var(--ah-space) 0;
}

/* Honeypot: visually hidden, not display:none (some bots skip those). */
.ah2026-contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ah2026-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ah-space);
}

.ah2026-contact-message textarea,
.ah2026-field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  border: 1px solid var(--ah-color-border);
  border-radius: 4px;
  padding: 10.5px 14px;
  background: var(--ah-color-bg);
}

.ah2026-contact-message textarea {
  display: block;
  min-height: 8rem;
  resize: vertical;
}

.ah2026-contact-message textarea:focus,
.ah2026-field input:focus {
  outline: none;
  border-color: var(--ah-color-text);
  border-width: 2px;
  padding: 9.5px 13px;
}

.ah2026-field {
  display: block;
  margin: 0;
}

.ah2026-field > span:first-child {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 4px;
  color: var(--ah-color-muted);
}

.ah2026-required {
  margin-left: 0.15em;
}

.ah2026-field-error {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ah-color-danger);
}

.ah2026-field-error[hidden] {
  display: none;
}

.ah2026-field input.ah2026-field--invalid,
.ah2026-contact-message textarea.ah2026-field--invalid {
  border-color: var(--ah-color-danger);
}

.ah2026-field input.ah2026-field--invalid:focus,
.ah2026-contact-message textarea.ah2026-field--invalid:focus {
  border-color: var(--ah-color-danger);
}

.ah2026-contact-actions {
  display: flex;
  justify-content: flex-end;
}

@media (min-width: 600px) {
  .ah2026-contact-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    column-gap: var(--ah-space-lg);
    row-gap: var(--ah-space);
    align-items: stretch;
  }

  .ah2026-contact-message {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .ah2026-contact-message textarea {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    resize: none;
  }

  .ah2026-contact-name,
  .ah2026-contact-email,
  .ah2026-contact-phone {
    grid-column: 1;
  }

  .ah2026-contact-name {
    grid-row: 1;
  }

  .ah2026-contact-email {
    grid-row: 2;
  }

  .ah2026-contact-phone {
    grid-row: 3;
  }

  .ah2026-contact-actions {
    grid-column: 2;
    grid-row: 4;
  }
}

.ah2026-btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border-radius: 4px;
  padding: 5px 15px;
  line-height: 1.75;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ah2026-btn--outlined {
  background: transparent;
  border: 1px solid var(--ah-color-border-strong);
  color: var(--ah-color-text);
}

.ah2026-btn--outlined:hover {
  background: var(--ah-color-hover);
  border-color: var(--ah-color-text);
}

.ah2026-btn--outlined:disabled,
.ah2026-btn--outlined[aria-disabled="true"] {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.ah2026-contact-success,
.ah2026-contact-error {
  font-style: italic;
  margin-top: var(--ah-space);
}

.ah2026-contact-error {
  color: var(--ah-color-danger);
}

/* Admin bar: offset content (WP bump is removed in functions.php). */
.admin-bar .ah2026-shell {
  margin-top: 32px;
  min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .ah2026-shell {
    margin-top: 46px;
    min-height: calc(100vh - 46px);
  }
}
