/* ==========================================================================
   Onsunday — base styles
   Tokens (colors, fonts, radius, page width) come from Theme settings and are
   written to :root by snippets/theme-styles.liquid.
   ========================================================================== */

:root {
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --section-space: clamp(3.5rem, 8vw, 7rem);
  --section-space-compact: clamp(2.75rem, 6vw, 5rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --shadow-soft: 0 24px 48px -28px rgba(46, 38, 32, 0.38);
  --shadow-card: 0 14px 30px -22px rgba(46, 38, 32, 0.32);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-height: 72px;
}

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

html {
  font-size: var(--font-size-base, 17px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-body-weight, 400);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* Typography ------------------------------------------------------------ */

h1,
h2,
h3,
h4,
.wordmark {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight, 500);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: calc(clamp(2.5rem, 5.4vw, 4.4rem) * var(--heading-scale, 1));
}

h2 {
  font-size: calc(clamp(2.1rem, 3.8vw, 3.1rem) * var(--heading-scale, 1));
}

h3 {
  font-size: calc(clamp(1.45rem, 2vw, 1.7rem) * var(--heading-scale, 1));
  line-height: 1.2;
}

.wordmark {
  font-size: 1.85rem;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
  margin: 0 0 1.1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 34em;
}

.rte > * + * {
  margin-top: 1em;
}

.rte h2,
.rte h3 {
  margin-top: 1.6em;
}

.rte ul,
.rte ol {
  padding-left: 1.2em;
}

.rte li + li {
  margin-top: 0.35em;
}

.rte a {
  color: var(--color-accent-strong);
}

/* Layout ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--page-width, 1280px) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

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

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

.section--tint {
  background: var(--color-surface);
}

.section-heading {
  max-width: 40rem;
  margin: 0 auto clamp(2rem, 4vw, 3.25rem);
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 0.35em;
}

.section-heading .lead {
  margin-inline: auto;
}

.section-heading--left {
  margin-inline: 0;
  text-align: left;
}

.section-heading--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  text-align: left;
}

.section-heading--row .lead {
  margin-inline: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* Media ratios and placeholders ----------------------------------------- */

.ratio {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius);
}

.ratio--square {
  aspect-ratio: 1 / 1;
}

.ratio--portrait {
  aspect-ratio: 4 / 5;
}

.ratio--wide {
  aspect-ratio: 16 / 9;
}

.ratio > img,
.ratio > video,
.ratio > .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
  background: repeating-linear-gradient(135deg, var(--color-surface) 0 14px, var(--color-border) 14px 15px);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.placeholder span {
  background: var(--color-bg);
  padding: 0.5em 0.9em;
  border-radius: 999px;
}
