:root {
  /* Brand */
  --s2w-primary: #efff00;
  --s2w-yellow: #efff00;
  --s2w-ink: #191919;
  --s2w-black: #000000;
  --s2w-white: #ffffff;
  --s2w-light-gray: #eeecec;
  --s2w-accent: #4d538f;

  /* Semantic text */
  --s2w-text: #191919;
  --s2w-text-secondary: #545454;
  --s2w-text-muted: #6a6a6a;
  --s2w-text-disabled: #999999;
  --s2w-text-inverse: #ffffff;

  /* Surfaces */
  --s2w-surface: #f7f7f5;
  --s2w-surface-2: #eeecec;
  --s2w-surface-dark: #191919;
  --s2w-surface-accent: #efff00;

  /* Borders */
  --s2w-border: rgba(25, 25, 25, 0.14);
  --s2w-border-strong: rgba(25, 25, 25, 0.28);
  --s2w-border-inverse: rgba(255, 255, 255, 0.18);

  /* Functional colors */
  --s2w-success: #1f7a4d;
  --s2w-warning: #9a6700;
  --s2w-danger: #b42318;
  --s2w-info: #4d538f;

  /* Typography */
  --s2w-font: "Rubik", Arial, Helvetica, sans-serif;
  --s2w-weight-light: 300;
  --s2w-weight-regular: 400;
  --s2w-weight-medium: 500;
  --s2w-weight-semibold: 600;
  --s2w-weight-bold: 700;
  --s2w-weight-black: 900;
  --s2w-font-size-meta: 0.875rem;
  --s2w-display-tracking: -0.04em;

  /* Layout */
  --s2w-container: 1200px;
  --s2w-container-wide: 1360px;
  --s2w-content: 760px;

  /* Spacing */
  --s2w-space-1: 0.25rem;
  --s2w-space-2: 0.5rem;
  --s2w-space-3: 0.75rem;
  --s2w-space-4: 1rem;
  --s2w-space-5: 1.5rem;
  --s2w-space-6: 2rem;
  --s2w-space-7: 3rem;
  --s2w-space-8: 4rem;
  --s2w-space-9: 6rem;
  --s2w-space-10: 8rem;

  /* Shape */
  --s2w-radius-sm: 8px;
  --s2w-radius-md: 12px;
  --s2w-radius-lg: 18px;
  --s2w-radius-xl: 24px;
  --s2w-radius-pill: 999px;

  /* Elevation */
  --s2w-shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.05);
  --s2w-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.06);
  --s2w-shadow-md: 0 18px 48px rgba(0, 0, 0, 0.10);

  /* Motion */
  --s2w-motion-fast: 120ms ease;
  --s2w-transition: 180ms ease;
  --s2w-motion-complex: 240ms ease;

  /* Controls */
  --s2w-control-height: 48px;
  --s2w-control-height-lg: 54px;
  --s2w-touch-target: 44px;
}

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

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--s2w-text);
  background: var(--s2w-white);
  font-family: var(--s2w-font);
  font-size: 16px;
  font-weight: var(--s2w-weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.s2w-nav-open {
  overflow-y: hidden;
}

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

iframe {
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--s2w-text);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.625rem, 6.5vw, 5.5rem);
  font-weight: var(--s2w-weight-black);
  line-height: 1;
  letter-spacing: -0.04em;
}

@media (min-width: 981px) {
  h1 {
    font-size: clamp(3.25rem, 4vw, 4rem);
  }
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: var(--s2w-weight-bold);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: var(--s2w-weight-bold);
  line-height: 1.15;
}

h4 {
  font-size: clamp(1.1875rem, 2vw, 1.5rem);
  font-weight: var(--s2w-weight-semibold);
  line-height: 1.2;
}

p,
li {
  color: var(--s2w-text-secondary);
}

small {
  font-size: 0.875rem;
  line-height: 1.5;
}

::selection {
  color: var(--s2w-ink);
  background: var(--s2w-primary);
}

:focus-visible {
  outline: 3px solid var(--s2w-accent);
  outline-offset: 3px;
}

.s2w-container,
.s2w-container--wide,
.s2w-content {
  width: min(100% - 32px, var(--s2w-container));
  margin-inline: auto;
}

.s2w-container--wide {
  width: min(100% - 32px, var(--s2w-container-wide));
}

.s2w-content {
  width: min(100% - 32px, var(--s2w-content));
}

.s2w-main {
  min-height: 60vh;
}

.s2w-section {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.s2w-section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

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

.s2w-section--dark {
  color: var(--s2w-white);
  background: var(--s2w-surface-dark);
}

.s2w-section--dark h1,
.s2w-section--dark h2,
.s2w-section--dark h3,
.s2w-section--dark h4,
.s2w-section--dark h5,
.s2w-section--dark h6,
.s2w-section--dark .s2w-eyebrow {
  color: var(--s2w-white);
}

.s2w-section--dark p,
.s2w-section--dark li,
.s2w-section--dark .s2w-lead {
  color: rgba(255, 255, 255, .72);
}

.s2w-section--primary {
  background: var(--s2w-primary);
}

.s2w-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.s2w-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.s2w-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.s2w-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.s2w-stack > * + * {
  margin-top: var(--s2w-space-5);
}

.s2w-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--s2w-text);
  font-size: var(--s2w-font-size-meta);
  font-weight: var(--s2w-weight-bold);
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.s2w-eyebrow::before {
  width: 1.5rem;
  height: 3px;
  background: var(--s2w-primary);
  content: "";
  transform: skewX(-20deg);
}

.s2w-lead {
  max-width: 62ch;
  color: var(--s2w-text-secondary);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
}

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

/* Buttons: charcoal is the default product CTA; yellow is deliberate accent. */
.s2w-btn,
.wp-element-button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  min-height: var(--s2w-control-height);
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--s2w-ink);
  border-radius: var(--s2w-radius-pill);
  color: var(--s2w-white);
  background: var(--s2w-ink);
  box-shadow: none;
  cursor: pointer;
  font-weight: var(--s2w-weight-semibold);
  line-height: 1;
  text-decoration: none;
  transition: transform var(--s2w-transition), background var(--s2w-transition), color var(--s2w-transition), border-color var(--s2w-transition), opacity var(--s2w-transition);
}

.s2w-btn:hover,
.wp-element-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  color: var(--s2w-white);
  background: var(--s2w-black);
  transform: translateY(-1px);
}

.s2w-btn:active,
.wp-element-button:active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: none;
}

.s2w-btn:disabled,
.s2w-btn[aria-disabled="true"],
button[type="submit"]:disabled,
input[type="submit"]:disabled {
  border-color: var(--s2w-surface-2);
  color: var(--s2w-text-disabled);
  background: var(--s2w-surface-2);
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

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

.s2w-btn--accent:hover {
  border-color: var(--s2w-ink);
  color: var(--s2w-ink);
  background: var(--s2w-white);
}

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

.s2w-btn--secondary:hover,
.s2w-btn--ghost:hover {
  border-color: var(--s2w-ink);
  color: var(--s2w-ink);
  background: var(--s2w-surface-2);
}

/* Backward-compatible alias while existing templates are migrated. */
.s2w-btn--dark {
  color: var(--s2w-white);
  background: var(--s2w-ink);
}

.s2w-btn--dark:hover {
  color: var(--s2w-white);
  background: var(--s2w-black);
}

.s2w-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--s2w-border);
  border-radius: var(--s2w-radius-lg);
  background: var(--s2w-white);
  box-shadow: none;
}

.s2w-card--elevated {
  box-shadow: var(--s2w-shadow-sm);
}

.s2w-card--flat {
  box-shadow: none;
}

.s2w-card__kicker {
  margin-bottom: 0.7rem;
  color: var(--s2w-accent);
  font-size: var(--s2w-font-size-meta);
  font-weight: var(--s2w-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.s2w-card__title {
  margin-bottom: 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.s2w-card__text {
  margin-bottom: 0;
}

.s2w-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: var(--s2w-radius-pill);
  color: var(--s2w-ink);
  background: var(--s2w-surface-2);
  font-size: var(--s2w-font-size-meta);
  font-weight: var(--s2w-weight-semibold);
  line-height: 1.2;
}

.s2w-badge--primary,
.s2w-badge--accent {
  background: var(--s2w-primary);
}

.s2w-badge--dark,
.s2w-badge[aria-pressed="true"] {
  color: var(--s2w-white);
  background: var(--s2w-ink);
}

.s2w-badge--success {
  color: var(--s2w-white);
  background: var(--s2w-success);
}

.s2w-badge--warning {
  border: 1px solid rgba(154, 103, 0, .28);
  color: #6f4a00;
  background: rgba(154, 103, 0, .12);
}

.s2w-badge--danger,
.s2w-badge--error {
  color: var(--s2w-white);
  background: var(--s2w-danger);
}

.s2w-badge--info {
  color: var(--s2w-white);
  background: var(--s2w-info);
}

.s2w-form-row {
  display: grid;
  gap: 0.45rem;
}

label {
  color: var(--s2w-ink);
  font-size: 0.875rem;
  font-weight: var(--s2w-weight-semibold);
  line-height: 1.3;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
textarea,
select {
  width: 100%;
  min-height: var(--s2w-control-height);
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--s2w-border-strong);
  border-radius: var(--s2w-radius-md);
  color: var(--s2w-ink);
  background: var(--s2w-white);
  transition: border-color var(--s2w-transition), box-shadow var(--s2w-transition), background var(--s2w-transition);
}

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

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--s2w-accent);
  box-shadow: 0 0 0 4px rgba(77, 83, 143, 0.12);
  outline: 0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):disabled,
textarea:disabled,
select:disabled {
  border-color: var(--s2w-border);
  color: var(--s2w-text-disabled);
  background: var(--s2w-surface);
  cursor: not-allowed;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--s2w-accent);
}

.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 {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 99999;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  border-radius: var(--s2w-radius-sm);
  color: var(--s2w-white);
  background: var(--s2w-ink);
}

@media (max-width: 900px) {
  .s2w-grid--3,
  .s2w-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .s2w-container,
  .s2w-container--wide,
  .s2w-content {
    width: min(100% - 24px, var(--s2w-container));
  }

  .s2w-grid--2,
  .s2w-grid--3,
  .s2w-grid--4 {
    grid-template-columns: 1fr;
  }
}

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

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