/* MarStack Tech Support — plain, typographic, built to be read. */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12151c;
  --bg-band: #1a1e28;
  --surface: #1c212c;
  --text: #f3efe6;
  --text-strong: #f7f3ea;
  --text-muted: #b7b3a8;
  --rule: #2c3140;
  --input-border: #6a7288;
  --accent: #d97845;
  --accent-hover: #e08a4f;
  --accent-soft: #2a201c;
  --on-accent: #1a120c;
  --focus: #f3efe6;
  --bar-bg: #0c0e14;
  --bar-text: #f3efe6;
  --header-h: 4.25rem;
  --mobile-bar: 4.5rem;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Helvetica Neue", sans-serif;
  --measure: 38rem;
  --content: 72rem;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f0e7;
  --bg-band: #e8e2d4;
  --surface: #fffcf7;
  --text: #1c2740;
  --text-strong: #141b2d;
  --text-muted: #4d5566;
  --rule: #d4cdbd;
  --input-border: #8a826e;
  --accent: #a3471a;
  --accent-hover: #863914;
  --accent-soft: #f3e4d8;
  --on-accent: #fffcf7;
  --focus: #1c2740;
  --bar-bg: #141b2d;
  --bar-text: #f4f0e7;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1000;
  background: var(--text-strong);
  color: var(--bg);
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--bg);
}

.wrap {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

h1, h2, h3, .logo-word {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-strong);
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.15rem);
  margin: 0 0 1.1rem;
  font-weight: 600;
  max-width: 16ch;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  margin: 0 0 0.85rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text);
}

.lede,
.section-intro {
  font-size: 1.2rem;
  max-width: var(--measure);
  color: var(--text);
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  text-decoration: none;
  color: var(--text-strong);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo:hover {
  color: var(--text-strong);
}

.logo-word {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo-sub {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem 1.15rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: 2px;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun,
html:not([data-theme]) .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}


.nav {
  display: none;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.nav a.btn {
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  line-height: 1.2;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  text-decoration: none;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
}

.btn-ghost,
.text-action {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.btn-ghost:hover,
.text-action:hover {
  color: var(--accent-hover);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin: 1.25rem 0 0.85rem;
}

/* Hero */

.hero {
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  gap: 2.25rem;
}

.hero-aside {
  background: var(--bg-band);
  padding: 1.25rem 1.35rem 1.4rem;
  border-left: 3px solid var(--accent);
  align-self: end;
}

.hero-aside h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.hero-aside p {
  margin-bottom: 0.65rem;
  font-size: 1rem;
}

.hero-aside p:last-child {
  margin-bottom: 0;
}

.trust-line {
  max-width: 36rem;
  font-size: 0.98rem;
  color: var(--text-muted);
  margin: 0;
}

.next-line {
  font-size: 1.15rem;
  max-width: 34rem;
  margin-bottom: 0.25rem;
}

/* Sections */

section {
  padding: 3.25rem 0;
  scroll-margin-top: 5.25rem;
}

.band {
  background: var(--bg-band);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.split {
  display: grid;
  gap: 1.75rem 3rem;
}

.split-head p:last-child {
  margin-bottom: 0;
}

.mid-cta {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.15rem;
}

.mid-cta p {
  margin: 0;
  font-size: 1.05rem;
}

.mid-cta .actions {
  margin: 0;
}

/* Services list, not a card grid */

.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.help-list li {
  padding: 1.15rem 0 1.2rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.25rem 1.5rem;
}

.help-list h3 {
  margin: 0;
  font-size: 1.28rem;
}

.help-list p {
  margin: 0;
  max-width: 40rem;
}

/* How it works */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem 1rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--rule);
}

.steps li:last-child {
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.15;
}

.steps h3 {
  margin: 0 0 0.25rem;
}

.steps p {
  margin: 0;
  max-width: 38rem;
}

/* Pricing */

.price-box {
  max-width: 42rem;
}

.rate-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.rate-list li {
  padding: 1.05rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.rate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.55rem;
}

.rate-head h3 {
  margin: 0;
  font-size: 1.28rem;
}

.rate-time {
  display: inline-block;
  margin-left: 0.4rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
}

.rate {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

.rate-alt {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.rate-list p {
  margin: 0;
  max-width: 40rem;
}

.price-promise {
  margin: 0 0 0.75rem;
  padding: 0.85rem 0 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--text-strong);
  max-width: 40rem;
}

/* FAQ */

.faq-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 1.1rem 2.2rem 1.1rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  position: relative;
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.05rem;
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.faq-item.is-open .faq-q::after {
  content: "–";
}

.faq-a {
  display: none;
  padding: 0 0 1.2rem;
  max-width: 40rem;
}

.faq-item.is-open .faq-a {
  display: block;
}

/* Contact */

#contact {
  scroll-margin-top: 5.5rem;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.5rem;
}

#ticket-form {
  width: 100%;
}

.form-status {
  margin: 0;
  color: var(--text-muted);
}

.fallback,
#chat-fallback {
  margin: 0;
}

#chat-fallback {
  margin-top: 0.75rem;
}

#chat-fallback.is-attention,
.fallback {
  background: var(--accent-soft);
  color: var(--text);
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
}

#chat-fallback.is-attention p,
.fallback p {
  color: var(--text);
  margin: 0;
}

.email-alt {
  margin-top: 1rem;
  font-size: 1rem;
}

.email-alt .text-action {
  display: inline;
  font-size: inherit;
  padding: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 6.5rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.site-footer p {
  color: var(--text-muted);
  margin: 0 0 0.4rem;
  max-width: 40rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

/* Mobile sticky bar */

.mobile-bar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
  background: var(--bar-bg);
  color: var(--bar-text);
  border-top: 1px solid var(--rule);
}

.mobile-bar .btn {
  flex: 1;
}

.mobile-bar .js-open-chat {
  color: var(--bar-text);
  font-weight: 700;
  text-underline-offset: 0.16em;
  white-space: nowrap;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}

.mobile-bar .js-open-chat:hover,
.mobile-bar .js-open-chat:focus-visible {
  color: var(--bar-text);
}

/* Zammad injected form: flatten wrappers so one card is the only surface. */

#ticket-form,
#ticket-form > div,
#ticket-form form,
#ticket-form .zammad-form {
  display: block;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-sizing: border-box;
}

#ticket-form h2,
#ticket-form .zammad-form h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem !important;
  max-width: none;
  color: var(--text-strong);
}

#ticket-form .form-group,
#ticket-form .zammad-form-group {
  margin: 0 0 0.95rem !important;
  padding: 0 !important;
  border: 0;
  background: transparent !important;
}

#ticket-form .form-group:last-of-type,
#ticket-form .zammad-form-group:last-of-type {
  margin-bottom: 1.15rem !important;
}

#ticket-form label,
#ticket-form .zammad-form label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  margin: 0 0 0.3rem !important;
  padding: 0;
  color: var(--text-strong);
  background: transparent;
}

#ticket-form input,
#ticket-form textarea,
#ticket-form select,
#ticket-form .zammad-form-control,
#ticket-form .form-control,
#ticket-form button,
#ticket-form input[type="submit"] {
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 2px;
  box-sizing: border-box;
}

#ticket-form input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]),
#ticket-form textarea,
#ticket-form select,
#ticket-form .zammad-form-control,
#ticket-form .form-control {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 1px solid var(--input-border) !important;
  background: var(--bg) !important;
  background-color: var(--bg) !important;
  color: var(--text-strong) !important;
  padding: 0.55rem 0.65rem !important;
  color-scheme: inherit;
}

#ticket-form textarea,
#ticket-form textarea.zammad-form-control,
#ticket-form textarea.form-control {
  min-height: 8rem;
  resize: vertical;
}

#ticket-form button,
#ticket-form button.btn,
#ticket-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  background: var(--accent) !important;
  background-color: var(--accent) !important;
  color: var(--on-accent) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 0.7rem 1.15rem !important;
  cursor: pointer;
}

#ticket-form button:hover,
#ticket-form button.btn:hover,
#ticket-form input[type="submit"]:hover {
  background: var(--accent-hover) !important;
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  color: var(--on-accent) !important;
}

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

#ticket-form input:-webkit-autofill,
#ticket-form textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text-strong);
  caret-color: var(--text-strong);
  box-shadow: 0 0 0 1000px var(--bg) inset;
}



@media (max-width: 719px) {
  h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
    max-width: none;
  }

  .hero {
    padding: 1.85rem 0 2.15rem;
  }

  .hero-aside {
    display: none;
  }

  .header-inner {
    min-height: 3.6rem;
  }

  body {
    padding-bottom: calc(var(--mobile-bar) + env(safe-area-inset-bottom));
  }

  .site-footer {
    padding-bottom: 2rem;
  }

  .mid-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .rate-head {
    flex-wrap: wrap;
  }

  .zammad-chat {
    bottom: calc(var(--mobile-bar) + 0.75rem + env(safe-area-inset-bottom)) !important;
    right: 0.75rem !important;
  }
}

/* Breakpoints */

@media (min-width: 720px) {
  .wrap {
    width: min(calc(100% - 3.5rem), var(--content));
  }

  .nav {
    display: flex;
  }

  .mobile-bar {
    display: none;
  }

  .site-footer {
    padding-bottom: 2.5rem;
  }

  .hero {
    padding: 4.25rem 0 4.75rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 0.7fr);
    align-items: end;
    gap: 3rem;
  }

  section {
    padding: 4.25rem 0;
  }

  .split {
    grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
  }

  .split-head {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }

  .help-list li {
    grid-template-columns: 20rem 1fr;
    align-items: baseline;
  }

  .form-panel {
    padding: 1.6rem;
  }

  .contact-split {
    grid-template-columns: minmax(14rem, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 1.15rem;
  }

  .hero-aside {
    margin-bottom: 0.4rem;
  }
}
