/** Critical CSS — Steadro Theme */

/* ============================================
   Reset (Josh Comeau inspired)
   ============================================ */
html {}

* {
  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);
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), #8B5CF6);
    transform-origin: left;
    transform: scaleX(0);
    animation: scrollProgress linear;
    animation-timeline: scroll(root);
    z-index: 10000;
    pointer-events: none;
  }
  @keyframes scrollProgress { to { transform: scaleX(1); } }
}

/* ============================================
   Noise / Grain Texture Overlay
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    opacity: 0.025;
  }
}
[data-theme="light"] body::before { opacity: 0.04; }

/* ============================================
   Animated Gradient Glow Borders
   ============================================ */
@property --card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bento__card--service,
  .bento__card--step,
  .bento__card--checklist,
  .bento__card--cta {
    position: relative;
  }

  .bento__card--service::before,
  .bento__card--step::before,
  .bento__card--checklist::before,
  .bento__card--cta::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(from var(--card-angle), transparent 25%, rgba(201,136,74,0.4) 50%, transparent 75%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
    animation: spinBorder 3s linear infinite;
  }

  .bento__card--service::after,
  .bento__card--step::after,
  .bento__card--checklist::after,
  .bento__card--cta::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: var(--color-surface);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
  }

  .bento__card--step::after {
    background: var(--color-surface-dark);
  }

  .bento__card--cta::after {
    background: var(--color-surface-dark);
  }

  .bento__card--service:hover::before,
  .bento__card--step:hover::before,
  .bento__card--checklist:hover::before,
  .bento__card--cta:hover::before,
  .bento__card--service:hover::after,
  .bento__card--step:hover::after,
  .bento__card--checklist:hover::after,
  .bento__card--cta:hover::after {
    opacity: 1;
  }

  @keyframes spinBorder {
    to { --card-angle: 360deg; }
  }

  [data-theme="light"] .bento__card--service::before,
  [data-theme="light"] .bento__card--step::before,
  [data-theme="light"] .bento__card--checklist::before,
  [data-theme="light"] .bento__card--cta::before {
    background: conic-gradient(from var(--card-angle), transparent 25%, rgba(30,40,80,0.3) 50%, transparent 75%);
  }
}

/* ============================================
   JS-powered animation initial states
   ============================================ */
.js-loaded .bento__eyebrow,
.js-loaded .bento__hero-heading,
.js-loaded .bento__hero-subhead,
.js-loaded .bento__card--hero-main .bento__btn--accent,
.js-loaded .bento__section-header,
.js-loaded .bento__row--services .bento__card--service,
.js-loaded .bento__row--comparison .bento__card--comparison,
.js-loaded .bento__row--steps .bento__card--step,
.js-loaded .bento__row--bottom,
.js-loaded .about-hero__heading,
.js-loaded .about-hero__subheadline,
.js-loaded .about-bio__row,
.js-loaded .about-section--spaced .about-bento__container {
  opacity: 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;
  }

  .js-loaded .bento__eyebrow,
  .js-loaded .bento__hero-heading,
  .js-loaded .bento__hero-subhead,
  .js-loaded .bento__card--hero-main .bento__btn--accent,
  .js-loaded .bento__section-header,
  .js-loaded .bento__row--services .bento__card--service,
  .js-loaded .bento__row--comparison .bento__card--comparison,
  .js-loaded .bento__row--steps .bento__card--step,
  .js-loaded .bento__row--bottom,
  .js-loaded .about-hero__heading,
  .js-loaded .about-hero__subheadline,
  .js-loaded .about-bio__row,
  .js-loaded .about-section--spaced .about-bento__container {
    opacity: 1 !important;
    transform: none !important;
  }

  html { scroll-behavior: auto; }
}
