/* WebKnight house style components - plain HTML + tokens */

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

html, body {
  overflow-x: clip;
}

html {
  background: var(--surface-0);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: var(--leading);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--surface-0);
  color: var(--ink);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

/* --- Layout --- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--page));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-8);
}

.section--tight {
  padding-block: var(--space-6);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-6); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  :root { --gutter: 1.25rem; }
}

/* --- Type --- */
.h1, h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin: 0;
}

.h2, h2 {
  font-size: var(--text-3xl);
  font-weight: 750;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 0;
}

.h3, h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

.lede {
  font-size: var(--text-md);
  color: var(--ink-muted);
  max-width: 36em;
  margin: 0;
}

.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.small { font-size: var(--text-sm); }
.tiny { font-size: var(--text-xs); }

.wordmark {
  font-weight: 900;
  font-size: var(--text-lg);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.2;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--surface-1);
  border-color: var(--ink-muted);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding-inline: 0.65rem;
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-1);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: 0.45rem 0.8rem;
}

.btn--block { width: 100%; }

/* --- Fields --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field > label,
.field-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.field-error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--danger);
}

.input,
.select,
.textarea {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink-muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field--error .input,
.field--error .select,
.field--error .textarea {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23A8ADB5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}

/* --- Card --- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card--raised {
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.card__body {
  color: var(--ink-muted);
  margin: 0;
  font-size: var(--text-base);
}

/* --- Table / price list --- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.table th,
.table td {
  text-align: left;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.table th {
  font-weight: 650;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.table tr:last-child td { border-bottom: 0; }

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.price-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.price-list .name {
  font-weight: 700;
  font-size: var(--text-lg);
}

.price-list .price {
  font-weight: 800;
  font-size: var(--text-2xl);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-list .desc {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: var(--text-base);
  max-width: 36em;
}

/* --- Nav --- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-base);
  font-weight: 550;
}

.site-nav__links a {
  text-decoration: none;
  color: var(--ink-muted);
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.site-nav__cta {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "mark cta"
      "links links";
    gap: var(--space-3);
    align-items: center;
  }
  .site-nav .wordmark { grid-area: mark; }
  .site-nav__links {
    grid-area: links;
    gap: 0.5rem 1.1rem;
  }
  .site-nav__cta {
    grid-area: cta;
    justify-self: end;
    width: auto;
  }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-5);
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* --- Notice --- */
.notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-1);
  font-size: var(--text-sm);
}

.notice--info {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
}

.notice--danger {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  background: var(--danger-soft);
}

.notice strong {
  display: block;
  font-size: var(--text-base);
  margin-bottom: 0.15rem;
  color: var(--ink);
}

/* --- Booking time picker list --- */
.times {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: var(--space-2);
}

.times label {
  display: block;
  cursor: pointer;
}

.times input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.times span {
  display: block;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.times label:hover span {
  border-color: var(--ink-muted);
}

.times input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.times input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.times input:disabled + span {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- FAQ disclosure --- */
.faq {
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 650;
  font-size: var(--text-md);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: baseline;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-weight: 500;
  color: var(--ink-muted);
  font-size: var(--text-xl);
  line-height: 1;
}

.faq details[open] summary::after {
  content: "-";
}

.faq .faq__body {
  padding: 0 0 1.15rem;
  color: var(--ink-muted);
  max-width: 40em;
  margin: 0;
}

/* --- Slot (missing fact) --- */
.slot {
  display: inline-block;
  border: 1.5px dashed var(--line-strong);
  color: var(--ink-muted);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.slotbox {
  border: 1.5px dashed var(--line-strong);
  color: var(--ink-muted);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-6);
  min-height: 10rem;
  font-size: var(--text-sm);
}

/* --- Rule --- */
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.rule--strong {
  border-top-color: var(--line-strong);
  border-top-width: 1px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}


/* --- Price board (ruled motif) --- */
.price-board {
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  padding: var(--space-5) var(--space-5);
  background: var(--surface-1);
  border-radius: 0;
  list-style: none;
  margin: 0;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.price-board__title {
  font-size: var(--text-lg);
  font-weight: 750;
  margin: 0 0 var(--space-4);
  color: var(--accent);
}

.price-board ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.price-board li {
  display: grid;
  grid-template-columns: auto minmax(1.5rem, 1fr) auto;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: 0.7rem;
}

.price-board li + li {
  border-top: 1px solid var(--line);
}

.price-board .item {
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1.2;
}

.price-board .item small {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.price-board .leader {
  border-bottom: 1px solid var(--line-strong);
  transform: translateY(-0.35em);
  min-width: 1.25rem;
}

.price-board .cost {
  font-weight: 800;
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

.price-board .cost .unit {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
  margin-left: 0.2rem;
}

@media (max-width: 520px) {
  .price-board .leader { display: none; }
  .price-board li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
