/** Critical CSS — Steadro Theme */

/* ============================================
   Reset (Josh Comeau inspired)
   ============================================ */
html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100svh;
}

html:has(dialog[scroll-lock][open], details[scroll-lock][open]) {
  overflow: hidden;
}

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

input,
textarea,
select {
  font: inherit;
  border-radius: var(--style-border-radius-inputs);
}

select {
  background-color: var(--color-page-body);
  color: currentcolor;
}

dialog {
  background-color: var(--color-page-body);
  color: var(--color-text);
}

p {
  text-wrap: pretty;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p:empty {
  display: none;
}

:is(p, h1, h2, h3, h4, h5, h6):first-child,
:empty:first-child + :where(p, h1, h2, h3, h4, h5, h6) {
  margin-block-start: 0;
}

:is(p, h1, h2, h3, h4, h5, h6):last-child,
:where(p, h1, h2, h3, h4, h5, h6) + :has(+ :empty:last-child) {
  margin-block-end: 0;
}

/* ============================================
   Body & Typography Defaults
   ============================================ */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  background-color: var(--color-page-body);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-heading);
}

h1 {
  font-size: 54px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

h2 {
  font-size: 38px;
  letter-spacing: 1px;
  line-height: 1.25;
}

h3 {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.3;
}

a {
  color: var(--color-heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-heading);
}

/* ============================================
   Focus styles
   ============================================ */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--color-heading);
  color: var(--color-heading);
  padding: 12px 28px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.25s, box-shadow 0.25s;
}

.btn:hover {
  background: var(--color-heading);
  color: var(--color-page-body);
  border-color: var(--color-heading);
}

.btn--primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--color-accent);
  border: none;
  padding: 16px 36px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: all 0.25s;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(var(--color-accent-rgb), 0.25);
}

.btn--ghost {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: all 0.2s;
}

.btn--ghost:hover {
  color: var(--color-heading);
  border-color: var(--color-heading);
}

/* ============================================
   Section Label utility
   ============================================ */
.section-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-label--dark {
  color: var(--color-accent-btn);
}

/* ============================================
   Fade-in Animation
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Utility: Dark Section
   ============================================ */
.section-dark {
  --color-card-bg: var(--color-slate);
  --color-border: var(--color-slate-border);
  --color-heading: var(--color-slate-text);
  --color-text: var(--color-slate-body);
  --color-muted: var(--color-slate-muted);
  --color-accent-line: var(--color-slate-accent);
  --color-tagline: var(--color-slate-muted);
  background-color: var(--color-slate);
  color: var(--color-slate-text);
}

.section-dark .btn {
  border-color: var(--color-slate-accent);
  color: var(--color-slate-text);
}

.section-dark .btn:hover {
  border-color: var(--color-slate-text);
  background: rgba(232, 230, 225, 0.05);
  color: var(--color-slate-text);
}

.section-dark .btn--primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
}

.section-dark .btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* ============================================
   Utility: Alternate Section
   ============================================ */
.section-alt {
  background-color: var(--color-section-alt);
}

/* ============================================
   Form Fields
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--btn-radius);
  color: var(--color-text);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-muted);
  outline: none;
}

label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-tagline);
  margin-bottom: 8px;
}

/* ============================================
   Section Layout (Skeleton grid system)
   ============================================ */
.shopify-section {
  --content-width: min(
    calc(var(--page-width) - var(--page-margin) * 2),
    calc(100% - var(--page-margin) * 2)
  );
  --content-margin: minmax(var(--page-margin), 1fr);
  --content-grid: var(--content-margin) var(--content-width) var(--content-margin);

  position: relative;
  grid-template-columns: var(--content-grid);
  display: grid;
  width: 100%;
}

.shopify-section > * {
  grid-column: 2;
}

.shopify-section > .full-width {
  grid-column: 1 / -1;
}

/* ============================================
   Skip to Content
   ============================================ */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-page-body);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  text-decoration: none;
  font-size: 14px;
}

.skip-to-content:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
}

/* ============================================
   Utility: Visually Hidden (a11y)
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Utility: Section Padding
   ============================================ */
.section-padded {
  padding: var(--section-padding-y) 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  :root {
    --section-padding-y: 28px;
    --section-padding-x: 24px;
  }

  h1 {
    font-size: 40px;
    letter-spacing: -0.3px;
  }

  h2 {
    font-size: 28px;
    letter-spacing: 0;
  }

  h3 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 26px;
  }

  h3 {
    font-size: 18px;
  }
}

/* ============================================
   Reduced 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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
