/* Wicked Commerce. Hand-written, no framework. Dark theme only, matching the live site. */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree_n5.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/figtree_n7.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree_i5.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/figtree_i7.woff2") format("woff2"); }
@font-face { font-family: "Allerta Stencil"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/AllertaStencil-Regular.ttf") format("truetype"); }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/alegreyasans_n5.woff2") format("woff2"); }

:root {
  --color-bg: #1f1f21;
  --color-text: #ffffff;
  --color-accent: #E3FC02;
  --color-accent-2: #5762D5;
  --color-surface: #EAE6E5;
  --color-surface-text: #1f1f21;
  --color-on-accent: #1f1f21;
  --color-border: rgba(255, 255, 255, 0.25);
  --focus: var(--color-accent);

  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Allerta Stencil", "Alegreya Sans", sans-serif;
  --heading-tracking: calc(1.333 * 0.04em * -1);
  --shadow-button: 4px 6px 5px rgba(0, 0, 0, 0.5);

  --page-width: 1600px;
  --content-width: 72rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-space: 36px;
  color-scheme: dark;
}
@media (min-width: 750px) { :root { --section-space: 52px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; object-fit: cover; }
a { color: var(--color-accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
em { font-style: italic; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.surface { --focus: var(--color-accent-2); background: var(--color-surface); color: var(--color-surface-text); }
.surface a:not(.button) { color: var(--color-surface-text); }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.15; letter-spacing: var(--heading-tracking); margin: 0 0 0.6em; }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.brand-e { font-style: italic; color: var(--color-accent); }
.surface .brand-e { color: inherit; }

.container { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--content-width) + 2 * var(--gutter)); }
.section { padding-block: var(--section-space); }
.section--center { text-align: center; }
.section--light { padding-block: calc(var(--section-space) * 1.2); }
.lead { font-size: 1.3rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: var(--gutter); top: -5rem; z-index: 100; padding: 0.6rem 1rem; background: var(--color-accent); color: var(--color-on-accent); font-weight: 700; }
.skip-link:focus { top: 0.5rem; }

/* Header and nav */
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1rem; }
.logo { display: block; line-height: 0; }
.logo img { width: min(300px, 62vw); height: auto; }
.nav-toggle summary { cursor: pointer; padding: 0.5rem 1rem; border: 2px solid var(--color-accent); color: var(--color-accent); list-style: none; font-weight: 700; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-list, .footer-list { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; flex-direction: column; gap: 0.25rem; padding-block: 0.75rem; }
.nav-list a { display: block; padding: 0.4rem 0; color: var(--color-text); text-decoration: none; font-weight: 700; }
.nav-list a:hover { color: var(--color-accent); }
.nav-list a[aria-current] { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (max-width: 989.98px) { .nav-toggle[open] { flex-basis: 100%; } }
/* Wide screens: show the nav inline. Needs ::details-content; otherwise the Menu toggle stays. */
@media (min-width: 990px) {
  @supports selector(::details-content) {
    .nav-toggle summary { display: none; }
    .nav-toggle::details-content { content-visibility: visible; display: block; }
    .nav-list { flex-direction: row; gap: 2rem; padding-block: 0; }
  }
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: 2px solid var(--color-accent);
  border-radius: 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-button);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 4px 8px 7px rgba(0, 0, 0, 0.5); }
.button--outline { background: transparent; color: var(--color-accent); }
.button--dark { background: var(--color-bg); border-color: var(--color-bg); color: var(--color-accent); }
.button--outline-dark { background: transparent; border-color: var(--color-surface-text); color: var(--color-surface-text); }
.surface a.button--outline-dark { color: var(--color-surface-text); }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* Image with text (home hero, service pages) */
.feature { display: grid; gap: 1.5rem 3rem; align-items: center; }
.feature-media img { width: 100%; aspect-ratio: 3 / 2; }
.feature-text p { max-width: 42rem; }
@media (min-width: 990px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--reverse .feature-media { order: 2; }
}
.banner img { width: 100%; height: clamp(240px, 40vw, 560px); object-position: 31% 49%; }

/* Cards */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 750px) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; } }
@media (min-width: 990px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; }
.card-media img { width: 100%; aspect-ratio: 3 / 2; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.card-body :is(h2, h3), .card-title { font-size: 1.5rem; margin-bottom: 0.5em; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-body :is(h2, h3) { display: flex; align-items: center; gap: 0.6rem; }
.icon { flex: none; display: inline-flex; width: 2.2rem; height: 2.2rem; }
.icon svg { width: 100%; height: 100%; fill: currentColor; }
.card-body .link-arrow { margin-top: auto; }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " \2192"; }
.link-arrow--back::after { content: none; }
.link-arrow--back::before { content: "\2190  "; }
.link-arrow:hover { text-decoration: underline; }
.meta { font-size: 0.95rem; opacity: 0.8; }

/* Prose (long copy) */
.prose { overflow-wrap: break-word; }
.prose > h1 { margin-bottom: 0.5em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
.prose h3 { margin-top: 1.6em; font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); }
.prose p, .prose li { max-width: 75ch; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose code { font-size: 0.95em; padding: 0.1em 0.3em; background: rgba(255, 255, 255, 0.12); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border: 1px solid var(--color-border); }
.prose th { background: rgba(255, 255, 255, 0.08); }
.prose td ul { margin: 0; }
.surface.prose code, .surface .prose code { background: rgba(0, 0, 0, 0.08); }
.eyebrow { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--color-accent); }

/* Blog post */
.post-body { display: flow-root; }
.figure-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 1.5rem 0; }
.figure-row img { flex: 1 1 260px; min-width: 0; width: 100%; max-width: 480px; height: auto; object-fit: contain; }
.float-right { width: 100%; max-width: 480px; height: auto; margin: 0 0 1rem; object-fit: contain; }
@media (min-width: 750px) { .float-right { float: right; width: 50%; margin: 0 0 1rem 1.5rem; } }
.back { margin-top: 2.5rem; }

/* Service prev / next */
.service-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding-block: var(--section-space); }
.service-nav a { text-decoration: none; font-weight: 700; }
.service-nav a:hover { text-decoration: underline; }
.service-nav-all { font-family: var(--font-heading); font-size: 1.4rem; letter-spacing: var(--heading-tracking); }
.service-nav-next { text-align: right; }
@media (max-width: 749.98px) {
  .service-nav { grid-template-columns: 1fr; text-align: center; }
  .service-nav-next { text-align: center; }
}

/* Contact */
.cta { background: var(--color-accent); color: var(--color-on-accent); padding: clamp(1.5rem, 4vw, 3rem); }
.cta h2 { margin-top: 0; }
.cta p { max-width: 60ch; }
.cta a:not(.button) { color: var(--color-on-accent); }
.cta .button { --focus: var(--color-on-accent); }
.form-panel { padding: clamp(1.5rem, 4vw, 3rem); }
.form-panel h2 { margin-top: 0; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 700; }
.field input, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(31, 31, 33, 0.55);
  border-radius: 0;
  background: #fff;
  color: var(--color-surface-text);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 9rem; }
.form-panel .button { background: var(--color-bg); border-color: var(--color-bg); color: var(--color-accent); }
.form-note { margin: 1.5rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { margin-top: var(--section-space); border-top: 1px solid var(--color-border); }
.footer-inner { display: grid; gap: 1.5rem 3rem; padding-block: 2.5rem; align-items: start; }
.footer-brand { margin: 0; font-family: var(--font-heading); font-size: 2rem; letter-spacing: var(--heading-tracking); }
.footer-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-legal p { margin: 0 0 0.5rem; }
.site-footer a { color: var(--color-text); }
.site-footer a:hover { color: var(--color-accent); }
@media (min-width: 750px) { .footer-inner { grid-template-columns: 1fr auto auto; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .button:hover { transform: none; }
}
