/* ==========================================================================
   MIDWEST GRAPHIC DESIGN STUDIO — main stylesheet
   Layout and components only. All colors and fonts come from tokens.css.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-body);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Cormorant Garamond runs optically smaller and lighter than a workhorse
   serif, so headings get a touch more weight and no negative tracking. */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--c-ink);
  line-height: 1.14;
  font-weight: 700;
  margin: 0 0 var(--sp-2);
  letter-spacing: 0;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.28; }

p { margin: 0 0 var(--sp-2); max-width: var(--maxw-text); }
img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--c-accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-ink); }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-ink); color: #fff; padding: var(--sp-1) var(--sp-2);
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-3); }
.section { padding-block: var(--sp-6); }
.section--tight { padding-block: var(--sp-5); }
.section--alt { background: var(--c-surface-alt); }
.center { text-align: center; }
.center p { margin-inline: auto; }
.measure { max-width: var(--maxw-text); }
.stack > * + * { margin-top: var(--sp-2); }

.eyebrow {
  font-family: var(--f-body);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 600;
  margin: 0 0 var(--sp-1);
}

.lede { font-size: 1.16em; color: var(--c-body); }

.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--f-body); font-size: var(--fs-small); font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.85em 1.7em;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

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

.btn--ghost { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.btn--ghost:hover { background: var(--c-ink); color: var(--c-bg); }

.btn--quiet { color: var(--c-accent-deep); padding-inline: 0; }
.btn--quiet:hover { color: var(--c-ink); }

.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--c-line); box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); padding-block: var(--sp-2);
}

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }

/* The real gold emblem from Canva. The wordmark text sits beside it because
   the type inside the logo is unreadable at header size. */
.brand__logo { width: 52px; height: 52px; flex: none; object-fit: contain; }
@media (max-width: 480px) { .brand__logo { width: 44px; height: 44px; } }

.brand__mark {
  width: 38px; height: 38px; flex: none;
  border-radius: var(--r-sm);
  background: var(--c-ink); color: var(--c-bg);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.brand__name {
  font-family: var(--f-display); color: var(--c-ink);
  font-size: 1.02rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em;
}
.brand__name span { display: block; font-family: var(--f-body); font-size: var(--fs-micro);
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--c-muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: var(--sp-3); }
.nav a {
  font-size: var(--fs-small); font-weight: 500; color: var(--c-body);
  text-decoration: none; position: relative; padding-block: 2px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--c-accent); transition: right .28s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 0.4rem; color: var(--c-ink);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 64px 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--c-surface); border-bottom: 1px solid var(--c-line);
    padding: var(--sp-2) var(--sp-3) var(--sp-3);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .34s var(--ease);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding-block: 0.85rem; border-bottom: 1px solid var(--c-line); font-size: 1rem; }
  .nav .btn { margin-top: var(--sp-2); }
  .nav a.btn { border-bottom: 1.5px solid transparent; }
}

/* ---------- Hero (subtle motion) ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 11vw, 8.5rem); }

.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5;
  will-change: transform;
}
.hero__blob--1 {
  width: 46vw; height: 46vw; min-width: 340px; min-height: 340px;
  top: -14%; left: -10%; background: var(--c-accent-soft);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.hero__blob--2 {
  width: 38vw; height: 38vw; min-width: 280px; min-height: 280px;
  bottom: -18%; right: -8%; background: color-mix(in srgb, var(--c-sage) 30%, transparent);
  animation: drift-b 32s var(--ease) infinite alternate;
}
.hero__blob--3 {
  width: 26vw; height: 26vw; min-width: 200px; min-height: 200px;
  top: 32%; right: 22%; background: color-mix(in srgb, var(--c-gold) 26%, transparent);
  animation: drift-c 38s var(--ease) infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(7%, 9%, 0) scale(1.13); } }
@keyframes drift-b { to { transform: translate3d(-9%, -7%, 0) scale(1.09); } }
@keyframes drift-c { to { transform: translate3d(-6%, 11%, 0) scale(0.9); } }

.hero__inner { position: relative; z-index: 1; max-width: 830px; }
.hero h1 { font-size: var(--fs-hero); margin-bottom: var(--sp-3); }
.hero h1 em { font-style: italic; color: var(--c-accent); }
.hero .lede { font-size: clamp(1.05rem, 1.55vw, 1.3rem); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-small); color: var(--c-muted);
}
.hero__meta strong { display: block; color: var(--c-ink); font-size: 1.35rem;
  font-family: var(--f-display); font-weight: 600; }

/* ---------- Reveal on scroll ----------
   Deliberately fail-safe: content is VISIBLE by default. It is only hidden
   for the animation when the <html class="js"> flag has been set by the
   inline script in the page head. So if JavaScript is off, fails to load,
   or errors out, the site still reads perfectly — it just doesn't animate.
   Never make content depend on a script to be seen. */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Hard failsafe. Set by main.js when the observer never fires — which also
   means the page may not be compositing, so a transition would never finish.
   This snaps everything visible with no animation at all. */
.js.no-anim .reveal,
.js.no-anim .reveal.is-in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--sp-3);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card h3 { margin-bottom: var(--sp-1); }
.card p { font-size: 0.96em; }
.card__foot { margin-top: auto; padding-top: var(--sp-2); }

.card__num {
  font-family: var(--f-display); font-size: 2.1rem; color: var(--c-accent);
  line-height: 1; margin-bottom: var(--sp-2); font-weight: 600;
}

/* ---------- Price cards ---------- */
.price-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.price {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: var(--sp-3);
  display: flex; flex-direction: column; position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.price:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.price--featured { border: 1.5px solid var(--c-accent); box-shadow: var(--shadow-md); }
.price__flag {
  position: absolute; top: -0.72rem; left: var(--sp-3);
  background: var(--c-accent); color: #fff;
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.32em 0.85em; border-radius: var(--r-pill);
}

.price__name { font-family: var(--f-display); font-size: 1.3rem; color: var(--c-ink);
  font-weight: 600; margin-bottom: 0.15rem; }
.price__for { font-size: var(--fs-small); color: var(--c-muted); margin-bottom: var(--sp-2); }
.price__amt {
  font-family: var(--f-display); font-size: 2.5rem; color: var(--c-ink);
  font-weight: 600; line-height: 1; letter-spacing: -0.02em;
}
.price__amt small { font-family: var(--f-body); font-size: 0.9rem; font-weight: 500;
  color: var(--c-muted); letter-spacing: 0; }
.price__from { display: block; font-size: var(--fs-micro); letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--c-muted); font-weight: 600; margin-bottom: 0.2rem; }

.price__list { list-style: none; margin: var(--sp-3) 0; padding: 0; font-size: 0.95em; }
.price__list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.price__list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 0.72rem; height: 0.4rem;
  border-left: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent);
  transform: rotate(-45deg);
}
.price__foot { margin-top: auto; }
.price__note { font-size: var(--fs-micro); color: var(--c-muted); margin-top: var(--sp-2); }

/* ---------- Simple price rows (à la carte) ---------- */
.rows { border-top: 1px solid var(--c-line); }
.row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2);
  padding-block: var(--sp-2); border-bottom: 1px solid var(--c-line);
}
.row__name { font-weight: 600; color: var(--c-ink); flex: 1 1 200px; }
.row__desc { flex: 2 1 300px; font-size: 0.93em; color: var(--c-muted); margin: 0; }
.row__price { font-family: var(--f-display); font-size: 1.28rem; color: var(--c-ink);
  font-weight: 600; flex: none; min-width: 5.5rem; text-align: right; }
.row__buy { flex: none; }

/* ---------- Work / portfolio ---------- */
.work-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.work-item { position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--c-surface-alt); border: 1px solid var(--c-line); }
.work-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .5s var(--ease); }
.work-item:hover img { transform: scale(1.04); }

/* Portrait pieces (flyers, invitations) and logos shown whole rather than
   cropped — a cropped logo or a flyer with its headline sliced off is worse
   than a little letterboxing. */
.work-item--whole img {
  object-fit: contain;
  background: var(--c-surface-alt);
  padding: var(--sp-2);
}
.work-item--whole:hover img { transform: scale(1.02); }
.work-item__body { padding: var(--sp-2) var(--sp-3) var(--sp-3); background: var(--c-surface); }
.work-item__tag { font-size: var(--fs-micro); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--c-accent); font-weight: 600; }
.work-item__title { font-family: var(--f-display); color: var(--c-ink); font-size: 1.1rem;
  font-weight: 600; margin: 0.2rem 0 0; }

/* Placeholder tile shown until real portfolio images are added */
.work-item--placeholder .ph {
  aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center;
  background: linear-gradient(135deg, var(--c-surface-alt), var(--c-accent-soft));
  color: var(--c-muted); font-size: var(--fs-small); padding: var(--sp-3);
}

/* ---------- Quote / testimonial ---------- */
.quote { max-width: 46rem; margin-inline: auto; text-align: center; }
.quote blockquote {
  font-family: var(--f-display); font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.4; color: var(--c-ink); margin: 0 0 var(--sp-2); font-style: italic;
}
.quote figcaption { font-size: var(--fs-small); color: var(--c-muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.4rem; margin-bottom: var(--sp-3); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--c-accent-soft); color: var(--c-accent-deep);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; font-size: 1.05rem;
}
.step h3 { margin-bottom: 0.25rem; }
.step p { margin: 0; font-size: 0.96em; }

/* ---------- Companies (collective router) ---------- */
.company {
  border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-3);
  border: 1px solid var(--c-line); background: var(--c-surface);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.company:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.company__role { font-size: var(--fs-micro); letter-spacing: 0.15em; text-transform: uppercase;
  font-weight: 700; color: var(--c-accent); margin-bottom: var(--sp-1); }
.company__name { font-family: var(--f-display); font-size: 1.45rem; color: var(--c-ink);
  font-weight: 600; margin-bottom: var(--sp-1); }
.company__foot { margin-top: auto; padding-top: var(--sp-3); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--sp-2); max-width: 40rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--c-ink); }
.field .hint { font-size: var(--fs-micro); color: var(--c-muted); font-weight: 400; }

.field input, .field select, .field textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--c-ink);
  background: var(--c-surface);
  border: 1.5px solid var(--c-line); border-radius: var(--r-md);
  padding: 0.75em 0.9em; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.field--2 { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.hp { position: absolute; left: -9999px; }

.form__note { font-size: var(--fs-small); color: var(--c-muted); }

/* ---------- Callout ---------- */
.callout {
  background: var(--c-accent-soft); border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-3);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--c-ink); color: var(--c-bg); border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-3); text-align: center; }
.cta-band h2 { color: var(--c-bg); }
.cta-band p { color: color-mix(in srgb, var(--c-bg) 78%, transparent); margin-inline: auto; }
.cta-band .btn--ghost { border-color: var(--c-bg); color: var(--c-bg); }
.cta-band .btn--ghost:hover { background: var(--c-bg); color: var(--c-ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-surface-alt); border-top: 1px solid var(--c-line);
  padding-block: var(--sp-5) var(--sp-3); margin-top: var(--sp-5); }
.footer-grid { display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h4 { font-family: var(--f-body); font-size: var(--fs-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c-muted); font-weight: 700; margin-bottom: var(--sp-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--c-body); text-decoration: none; font-size: var(--fs-small); }
.site-footer a:hover { color: var(--c-accent-deep); text-decoration: underline; }
.footer-bottom {
  margin-top: var(--sp-4); padding-top: var(--sp-2); border-top: 1px solid var(--c-line);
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between;
  font-size: var(--fs-micro); color: var(--c-muted);
}

/* ---------- Page header ---------- */
.page-head { padding-block: var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--c-line); }
.page-head h1 { margin-bottom: var(--sp-2); }

/* ---------- Tables (comparison) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.95em; }
table.compare th, table.compare td { text-align: left; padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--c-line); vertical-align: top; }
table.compare thead th { font-family: var(--f-body); font-size: var(--fs-micro);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); font-weight: 700; }
table.compare tbody th { font-weight: 600; color: var(--c-ink); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal, .js .reveal.is-in { opacity: 1; transform: none; }
  .hero__blob { animation: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .hero__bg, .nav-toggle, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}
