/* Stedholm theme layer: the crafted details theme.json cannot express.
   Palette/type/spacing tokens come from theme.json custom properties. */

/* ---------------------------------------------------------------- focus */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--wp--preset--color--brass-600);
  outline-offset: 2px;
  border-radius: 2px;
}
.sted-dark :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline-color: var(--wp--preset--color--brass-300);
}

/* ------------------------------------------------------------ skip link
   Core injects the block-theme skip link; brand its focused state. */
.skip-link:focus {
  background: var(--wp--preset--color--spruce-900);
  color: var(--wp--preset--color--paper-0);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  outline: 2px solid var(--wp--preset--color--brass-400);
}

/* ------------------------------------------------------------- headings */
h1, h2, h3 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* --------------------------------------------------------------- header */
.sted-header {
  border-bottom: var(--wp--custom--hairline);
  background: var(--wp--preset--color--paper-0);
}
.sted-header .sted-logo svg {
  height: 34px;
  width: auto;
  display: block;
}
.sted-header .wp-block-navigation a {
  text-decoration: none;
  color: var(--wp--preset--color--spruce-900);
}
.sted-header .wp-block-navigation a:hover,
.sted-header .wp-block-navigation .current-menu-item > a {
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--brass-400);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Mobile nav overlay inherits the paper ground */
.wp-block-navigation__responsive-container.has-modal-open {
  background: var(--wp--preset--color--paper-0) !important;
}

/* Small screens: the hero and CTA band carry conversion; the header button
   would wrap and crowd the hamburger. */
@media (max-width: 781px) {
  .sted-header-cta {
    display: none;
  }
}

/* --------------------------------------------------------------- footer */
.sted-footer {
  background: var(--wp--preset--color--spruce-950);
  color: var(--wp--preset--color--spruce-200);
}
.sted-footer .sted-logo svg {
  height: 30px;
  width: auto;
}
.sted-footer a {
  color: var(--wp--preset--color--paper-50);
  text-decoration: none;
}
.sted-footer a:hover {
  color: var(--wp--preset--color--brass-300);
  text-decoration: underline;
}
.sted-footer .sted-footer-heading {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brass-300);
}
.sted-footer .sted-footer-fine {
  color: var(--wp--preset--color--spruce-200);
  font-size: 0.875rem;
}
.sted-footer ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.sted-footer ul li + li {
  margin-top: 0.45rem;
}

/* ----------------------------------------------------------- dark bands */
.sted-dark {
  color: var(--wp--preset--color--paper-0);
}
.sted-dark :where(h1, h2, h3, h4) {
  color: var(--wp--preset--color--paper-0);
}
.sted-dark p {
  color: var(--wp--preset--color--spruce-200);
}
.sted-dark a:not(.wp-block-button__link) {
  color: var(--wp--preset--color--brass-300);
}
.sted-dark a:not(.wp-block-button__link):hover {
  color: var(--wp--preset--color--brass-200);
}

/* ------------------------------------------------------------ breadcrumbs */
.sted-crumbs {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  color: var(--wp--preset--color--stone-600);
}
.sted-crumbs a {
  color: var(--wp--preset--color--stone-600);
  text-decoration: none;
}
.sted-crumbs a:hover {
  color: var(--wp--preset--color--brass-700);
  text-decoration: underline;
}
.home .sted-crumbs,
.blog .sted-crumbs {
  display: none;
}

/* ----------------------------------------------------------------- hero */
.sted-hero h1 {
  font-size: var(--wp--preset--font-size--display);
  max-width: 24ch;
  line-height: 1.05;
}
.sted-hero p.has-large-font-size {
  max-width: 62ch;
}

/* ---------------------------------------------------------------- eyebrow */
.sted-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--brass-600);
  margin-bottom: 0.5rem;
}
.sted-dark .sted-eyebrow {
  color: var(--wp--preset--color--brass-300);
}

/* ------------------------------------------------------------- survey rule
   The brand's engineering-drawing detail: a strong line with two strata. */
.sted-survey {
  display: block;
  border: 0;
  border-top: 2px solid currentColor;
  position: relative;
  margin: 0;
  width: 72px;
  color: var(--wp--preset--color--brass-400);
}
.sted-survey::before,
.sted-survey::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 24px;
  top: 5px;
  border-top: 1px solid currentColor;
}
.sted-survey::after {
  left: 24px;
  right: 36px;
  top: 10px;
}

/* ----------------------------------------------------------------- cards */
.sted-card {
  background: var(--wp--preset--color--paper-50);
  border: var(--wp--custom--hairline);
  border-radius: 2px;
  padding: 1.75rem;
  height: 100%;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.sted-card:hover {
  border-color: var(--wp--preset--color--spruce-700);
  transform: translateY(-2px);
}
.sted-card h3, .sted-card h4 {
  margin-top: 0;
}
.sted-card .sted-card-tag {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--stone-600);
}
.sted-card a.sted-card-link {
  text-decoration: none;
  color: inherit;
}
.sted-card a.sted-card-link:hover {
  color: inherit;
}
.sted-card a.sted-card-link .sted-card-more {
  color: var(--wp--preset--color--brass-600);
  font-weight: 600;
}
.sted-card a.sted-card-link:hover .sted-card-more {
  text-decoration: underline;
}
.sted-dark .sted-card {
  background: var(--wp--preset--color--spruce-800);
  border: var(--wp--custom--hairlineDark);
}

/* --------------------------------------------------------------- buttons */
.wp-block-button__link {
  border-radius: 2px;
}
.is-style-brass .wp-block-button__link {
  background: var(--wp--preset--color--brass-400);
  color: var(--wp--preset--color--spruce-950);
}
.is-style-brass .wp-block-button__link:hover {
  background: var(--wp--preset--color--brass-300);
  color: var(--wp--preset--color--spruce-950);
}
.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--spruce-900);
  border: 1px solid var(--wp--preset--color--spruce-900);
  padding-top: calc(0.8rem - 1px);
  padding-bottom: calc(0.8rem - 1px);
}
.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--spruce-900);
  color: var(--wp--preset--color--paper-0);
}
.sted-dark .is-style-outline .wp-block-button__link {
  color: var(--wp--preset--color--paper-0);
  border-color: var(--wp--preset--color--spruce-200);
}
.sted-dark .is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--paper-0);
  color: var(--wp--preset--color--spruce-950);
}

/* --------------------------------------------------------------- numbered steps */
.sted-steps {
  counter-reset: sted-step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.sted-steps > li {
  counter-increment: sted-step;
  border-top: var(--wp--custom--hairline);
  padding: 1.5rem 0 1.5rem 4.25rem;
  position: relative;
}
.sted-steps > li:last-child {
  border-bottom: var(--wp--custom--hairline);
}
.sted-steps > li::before {
  content: "0" counter(sted-step);
  position: absolute;
  left: 0;
  top: 1.65rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.9375rem;
  color: var(--wp--preset--color--brass-600);
}
.sted-steps h3, .sted-steps h4 {
  margin: 0 0 0.35rem;
  font-size: var(--wp--preset--font-size--large);
}
.sted-steps p {
  margin: 0;
  color: var(--wp--preset--color--stone-700);
}

/* --------------------------------------------------------------- def list */
.sted-deflist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem 2.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.sted-deflist > li {
  border-top: 2px solid var(--wp--preset--color--spruce-900);
  padding-top: 0.9rem;
}
.sted-deflist h3, .sted-deflist h4 {
  margin: 0 0 0.3rem;
  font-size: 1.0625rem;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  letter-spacing: 0;
}
.sted-deflist p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--stone-700);
}

/* ------------------------------------------------------------------- FAQ */
.sted-faq details {
  border-top: var(--wp--custom--hairline);
}
.sted-faq details:last-child {
  border-bottom: var(--wp--custom--hairline);
}
.sted-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 600;
  font-size: 1.0625rem;
}
.sted-faq summary::-webkit-details-marker { display: none; }
.sted-faq summary::after {
  content: "+";
  font-family: var(--wp--preset--font-family--mono);
  color: var(--wp--preset--color--brass-600);
  flex: none;
}
.sted-faq details[open] summary::after {
  content: "\2212";
}
.sted-faq .sted-faq-a {
  padding: 0 0 1.25rem;
  max-width: 62ch;
  color: var(--wp--preset--color--stone-700);
}

/* ----------------------------------------------------------------- forms */
.sted-form {
  display: grid;
  gap: 1.1rem;
}
.sted-form .sted-field {
  display: grid;
  gap: 0.35rem;
}
.sted-form label {
  font-weight: 600;
  font-size: 0.9375rem;
}
.sted-form .sted-optional {
  color: var(--wp--preset--color--stone-600);
  font-weight: 400;
}
.sted-form input[type="text"],
.sted-form input[type="email"],
.sted-form input[type="tel"],
.sted-form select,
.sted-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--wp--preset--color--spruce-900);
  background: var(--wp--preset--color--paper-0);
  border: 1px solid var(--wp--preset--color--stone-500);
  border-radius: 2px;
}
.sted-form textarea { min-height: 9rem; resize: vertical; }
.sted-form .sted-error-msg {
  color: var(--wp--preset--color--error);
  font-size: 0.9375rem;
  font-weight: 600;
}
.sted-form .sted-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
.sted-form-notice {
  border: 1px solid var(--wp--preset--color--success);
  border-left-width: 3px;
  background: var(--wp--preset--color--paper-50);
  padding: 1rem 1.25rem;
  border-radius: 2px;
}
.sted-form-notice.is-error {
  border-color: var(--wp--preset--color--error);
}

/* -------------------------------------------------------------- articles */
.sted-article-meta {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--stone-600);
}
.sted-prose > * + * { margin-top: 1.1rem; }
.sted-prose h2 { margin-top: 2.5rem; }
.sted-prose h3 { margin-top: 2rem; }
.sted-prose li + li { margin-top: 0.4rem; }
.sted-prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}
.sted-prose th, .sted-prose td {
  border: var(--wp--custom--hairline);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.sted-prose th {
  background: var(--wp--preset--color--paper-100);
  font-weight: 600;
}

/* --------------------------------------------------------------- tables (blocks) */
.wp-block-table table { border-collapse: collapse; }
.wp-block-table th { background: var(--wp--preset--color--paper-100); }
.wp-block-table th, .wp-block-table td {
  border: var(--wp--custom--hairline);
  padding: 0.6rem 0.8rem;
}

/* --------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sted-card:hover { transform: none; }
}
