/*
 * Open Season Media production design system.
 * Foundation only: tokens, base elements, reusable primitives, and states.
 */

:root {
  color-scheme: light dark;

  /* Color primitives */
  --osm-color-midnight-navy: #090b10;
  --osm-color-deep-navy: #111720;
  --osm-color-charcoal: #1d2229;
  --osm-color-graphite: #2d3239;
  --osm-color-warm-slate: #4b5057;
  --osm-color-stone-gray: #747a80;
  --osm-color-warm-ivory: #f5f1ea;
  --osm-color-soft-white: #fcfaf7;
  --osm-color-soft-copper: #b97a5b;
  --osm-color-dawn-bronze: #c48a66;
  --osm-color-sunrise-amber: #d29a72;
  --osm-color-desert-sand: #c9a383;
  --osm-color-champagne: #dcc5a4;
  --osm-color-warm-linen: #e7d8c3;
  --osm-color-mountain-blue: #3f566b;
  --osm-color-morning-mist: #76818c;
  --osm-color-lake-reflection: #4f6372;
  --osm-color-glass-gray: #a5aab0;
  --osm-color-smoked-walnut: #4a352b;
  --osm-color-espresso-wood: #2f241f;
  --osm-color-black-marble: #17181a;
  --osm-color-matte-steel: #7b8086;
  --osm-rgb-midnight-navy: 9 11 16;
  --osm-rgb-deep-navy: 17 23 32;
  --osm-rgb-charcoal: 29 34 41;
  --osm-rgb-warm-ivory: 245 241 234;
  --osm-rgb-soft-copper: 185 122 91;

  /* Semantic color tokens */
  --osm-color-bg: var(--osm-color-soft-white);
  --osm-color-bg-dark: var(--osm-color-midnight-navy);
  --osm-color-surface: #f7f2eb;
  --osm-color-surface-dark: var(--osm-color-deep-navy);
  --osm-color-surface-elevated: #ffffff;
  --osm-color-surface-elevated-dark: var(--osm-color-charcoal);
  --osm-color-text-primary: var(--osm-color-charcoal);
  --osm-color-text-secondary: var(--osm-color-warm-slate);
  --osm-color-text-muted: #62686f;
  --osm-color-text-on-dark: var(--osm-color-warm-ivory);
  --osm-color-text-on-dark-secondary: #d7d9dc;
  --osm-color-text-on-dark-muted: #a2a8af;
  --osm-color-accent: var(--osm-color-soft-copper);
  --osm-color-action: var(--osm-color-dawn-bronze);
  --osm-color-action-hover: var(--osm-color-sunrise-amber);
  --osm-color-border: rgba(45, 50, 57, 0.18);
  --osm-color-border-strong: rgba(45, 50, 57, 0.34);
  --osm-color-border-dark: rgba(245, 241, 234, 0.16);
  --osm-color-success: #2f6b4f;
  --osm-color-warning: #9a6334;
  --osm-color-error: #9a3f3f;
  --osm-color-focus: var(--osm-color-sunrise-amber);

  /* Typography */
  --osm-font-display: Georgia, "Times New Roman", serif;
  --osm-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --osm-font-code: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --osm-text-display: 3.25rem;
  --osm-text-h1: 2.75rem;
  --osm-text-h2: 2.125rem;
  --osm-text-h3: 1.625rem;
  --osm-text-h4: 1.3rem;
  --osm-text-h5: 1.125rem;
  --osm-text-h6: 1rem;
  --osm-text-body-lg: 1.125rem;
  --osm-text-body: 1rem;
  --osm-text-small: 0.875rem;
  --osm-text-caption: 0.75rem;
  --osm-text-eyebrow: 0.76rem;
  --osm-text-button: 0.82rem;
  --osm-text-code: 0.9em;
  --osm-line-tight: 1.06;
  --osm-line-heading: 1.16;
  --osm-line-body: 1.65;
  --osm-line-caption: 1.45;
  --osm-letter-normal: 0;
  --osm-letter-eyebrow: 0.16em;
  --osm-letter-button: 0.08em;
  --osm-measure: 68ch;
  --osm-measure-narrow: 54ch;

  /* 8-point spacing scale */
  --osm-space-0: 0;
  --osm-space-1: 0.5rem;
  --osm-space-2: 1rem;
  --osm-space-3: 1.5rem;
  --osm-space-4: 2rem;
  --osm-space-5: 2.5rem;
  --osm-space-6: 3rem;
  --osm-space-8: 4rem;
  --osm-space-10: 5rem;
  --osm-space-12: 6rem;
  --osm-space-14: 7rem;
  --osm-space-16: 8rem;
  --osm-section-space-sm: clamp(3rem, 7vw, 5rem);
  --osm-section-space: clamp(4rem, 9vw, 8rem);
  --osm-section-space-lg: clamp(5rem, 11vw, 10rem);
  --osm-container-pad: clamp(1.25rem, 4vw, 4rem);
  --osm-card-pad: clamp(1.25rem, 2vw, 2rem);
  --osm-button-pad-y: 0.875rem;
  --osm-button-pad-x: 1.25rem;

  /* Layout */
  --osm-container-sm: 760px;
  --osm-container-md: 1040px;
  --osm-container-lg: 1240px;
  --osm-container-xl: 1440px;
  --osm-grid-gap: clamp(1rem, 2vw, 2rem);

  /* Radius */
  --osm-radius-0: 0;
  --osm-radius-xs: 2px;
  --osm-radius-sm: 4px;
  --osm-radius-md: 6px;
  --osm-radius-lg: 8px;
  --osm-radius-pill: 999px;

  /* Elevation, shadows, opacity */
  --osm-shadow-xs: 0 1px 2px rgba(9, 11, 16, 0.08);
  --osm-shadow-sm: 0 8px 24px rgba(9, 11, 16, 0.1);
  --osm-shadow-md: 0 18px 50px rgba(9, 11, 16, 0.16);
  --osm-shadow-lg: 0 28px 80px rgba(9, 11, 16, 0.22);
  --osm-shadow-interaction: 0 10px 26px rgba(9, 11, 16, 0.12);
  --osm-shadow-interaction-dark: 0 12px 30px rgba(0, 0, 0, 0.22);
  --osm-shadow-focus: 0 0 0 3px rgba(210, 154, 114, 0.34);
  --osm-opacity-disabled: 0.48;
  --osm-opacity-muted: 0.72;
  --osm-opacity-subtle: 0.56;

  /* Transitions */
  --osm-duration-fast: 140ms;
  --osm-duration-base: 220ms;
  --osm-duration-slow: 360ms;
  --osm-interaction-duration-fast: 160ms;
  --osm-interaction-duration-base: 240ms;
  --osm-ease-standard: cubic-bezier(0.2, 0, 0.2, 1);
  --osm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --osm-interaction-lift: -2px;
  --osm-interaction-press: 1px;
  --osm-transition-base: color var(--osm-duration-base) var(--osm-ease-standard), background-color var(--osm-duration-base) var(--osm-ease-standard), border-color var(--osm-duration-base) var(--osm-ease-standard), box-shadow var(--osm-duration-base) var(--osm-ease-standard), opacity var(--osm-duration-base) var(--osm-ease-standard), text-decoration-color var(--osm-duration-base) var(--osm-ease-standard), text-underline-offset var(--osm-duration-base) var(--osm-ease-standard), transform var(--osm-duration-base) var(--osm-ease-standard);
  --osm-transition-interaction: color var(--osm-interaction-duration-base) var(--osm-ease-standard), background-color var(--osm-interaction-duration-base) var(--osm-ease-standard), border-color var(--osm-interaction-duration-base) var(--osm-ease-standard), box-shadow var(--osm-interaction-duration-base) var(--osm-ease-standard), opacity var(--osm-interaction-duration-base) var(--osm-ease-standard), text-decoration-color var(--osm-interaction-duration-base) var(--osm-ease-standard), text-underline-offset var(--osm-interaction-duration-base) var(--osm-ease-standard), transform var(--osm-interaction-duration-base) var(--osm-ease-standard);

  /* Z-index */
  --osm-z-base: 0;
  --osm-z-raised: 10;
  --osm-z-header: 100;
  --osm-z-overlay: 400;
  --osm-z-modal: 700;
  --osm-z-toast: 900;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  background: var(--osm-color-bg);
  color: var(--osm-color-text-primary);
  font-family: var(--osm-font-body);
  font-size: var(--osm-text-body);
  line-height: var(--osm-line-body);
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--osm-color-accent);
  color: var(--osm-color-midnight-navy);
}

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

:where(h1, h2, h3, h4, h5, h6) {
  color: inherit;
  font-family: var(--osm-font-display);
  font-weight: 400;
  letter-spacing: var(--osm-letter-normal);
  line-height: var(--osm-line-heading);
  margin-block: 0;
}

h1,
.osm-type-h1 {
  font-size: var(--osm-text-h1);
  line-height: var(--osm-line-tight);
}

h2,
.osm-type-h2 {
  font-size: var(--osm-text-h2);
}

h3,
.osm-type-h3 {
  font-size: var(--osm-text-h3);
}

h4,
.osm-type-h4 {
  font-size: var(--osm-text-h4);
}

h5,
.osm-type-h5 {
  font-family: var(--osm-font-body);
  font-size: var(--osm-text-h5);
  font-weight: 650;
}

h6,
.osm-type-h6 {
  font-family: var(--osm-font-body);
  font-size: var(--osm-text-h6);
  font-weight: 700;
}

p {
  margin-block: 0;
}

code,
kbd,
pre {
  font-family: var(--osm-font-code);
  font-size: var(--osm-text-code);
}

a {
  color: inherit;
  text-decoration-color: rgba(75, 80, 87, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: var(--osm-transition-interaction);
}

a:hover,
a:focus-visible {
  color: var(--osm-color-accent);
  text-decoration-color: currentColor;
  text-underline-offset: 0.24em;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--osm-color-focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(210, 154, 114, 0.18);
}

.wp-site-blocks {
  overflow: clip;
}

.osm-container {
  margin-inline: auto;
  max-width: var(--osm-container-lg);
  padding-inline: var(--osm-container-pad);
  width: 100%;
}

.osm-container--narrow {
  max-width: var(--osm-container-sm);
}

.osm-container--wide {
  max-width: var(--osm-container-xl);
}

.osm-measure {
  max-width: var(--osm-measure);
}

.osm-measure--narrow {
  max-width: var(--osm-measure-narrow);
}

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

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

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

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

.osm-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.osm-stack > * + * {
  margin-block-start: var(--osm-stack-gap, var(--osm-space-3));
}

.osm-cluster {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--osm-cluster-gap, var(--osm-space-2));
}

.osm-surface {
  background: var(--osm-color-surface);
  border: 1px solid var(--osm-color-border);
}

.osm-surface--dark {
  background: var(--osm-color-surface-dark);
  border-color: var(--osm-color-border-dark);
  color: var(--osm-color-text-on-dark);
}

.osm-elevated {
  background: var(--osm-color-surface-elevated);
  border: 1px solid var(--osm-color-border);
  box-shadow: var(--osm-shadow-sm);
}

.osm-eyebrow {
  color: var(--osm-color-accent);
  font-family: var(--osm-font-body);
  font-size: var(--osm-text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--osm-letter-eyebrow);
  line-height: var(--osm-line-caption);
  text-transform: uppercase;
}

.osm-body-large {
  font-size: var(--osm-text-body-lg);
  line-height: 1.58;
}

.osm-small {
  font-size: var(--osm-text-small);
  line-height: var(--osm-line-caption);
}

.osm-caption {
  color: var(--osm-color-text-muted);
  font-size: var(--osm-text-caption);
  line-height: var(--osm-line-caption);
}

.osm-muted {
  color: var(--osm-color-text-muted);
}

.osm-text-secondary {
  color: var(--osm-color-text-secondary);
}

.wp-element-button,
.wp-block-button__link,
.osm-button {
  align-items: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--osm-radius-xs);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--osm-font-body);
  font-size: var(--osm-text-button);
  font-weight: 700;
  justify-content: center;
  letter-spacing: var(--osm-letter-button);
  line-height: 1;
  min-height: 2.875rem;
  padding: var(--osm-button-pad-y) var(--osm-button-pad-x);
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--osm-transition-interaction);
}

.wp-element-button,
.wp-block-button__link,
.osm-button--primary {
  background: var(--osm-color-action);
  color: var(--osm-color-midnight-navy);
}

.wp-element-button:hover,
.wp-block-button__link:hover,
.osm-button--primary:hover,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
.osm-button--primary:focus-visible {
  background: var(--osm-color-action-hover);
  box-shadow: var(--osm-shadow-interaction);
  color: var(--osm-color-midnight-navy);
  transform: translate3d(0, var(--osm-interaction-lift), 0);
}

.wp-block-button.is-style-outline .wp-block-button__link,
.osm-button--secondary {
  background: transparent;
  border-color: var(--osm-color-accent);
  color: currentColor;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.osm-button--secondary:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible,
.osm-button--secondary:focus-visible {
  background: var(--osm-color-accent);
  box-shadow: var(--osm-shadow-interaction);
  color: var(--osm-color-midnight-navy);
  transform: translate3d(0, var(--osm-interaction-lift), 0);
}

.osm-button--text {
  background: transparent;
  border-color: transparent;
  color: inherit;
  min-height: auto;
  padding-inline: 0;
}

.osm-button--text:hover {
  background: transparent;
  color: var(--osm-color-accent);
  transform: none;
}

.osm-icon-button {
  aspect-ratio: 1;
  border-radius: var(--osm-radius-pill);
  min-height: 2.75rem;
  padding: 0;
  width: 2.75rem;
}

:where(.osm-button, .wp-element-button, .wp-block-button__link):active {
  box-shadow: var(--osm-shadow-xs);
  transform: translate3d(0, var(--osm-interaction-press), 0);
}

:where(.osm-button, .wp-element-button, .wp-block-button__link):disabled,
:where(.osm-button, .wp-element-button, .wp-block-button__link)[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: var(--osm-opacity-disabled);
  pointer-events: none;
  transform: none;
}

.osm-card {
  border: 1px solid var(--osm-color-border);
  border-radius: var(--osm-radius-md);
  padding: var(--osm-card-pad);
  transition: var(--osm-transition-interaction);
}

.osm-card:hover,
.osm-card:focus-within {
  border-color: var(--osm-color-border-strong);
  box-shadow: var(--osm-shadow-interaction);
  transform: translate3d(0, var(--osm-interaction-lift), 0);
}

.osm-card--service,
.osm-card--solution,
.osm-card--resource {
  background: var(--osm-color-surface-elevated);
}

.osm-card--editorial {
  background: transparent;
  border-inline: 0;
  border-radius: var(--osm-radius-0);
  padding-inline: 0;
}

.osm-card__meta {
  color: var(--osm-color-accent);
  font-size: var(--osm-text-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.osm-link,
.wp-block-navigation a {
  text-decoration: none;
}

.wp-block-navigation a:hover,
.osm-nav-link:hover {
  color: var(--osm-color-accent);
}

.has-midnight-navy-background-color a,
.has-deep-navy-background-color a,
.has-charcoal-background-color a,
.osm-surface--dark a {
  color: inherit;
}

.has-midnight-navy-background-color a:hover,
.has-deep-navy-background-color a:hover,
.has-charcoal-background-color a:hover,
.osm-surface--dark a:hover {
  color: var(--osm-color-champagne);
}

input,
textarea,
select {
  background: var(--osm-color-surface-elevated);
  border: 1px solid var(--osm-color-border);
  border-radius: var(--osm-radius-sm);
  color: var(--osm-color-text-primary);
  font: inherit;
  min-height: 3rem;
  padding: 0.875rem 1rem;
  transition: var(--osm-transition-interaction);
  width: 100%;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

select {
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--osm-color-text-muted);
  opacity: var(--osm-opacity-muted);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--osm-color-border-strong);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--osm-color-accent);
}

input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: var(--osm-opacity-disabled);
}

.osm-field {
  display: grid;
  gap: var(--osm-space-1);
}

.osm-label {
  color: var(--osm-color-text-secondary);
  font-size: var(--osm-text-small);
  font-weight: 650;
}

.osm-help {
  color: var(--osm-color-text-muted);
  font-size: var(--osm-text-caption);
}

.osm-error,
[aria-invalid="true"] + .osm-help {
  color: var(--osm-color-error);
}

[aria-invalid="true"] {
  border-color: var(--osm-color-error);
}

.osm-status--success {
  color: var(--osm-color-success);
}

.osm-status--warning {
  color: var(--osm-color-warning);
}

.osm-status--error {
  color: var(--osm-color-error);
}

.osm-divider {
  border-top: 1px solid currentColor;
  opacity: 0.55;
  width: 4rem;
}

@media (max-width: 781px) {
  :root {
    --osm-button-pad-y: 0.8125rem;
    --osm-button-pad-x: 1rem;
    --osm-card-pad: 1.25rem;
    --osm-grid-gap: 1rem;
  }

  .osm-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 782px) {
  :root {
    --osm-text-display: 5.25rem;
    --osm-text-h1: 4.25rem;
    --osm-text-h2: 3.25rem;
    --osm-text-h3: 2.125rem;
    --osm-text-h4: 1.5rem;
    --osm-text-body-lg: 1.1875rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --osm-text-display: 6.75rem;
    --osm-text-h1: 5.25rem;
    --osm-text-h2: 3.75rem;
    --osm-text-h3: 2.375rem;
    --osm-text-h4: 1.75rem;
    --osm-text-body-lg: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
