@font-face {
  font-family: "Amatic SC";
  src: url("/assets/amatic-sc-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Neucha";
  src: url("/assets/neucha-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "FontAwesome";
  src: url("/assets/fontawesome-4.7.woff2") format("woff2");
  font-style: normal;
  font-weight: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --forest: #255540;
  --forest-dark: #173c2d;
  --terracotta: #e06830;
  --terracotta-dark: #b94d1e;
  --cream: #fff8e7;
  --paper: #fffdf8;
  --mint: #f0f6f2;
  --sage: #629a7c;
  --ink: #212529;
  --muted: #5a645e;
  --line: #bccac1;
  --warning: #f7cb74;
  --warning-ink: #533800;
  --focus: #b94d1e;
  --danger: #8d3128;
  --danger-soft: #f8e8e2;
  --header-height: 7.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Neucha", "Trebuchet MS", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

a {
  color: var(--forest);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--cream);
  color: var(--forest-dark);
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 5;
  height: var(--header-height);
  background: var(--forest);
}

.header-inner {
  display: flex;
  width: min(100% - 3rem, 78rem);
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.brand,
.menu-link {
  display: inline-flex;
  min-width: 3rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
}

.brand img {
  display: block;
  width: 5.75rem;
  height: 5.75rem;
  object-fit: contain;
}

.menu-link {
  color: var(--cream);
  font-size: 2rem;
  text-decoration: none;
}

.fa-menu::before {
  font-family: "FontAwesome";
  font-style: normal;
  font-weight: normal;
  content: "\f0c9";
}

.split-layout {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  grid-template-columns: minmax(23rem, 48%) minmax(32rem, 52%);
}

.photo-panel {
  position: sticky;
  top: 0;
  height: calc(100svh - var(--header-height));
  min-height: 40rem;
  margin: 0;
  overflow: hidden;
  background: var(--forest-dark);
}

.photo-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
}

.explorer-panel {
  min-width: 0;
  background: var(--cream);
}

.explorer-content {
  width: min(100%, 43rem);
  margin-inline: auto;
  padding: clamp(3rem, 4.4vw, 4.25rem) clamp(2.5rem, 5vw, 4.8rem) 4rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--terracotta-dark);
  font-family: system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1 {
  max-width: 100%;
  margin: 0;
  color: var(--forest);
  font-family: "Amatic SC", "Arial Narrow", sans-serif;
  font-size: clamp(4rem, 5.1vw, 5.35rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 0.9;
  text-transform: uppercase;
}

.title-stroke {
  display: block;
  width: min(100%, 37rem);
  height: 1.15rem;
  margin-top: 0.45rem;
  object-fit: fill;
  object-position: center;
}

.intro-copy {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  color: var(--forest-dark);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.date-field {
  margin-top: 1.7rem;
}

.date-field label {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--forest-dark);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.birth-tree {
  width: min(100%, 36rem);
  margin: 1.65rem 0 0;
  text-align: left;
}

.tree-copy {
  max-width: 34rem;
}

.tree-eyebrow {
  margin: 0;
  color: var(--warning);
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tree-copy h2 {
  margin: 0.05rem 0 0;
  color: var(--forest);
  font-family: "Amatic SC", "Arial Narrow", sans-serif;
  font-size: clamp(2.7rem, 7vw, 3.65rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.tree-period {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.tree-story {
  max-width: 32rem;
  min-height: 6.2rem;
  margin: 0.9rem 0 0;
  color: var(--ink);
  font-family: "Neucha", "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.08rem);
  line-height: 1.38;
  text-wrap: pretty;
}

.tree-story.is-writing::after {
  display: inline-block;
  width: 0.12rem;
  height: 1em;
  margin-left: 0.12rem;
  border-right: 0.12rem solid var(--warning);
  vertical-align: -0.12em;
  animation: tree-caret 720ms steps(1, end) infinite;
  content: "";
}

@keyframes tree-caret {
  0%, 45% {
    opacity: 1;
  }

  46%, 100% {
    opacity: 0;
  }
}

.tree-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.25;
}

input[type="date"] {
  width: 100%;
  min-height: 3.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--forest);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
}

.field-hint {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.3;
}

.goodiebag-hint {
  margin: 0.75rem 0 0;
  padding: 0.72rem 0.85rem;
  border-left: 4px solid var(--terracotta);
  background: rgba(224, 104, 48, 0.1);
  color: var(--forest-dark);
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.42;
}

.goodiebag-hint strong {
  font-weight: 850;
}

.status {
  min-height: 1.75rem;
  margin-top: 1rem;
  color: var(--forest-dark);
  font-family: system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
}

.status.is-loading {
  color: var(--terracotta-dark);
}

.results {
  margin-top: 0.85rem;
}

.slots-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.slots {
  display: grid;
  gap: 0.62rem;
}

.slot-option {
  position: relative;
  min-width: 0;
}

.slot-radio {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 1rem;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  accent-color: var(--forest);
  transform: translateY(-50%);
}

.slot-label {
  display: flex;
  min-height: 3.95rem;
  padding: 0.75rem 1rem 0.75rem 3.45rem;
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.slot-label:hover {
  border-color: var(--sage);
}

.slot-radio:focus-visible + .slot-label {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.slot-radio:checked + .slot-label {
  border-color: var(--terracotta);
  background: var(--paper);
}

.slot-radio:disabled + .slot-label {
  border-style: dashed;
  background: #f2f0e9;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.86;
}

.slot-time {
  min-width: 0;
  color: var(--forest-dark);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.slot-radio:disabled + .slot-label .slot-time {
  color: var(--muted);
}

.availability {
  flex: 0 0 auto;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.availability.free {
  background: var(--mint);
  color: var(--forest-dark);
}

.availability.last {
  background: var(--warning);
  color: var(--warning-ink);
}

.availability.full {
  background: var(--danger-soft);
  color: var(--danger);
}

.booking-action {
  margin-top: 0.95rem;
}

.primary-action,
.action-placeholder,
.alternative-button {
  display: inline-flex;
  min-height: 3rem;
  border-radius: 0.55rem;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.primary-action,
.action-placeholder {
  width: 100%;
  min-height: 4.35rem;
  padding: 0.72rem 1rem;
}

.primary-action {
  border: 2px solid var(--terracotta);
  background: var(--terracotta);
  color: #fff;
  font-family: "Amatic SC", "Arial Narrow", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-action:hover {
  border-color: var(--terracotta-dark);
  background: var(--terracotta-dark);
}

.action-placeholder {
  border: 2px solid #aeb9b2;
  background: #e8ece9;
  color: #59635d;
  font-family: system-ui, sans-serif;
  font-size: 0.96rem;
  cursor: not-allowed;
}

.alternative-box,
.fallback-box,
.error-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.55rem;
}

.alternative-box {
  border: 1px solid var(--sage);
  background: var(--mint);
}

.alternative-box h3 {
  margin: 0 0 0.35rem;
  color: var(--forest-dark);
  font-family: "Neucha", "Trebuchet MS", sans-serif;
  font-size: 1.25rem;
}

.alternative-box p,
.fallback-box p,
.error-box p {
  margin: 0;
}

.alternative-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.alternative-button {
  min-width: 8rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--forest);
  background: #fff;
  color: var(--forest);
  cursor: pointer;
}

.alternative-button:hover {
  background: var(--forest);
  color: var(--cream);
}

.fallback-box {
  border-left: 0.38rem solid var(--terracotta);
  background: #fff0e7;
  color: var(--ink);
}

.fallback-box a,
.contact-link {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.error-box {
  border-left: 0.38rem solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

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

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (min-width: 57rem) {
  .qa-capture .split-layout {
    min-height: 58.625rem;
  }

  .qa-capture .photo-panel {
    position: relative;
    height: 58.625rem;
    min-height: 58.625rem;
  }
}

@media (min-width: 57rem) and (max-height: 54rem) {
  :root {
    --header-height: 4.5rem;
  }

  .brand img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .menu-link {
    font-size: 1.55rem;
  }

  .photo-panel {
    min-height: 0;
  }

  .explorer-content {
    padding: 1.35rem clamp(2rem, 4vw, 3.5rem) 2rem;
  }

  h1 {
    font-size: clamp(3.25rem, 4.2vw, 4rem);
  }

  .title-stroke {
    height: 0.7rem;
    margin-top: 0.25rem;
  }

  .intro-copy {
    margin-top: 0.75rem;
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .date-field {
    margin-top: 1rem;
  }

  .goodiebag-hint {
    margin-top: 0.55rem;
    padding: 0.58rem 0.7rem;
    font-size: 0.84rem;
    line-height: 1.34;
  }

  input[type="date"] {
    min-height: 3.25rem;
    padding-block: 0.55rem;
  }

  .birth-tree {
    margin-top: 1rem;
  }

  .status {
    min-height: 1.45rem;
    margin-top: 0.55rem;
  }

  .results {
    margin-top: 0.5rem;
  }

  .explorer-card.has-date .intro-copy {
    display: none;
  }

  .explorer-card.has-date .date-field {
    margin-top: 0.85rem;
  }

  .explorer-card.has-date .tree-copy {
    display: grid;
    max-width: 36rem;
    grid-template-columns: minmax(9.5rem, 0.8fr) minmax(16rem, 1.7fr);
    grid-template-areas:
      "eyebrow story"
      "name story"
      "period story";
    column-gap: 1.35rem;
    align-items: start;
  }

  .explorer-card.has-date .tree-eyebrow {
    grid-area: eyebrow;
  }

  .explorer-card.has-date .tree-copy h2 {
    grid-area: name;
    font-size: 3rem;
  }

  .explorer-card.has-date .tree-period {
    grid-area: period;
  }

  .explorer-card.has-date .tree-story {
    min-height: 0;
    margin: 0.1rem 0 0;
    grid-area: story;
  }

  .explorer-card.has-date .tree-note {
    margin-top: 0.45rem;
  }

  .explorer-card.has-date .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .explorer-card.has-date .slot-radio {
    left: 0.7rem;
    width: 1.25rem;
    height: 1.25rem;
  }

  .explorer-card.has-date .slot-label {
    min-height: 4.7rem;
    padding: 0.55rem 0.55rem 0.55rem 2.45rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.22rem;
  }

  .explorer-card.has-date .slot-time {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .explorer-card.has-date .availability {
    padding: 0.18rem 0.45rem;
    font-size: 0.68rem;
  }

  .explorer-card.has-date .booking-action {
    margin-top: 0.6rem;
  }

  .explorer-card.has-date .primary-action,
  .explorer-card.has-date .action-placeholder {
    min-height: 3.45rem;
  }
}

@media (max-width: 56.99rem) {
  :root {
    --header-height: 5.5rem;
  }

  .header-inner {
    width: min(100% - 2rem, 43rem);
  }

  .brand img {
    width: 4.25rem;
    height: 4.25rem;
  }

  .menu-link {
    font-size: 1.65rem;
  }

  .split-layout {
    display: block;
    min-height: auto;
  }

  .photo-panel {
    position: relative;
    height: clamp(13.5rem, 62vw, 20rem);
    min-height: 0;
  }

  .photo-panel img {
    object-position: 50% 51%;
  }

  .explorer-content {
    padding: 2.5rem clamp(1.2rem, 5vw, 2.3rem) 3.25rem;
  }

  h1 {
    font-size: clamp(3.7rem, 18vw, 5.4rem);
  }

  .title-stroke {
    height: 0.9rem;
  }
}

@media (max-width: 24rem) {
  body {
    font-size: 1rem;
  }

  .slot-label {
    padding-right: 0.75rem;
    padding-left: 3.15rem;
  }

  .slot-radio {
    left: 0.85rem;
  }

  .slot-time {
    font-size: 0.92rem;
  }

  .availability {
    padding-inline: 0.48rem;
    font-size: 0.7rem;
  }

  .tree-story {
    min-height: 7.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
