/**
 * Base Styles.
 *
 * @package Accommodate
 */

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-synthesis-weight: none;
  font-synthesis-style: none;
  /* Full-bleed (alignfull) blocks size to 100vw, which is wider than the
     viewport once a vertical scrollbar appears, causing horizontal scroll.
     `clip` (not `hidden`) prunes that overflow without breaking
     position: sticky/fixed header behavior. */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-heading);
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

h6 {
  font-size: var(--text-h6);
}

p {
  margin-block-end: var(--space-md);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}

a {
  color: var(--color-accent-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-text-hover);
}

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

ul, ol {
  list-style: none;
}

/* Screen Reader Text */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  clip: auto !important;
  color: var(--color-text);
  display: block;
  font-size: var(--text-sm);
  height: auto;
  inset-inline-start: var(--space-sm);
  line-height: normal;
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  inset-block-start: var(--space-sm);
  width: auto;
  z-index: var(--z-fixed);
}

/* Skip Link */
.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 0;
  background: var(--color-label-bg);
  color: var(--color-text-inverse);
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-fixed);
}

.skip-link:focus {
  inset-block-start: 0;
}

/* Container */
.accommodate-container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  margin-block-end: var(--space-xl);
}

/* Entry Header */
.entry-header {
  margin-block-end: var(--space-xl);
  width: 100%;
}

.entry-title {
  font-size: var(--text-h1);
  font-weight: var(--weight-heading);
  margin-block-end: var(--space-sm);
  width: 100%;
}

/* Block-start breathing room for the title on regular pages & posts
   (single posts and the Boxed page template). Scoped to the
   container-constrained entry header so listing entry headers — which
   follow their gallery — are left untouched. The base spacing shrinks on
   small screens and grows at the theme's desktop breakpoint. */
.accommodate-container > .entry-header {
  --entry-header-block-start: var(--space-lg);
  padding-block-start: var(--entry-header-block-start);
  margin-block-end: var(--space-2xl);
}

/* Overlap header: the header overlays the page top (fixed or absolute), so
   grow the spacing by the header height to keep the title clear of it. */
body.accommodate-overlap-header .accommodate-container > .entry-header {
  padding-block-start: calc(var(--entry-header-block-start) + var(--header-height));
}

@media (min-width: 1024px) {
  .accommodate-container > .entry-header {
    --entry-header-block-start: var(--space-2xl);
  }
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Forms */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Keep selection enabled in fields and editable content. */
input,
textarea,
select,
[contenteditable='true'] {
  -webkit-user-select: text;
  user-select: text;
}

/* Section eyebrow label (shared structural utility) */
.accommodate-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-label-text);
  margin-block-end: var(--space-sm);
}

/* Centered section header helper for block pages */
.accommodate-section-head {
  margin-block-end: var(--space-2xl);
}

/* Price — reusable hang-tag. Add `.accommodate-price` to any block via the
   editor's "Additional CSS class(es)" field. It reads like a paper price tag:
   stitched dashed border, a punched hole with a string, and the amount set
   large in the accent color. The markup is just a label followed by the
   amount; for the best look wrap the amount in a
   `<span class="accommodate-price__amount">` and a trailing unit (e.g.
   "per person") in `<span class="accommodate-price__note">`. */
.accommodate-price {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-lg);
  max-width: 100%;
  margin-block: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  padding-block-start: calc(var(--space-lg) + var(--space-md));
  background: var(--color-surface-elevated);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-heading);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

/* String — short accent line above the punched hole. */
.accommodate-price::before {
  content: "";
  position: absolute;
  inset-block-start: calc(-1 * var(--space-md));
  inset-inline-start: calc(var(--space-lg) + 0.375rem);
  width: 2px;
  height: var(--space-md);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transform: translateX(-50%);
}

/* Punched hole — ring punched through to the page surface. */
.accommodate-price::after {
  content: "";
  position: absolute;
  inset-block-start: calc(-1 * var(--space-sm));
  inset-inline-start: var(--space-lg);
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: var(--color-surface);
}

.accommodate-price > strong {
  align-self: center;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-black);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-inverse);
}

.accommodate-price__amount {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent-text);
}

.accommodate-price__note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}
