/* Controls use the page palette and keep their original hit areas. */
:root {
  --ix-ease: cubic-bezier(.22,.65,.3,1);
  --ix-feedback: 210ms;
  --ix-travel: 250ms;
  --ix-selection: 285ms;
  --ix-focus: #87502d;
  --ix-focus-light: #f0bb86;
}
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--ix-focus);
  outline-offset: 4px;
}
:is(header, .hero, #contact, footer, #lightbox) :is(a, button, summary):focus-visible {
  outline: 2px solid var(--ix-focus-light);
  outline-offset: 4px;
}

/* Text links reserve an underline without moving their label. */
:is(header a, .text-link, .guide-next, footer a) {
  --ix-rule: 0%;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: var(--ix-rule) 1px;
  background-position: left calc(100% - 5px);
  background-repeat: no-repeat;
  transition: background-size var(--ix-travel) var(--ix-ease), color var(--ix-feedback) ease;
}
.text-link {
  border-bottom-color: #f3ecdc80;
  background-position: left bottom;
}
.guide-next { background-position: left calc(100% - 6px); }
:is(header nav a, footer a) { column-gap: .28em; }
.ix-arrow {
  display: inline-block;
  flex: none;
  transition: transform var(--ix-travel) var(--ix-ease);
}
.ix-down { --ix-y: 5px; }
.ix-up { --ix-y: -5px; }
.ix-diagonal { --ix-x: 4px; --ix-y: -4px; }
.ix-left { --ix-x: -5px; }
.ix-right { --ix-x: 5px; }
:is(a, button):focus-visible .ix-arrow {
  transform: translate(var(--ix-x, 0px), var(--ix-y, 0px));
}
:is(header a, .text-link, .guide-next, footer a):focus-visible { --ix-rule: 100%; }
:is(header a, .text-link, .guide-next, footer a):is(:active, [data-ix-pressed]) { --ix-rule: 100%; color: #87502d; }
:is(header, .hero, footer) a:is(:active, [data-ix-pressed]) { color: #f0bb86; }

/* The moving plate reads the existing aria-selected state. */
#explore .space-tabs button {
  position: relative;
  transition: background-color var(--ix-feedback) ease, border-color var(--ix-feedback) ease;
}
/* Match the text edge to its resting surface so labels remain legible while the plate passes. */
@supports (paint-order: stroke fill) {
  #explore .space-tabs button { paint-order: stroke fill; -webkit-text-stroke: 1.25px #efeee8; }
  #explore .space-tabs button[aria-selected="true"] { -webkit-text-stroke-color: #354133; }
}
#explore .space-tabs button:focus-visible { z-index: 2; outline: 2px solid var(--ix-focus); outline-offset: -3px; }
#explore .space-tabs button[aria-selected="true"]:focus-visible { outline-color: #f0bb86; }
#explore .space-tabs button[aria-selected="true"] {
  background-color: #354133;
  color: #f4efe2;
  border-color: #354133;
}
@supports selector(:has(*)) {
  #explore .space-tabs {
    position: relative;
    isolation: isolate;
    --ix-gap: 2px;
    --ix-cell: calc((100% - 3 * var(--ix-gap)) / 4);
    --ix-column: 0;
    --ix-row: 0;
  }
  #explore .space-tabs:has(#tab-display[aria-selected="true"]) { --ix-column: 1; }
  #explore .space-tabs:has(#tab-window[aria-selected="true"]) { --ix-column: 2; }
  #explore .space-tabs:has(#tab-meeting[aria-selected="true"]) { --ix-column: 3; }
  #explore .space-tabs::before {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: -1;
    width: var(--ix-cell);
    height: 100%;
    background: #354133;
    transform: translate(calc(var(--ix-column) * (100% + var(--ix-gap))), calc(var(--ix-row) * (100% + var(--ix-gap))));
    transition: transform var(--ix-selection) var(--ix-ease);
  }
  #explore .space-tabs button[aria-selected="true"] { background-color: transparent; }
  @media (max-width: 700px) {
    #explore .space-tabs {
      --ix-gap: 4px;
      --ix-cell: calc((100% - var(--ix-gap)) / 2);
      grid-auto-rows: 1fr;
    }
    #explore .space-tabs::before { height: calc((100% - var(--ix-gap)) / 2); }
    #explore .space-tabs:has(#tab-window[aria-selected="true"]) { --ix-column: 0; --ix-row: 1; }
    #explore .space-tabs:has(#tab-meeting[aria-selected="true"]) { --ix-column: 1; --ix-row: 1; }
  }
}
#explore .space-tabs button:is(:active, [data-ix-pressed]) { background-color: #c9d0c1; transition-duration: 0ms; }

#explore .space-tabs button[aria-selected="true"]:is(:active, [data-ix-pressed]) { background-color: #465442; }

#explore .space-thumbnail {
  transition: border-color var(--ix-feedback) ease, box-shadow var(--ix-feedback) ease, background-color var(--ix-feedback) ease;
}
#explore .space-thumbnail[aria-pressed="true"] {
  border-color: #3e4c35;
  box-shadow: inset 0 0 0 2px #3e4c35;
}
#explore .space-thumbnail[aria-pressed="true"] img { outline: 0; }
#explore .space-thumbnail:is(:active, [data-ix-pressed]) { background-color: #aab39e; transition-duration: 0ms; }

/* Clip the small magnification inside the exact photo bounds. */
:is(.space-thumbnail, .photo-index-preview, .gallery-item, .compare-photo) > img {
  clip-path: inset(0);
  transition: transform var(--ix-travel) var(--ix-ease), clip-path var(--ix-travel) var(--ix-ease), filter var(--ix-feedback) ease;
}
:is(#explore-photo .zoom-label, .compare-zoom) {
  transition: color var(--ix-feedback) ease, background-color var(--ix-feedback) ease, transform var(--ix-travel) var(--ix-ease);
}
:is(#explore-photo:focus-visible .zoom-label, .compare-photo:focus-visible .compare-zoom) {
  background-color: #eee9d8;
  color: #242920;
}
:is(#explore-photo:is(:active, [data-ix-pressed]) .zoom-label, .compare-photo:is(:active, [data-ix-pressed]) .compare-zoom) {
  background-color: #d9c6a5;
  color: #242920;
  transition-duration: 0ms;
}

#explore #all-photos > .photo-index-summary {
  transition: background-color var(--ix-feedback) ease;
}
#explore .photo-index-summary .photo-index-title {
  text-underline-offset: .28em;
  text-decoration-thickness: 1px;
}
#explore .photo-index-summary .photo-index-mark, .ix-disclosure-mark {
  display: inline-block;
  line-height: 1;
  transition: transform var(--ix-travel) var(--ix-ease);
}
#explore #all-photos > summary:is(:active, [data-ix-pressed]) { background-color: #d7dacf; transition-duration: 0ms; }

#compare-toggle, #explore .compare-change {
  transition: background-color var(--ix-feedback) ease, color var(--ix-feedback) ease, border-color var(--ix-feedback) ease;
}
#compare-toggle[aria-pressed="true"] { background-color: #35422e; color: #fff9ee; border-color: #35422e; }
#explore .compare-change[aria-pressed="true"] { background-color: #e0e5d7; border-color: #47563c; }
#explore .compare-change[aria-pressed="true"]:not(:focus-visible) { outline: 1px solid #47563c; outline-offset: 2px; }
#compare-toggle:is(:active, [data-ix-pressed]), #explore .compare-change:is(:active, [data-ix-pressed]) {
  background-color: #b4bea9;
  color: #22281e;
  transition-duration: 0ms;
}
#explore .gallery-item[data-pick] { outline: 0; box-shadow: 0 0 0 2px #4f6044; }
#explore .gallery-item[data-pick]::after { background: #34442d; border: 1px solid #e9e8dc; min-width: 25px; text-align: center; }
#explore .gallery-item:focus-visible { outline: 2px solid var(--ix-focus); outline-offset: 5px; }
#explore .gallery-item:is(:active, [data-ix-pressed]) > img { filter: brightness(.83); transition-duration: 0ms; }
.gallery-item i { display: inline-block; transition: transform var(--ix-travel) var(--ix-ease); }

#contact .line-button {
  transition: background-color var(--ix-feedback) ease, border-color var(--ix-feedback) ease;
}
#contact .line-button:is(:active, [data-ix-pressed]) { background-color: #dcc9a9; border-color: #dcc9a9; transition-duration: 0ms; }
#contact .consult-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  transition: color var(--ix-feedback) ease;
}
#contact .consult-details summary::-webkit-details-marker { display: none; }
#contact .consult-details summary::marker { content: ""; }
#contact .consult-details[open] .ix-disclosure-mark { transform: rotate(45deg); }
#contact .consult-details summary:is(:active, [data-ix-pressed]) { color: #f0bb86; transition-duration: 0ms; }
#lightbox button {
  transition: background-color var(--ix-feedback) ease, border-color var(--ix-feedback) ease;
}
#lightbox button:is(:active, [data-ix-pressed]) { transition-duration: 0ms; }

@media (hover: hover) and (pointer: fine) {
  :is(header a, .text-link, .guide-next, footer a):hover { --ix-rule: 100%; }
  :is(a, button):hover .ix-arrow { transform: translate(var(--ix-x, 0px), var(--ix-y, 0px)); }
  #explore .space-tabs button[aria-selected="false"]:hover:not(:active, [data-ix-pressed]) { background-color: #e3e5da; }
  #explore .space-thumbnail:hover { border-color: #3e4c35; }
  :is(.space-thumbnail:hover, .photo-index-summary:hover .photo-index-preview, .gallery-item:hover, .compare-photo:hover) > img {
    transform: scale(1.03);
    clip-path: inset(1.5%);
  }
  #explore .gallery-item:hover:not(:active, [data-ix-pressed]) > img { filter: brightness(1.03); }
  .gallery-item:hover i { transform: translate(3px, -3px); }
  #explore-photo:hover .zoom-label, .compare-photo:hover .compare-zoom {
    transform: translateY(-3px);
    background-color: #eee9d8;
    color: #242920;
  }
  #explore #all-photos > summary:hover:not(:active, [data-ix-pressed]) { background-color: #e6e8dd; }
  #compare-toggle[aria-pressed="false"]:hover:not(:active, [data-ix-pressed]), #explore .compare-change:hover:not(:active, [data-ix-pressed]) { background-color: #e0e5d7; }
  #compare-toggle[aria-pressed="true"]:hover:not(:active, [data-ix-pressed]) { background-color: #43523a; }
  #contact .line-button:hover:not(:active, [data-ix-pressed]) { background-color: #e7d8b8; border-color: #e7d8b8; }
  #contact .consult-details summary:hover:not(:active, [data-ix-pressed]) { color: #f0bb86; }
}
@media (hover: none), (pointer: coarse) {
  /* Reset inherited desktop hover colors on touch after the press ends. */
  #explore .space-tabs button[aria-selected="false"]:hover:not(:active, [data-ix-pressed]) { background-color: transparent; }
  #explore .gallery-item:hover:not(:active, [data-ix-pressed]) > img { filter: none; }
  #explore .photo-index-summary:hover .photo-index-title { text-decoration: none; }
  #contact .line-button:hover:not(:active, [data-ix-pressed]) { background-color: #f2eddb; border-color: #f2eddb; }
  #lightbox button:hover:not(:active, [data-ix-pressed]) { background-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --ix-feedback: 0ms; --ix-travel: 0ms; --ix-selection: 0ms; }
  :is(a, button):is(:hover, :focus-visible) .ix-arrow,
  .gallery-item:hover i,
  #explore-photo:hover .zoom-label, .compare-photo:hover .compare-zoom { transform: none; }
  :is(.space-thumbnail:hover, .photo-index-summary:hover .photo-index-preview, .gallery-item:hover, .compare-photo:hover) > img {
    transform: none;
    clip-path: inset(0);
  }
}

