/* ============================================================================
   Cheryl's Needlework Finishing — modern stylesheet
   Palette derived from the original 2003-2004 site (peach #F8DFD4,
   purple #6262B0, amber #F9AE4A), refined for modern screens.
   ========================================================================== */

:root {
  --bg: #faf5ef;
  --bg-soft: #f4eadf;
  --surface: #fffdf9;
  --ink: #2e2126;
  --ink-soft: #55464d;
  --muted: #7d6b72;
  --accent: #8e4a5f;
  --accent-dark: #6f3a4b;
  --amber: #c77b2e;
  --line: #e8d9cb;
  --shadow: 0 10px 30px rgba(94, 55, 66, .10);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(199, 123, 46, .06), transparent 60%),
    radial-gradient(900px 420px at -10% 0%, rgba(142, 74, 95, .07), transparent 55%),
    var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-color: rgba(142, 74, 95, .4); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid rgba(199, 123, 46, .55); outline-offset: 2px; border-radius: 4px; }

/* layout ------------------------------------------------------------------ */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

main { padding-bottom: 60px; }
main > article { max-width: var(--wrap); margin: 0 auto; padding: 26px 22px 10px; }
main > .wrap { max-width: var(--wrap); }

/* skip link --------------------------------------------------------------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 10px; transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 245, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.25rem; letter-spacing: .5px;
  box-shadow: var(--shadow);
}
.brand-text { font-weight: 700; font-size: 1.06rem; line-height: 1.2; display: flex; flex-direction: column; }
.brand-text span { font-weight: 500; color: var(--accent); font-size: .92rem; }

.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: inline-block; padding: 8px 13px; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--accent-dark); }
.site-nav a.active { background: var(--accent); color: #fff; }

.nav-burger { display: none; cursor: pointer; padding: 10px; margin-left: auto; }
.nav-burger span { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }

/* breadcrumbs ------------------------------------------------------------- */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 14px 22px 0; font-size: .88rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--accent); font-weight: 600; }

/* typography -------------------------------------------------------------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700;
  color: var(--amber); margin: 0 0 10px;
}
h1 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.25; margin: 1.6em 0 .55em; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; margin: 1.2em 0 .4em; }
.page-article p { margin: 0 0 1em; }
.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; }
.note { color: var(--muted); font-size: .9rem; }

/* buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid var(--accent); color: var(--accent-dark);
  background: transparent; font-weight: 700; text-decoration: none; font-size: .95rem;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--bg-soft); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* hero -------------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
  padding: 12px 0 10px;
}
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); margin-bottom: 14px; }
.hero-photo { margin: 0; text-align: center; }
.hero-photo img {
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 6px solid #fff; width: 100%; max-width: 420px; height: auto;
}
.hero-photo figcaption { color: var(--muted); font-size: .88rem; margin-top: 10px; }

section { margin-top: 34px; }
.section-note { color: var(--muted); margin-top: -6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head a { font-weight: 600; }

/* welcome ----------------------------------------------------------------- */
.welcome {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; box-shadow: var(--shadow);
}
.welcome h2 { margin-top: 0; }

/* category cards ---------------------------------------------------------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px;
}
.cat-card {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(94, 55, 66, .16); }
.cat-thumb {
  height: 150px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg-soft), var(--surface));
  border-radius: var(--radius-sm); overflow: hidden; padding: 8px;
}
.cat-thumb img { max-height: 134px; width: auto; max-width: 100%; object-fit: contain; }
.thumb-fallback { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; opacity: .65; }
.cat-body { display: flex; flex-direction: column; }
.cat-title { font-weight: 700; color: var(--accent-dark); }
.cat-note { color: var(--muted); font-size: .88rem; }

/* featured work strip ----------------------------------------------------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.work-grid.tight { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.work-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); transition: transform .16s ease;
}
.work-card:hover { transform: translateY(-3px); }
.work-card img {
  width: 100%; height: 190px; object-fit: contain;
  background: linear-gradient(180deg, var(--bg-soft), var(--surface));
  border-radius: var(--radius-sm); padding: 6px;
}
.work-card span { font-weight: 700; color: var(--accent-dark); }

/* why grid ---------------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.why-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.why-card h3 { margin-top: 0; color: var(--accent-dark); }
.why-card p { color: var(--ink-soft); margin: 0; }

/* process steps ----------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; counter-increment: none;
}
.steps li span {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px;
}
.steps li strong { display: block; margin-bottom: 4px; }
.steps li small { color: var(--muted); display: block; line-height: 1.5; }

.process-steps .step {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.step-num {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.process-steps h2 { margin: 0 0 6px; font-size: 1.18rem; }
.process-steps p { margin: 0; color: var(--ink-soft); }

/* FAQ --------------------------------------------------------------------- */
.faq-preview h2, .faq-list summary { font-weight: 700; }
.faq-list details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 20px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); }
.faq-list details[open] summary { margin-bottom: 8px; }
.faq-list p { margin: 0; color: var(--ink-soft); }

/* photo / figure ---------------------------------------------------------- */
.photo { margin: 18px 0; text-align: center; }
.photo img { border-radius: var(--radius-sm); box-shadow: var(--shadow); background: #fff; }
.photo figcaption, .hero-photo figcaption { color: var(--muted); font-size: .88rem; margin-top: 8px; }
.photo .zoom { display: inline-block; }

.thumb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px; align-items: center; justify-items: center;
}
.thumb-grid .thumb {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px; display: flex; align-items: center; justify-content: center;
  min-height: 110px; min-width: 100px; box-shadow: var(--shadow); transition: transform .15s ease;
}
.thumb-grid .thumb:hover { transform: translateY(-2px); }
.photo-strip .note { margin-top: 10px; }

.photo-pending {
  min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 30px;
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--bg-soft), var(--bg-soft) 12px, var(--surface) 12px, var(--surface) 24px);
}
.photo-pending span { font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.photo-pending small { color: var(--muted); max-width: 34ch; }

/* item page --------------------------------------------------------------- */
.item-layout { display: grid; grid-template-columns: minmax(280px, 46%) 1fr; gap: 36px; align-items: start; }
.item-media .photo-pending { min-height: 320px; }
.item-info .check-list { margin: 14px 0; padding-left: 0; list-style: none; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 6px; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

/* pager ------------------------------------------------------------------- */
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 30px 0 8px; flex-wrap: wrap; }
.pg {
  display: inline-block; padding: 9px 16px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--accent-dark);
  font-weight: 600; font-size: .92rem;
}
.pg:hover { border-color: var(--accent); }
.pg-off { visibility: hidden; }

/* item index cards -------------------------------------------------------- */
.item-index h2, .photo-strip h2, .related-cats h2, .feature-links h2 { margin-top: 2em; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }
.cat-card { flex-direction: column; }
.cat-body { padding: 2px 4px; }

/* mini cards / related ---------------------------------------------------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.mini-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.mini-card span { font-weight: 700; color: var(--accent-dark); }
.mini-card small { color: var(--muted); }

/* CTA card ---------------------------------------------------------------- */
.cta-card {
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(142, 74, 95, .08), rgba(199, 123, 46, .10));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; margin-top: 34px;
}
.cta-card h2 { margin: 0 0 6px; }
.cta-card p { margin: 0; color: var(--ink-soft); max-width: 58ch; }

/* service cards ----------------------------------------------------------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 10px; }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.service-card h2 { margin: 0 0 8px; font-size: 1.08rem; color: var(--accent-dark); }
.service-card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* about ------------------------------------------------------------------- */
.about-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 36px; align-items: start; }
.fact-list { list-style: none; margin: 0 0 18px; padding: 0; }
.fact-list li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.fact-list li span { color: var(--muted); min-width: 130px; }
.fact-list li strong { color: var(--ink); }
.about-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.about-card h2 { margin-top: 0; }

/* guilds ------------------------------------------------------------------ */
.guild-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.guild-grid figure {
  margin: 0; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow); flex: 0 0 auto;
}
.guild-grid img { display: block; margin: 0 auto 8px; }
.guild-grid figcaption { font-size: .84rem; color: var(--muted); max-width: 140px; }

/* contact ----------------------------------------------------------------- */
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: start; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow);
}
.contact-card h2 { margin-top: 1.1em; font-size: 1.05rem; }
.contact-card h2:first-of-type { margin-top: 0; }
.contact-card address { font-style: normal; color: var(--ink-soft); }
.contact-line { font-size: 1.08rem; font-weight: 700; }
.contact-icon { margin: 18px 0 0; text-align: center; }
.contact-icon figcaption { font-size: .82rem; color: var(--muted); }

/* stories (featured) ------------------------------------------------------ */
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; margin-top: 20px; }
.story h2 { margin-top: 0; }

.feature-links ul { margin: 8px 0 0; padding-left: 20px; }
.feature-links li { margin-bottom: 6px; }

.bag-list { margin: 10px 0 16px; padding-left: 22px; }
.bag-list li { margin-bottom: 8px; }

/* sitemap page ------------------------------------------------------------ */
.sitemap-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: start; }
.sitemap-layout ul { padding-left: 20px; }
.sitemap-items { font-size: .93rem; color: var(--muted); }
.sitemap-items a { color: var(--ink-soft); }

/* off the bench (recommended links) ---------------------------------------- */
.offbench {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; box-shadow: var(--shadow);
}
.offbench h2 { margin-top: 0; }
.offbench-list { list-style: none; margin: 8px 0 0; padding: 0; }
.offbench-list li { padding: 11px 0; border-bottom: 1px dashed var(--line); color: var(--ink-soft); }
.offbench-list li:first-child { padding-top: 0; }
.offbench-list li:last-child { border-bottom: none; padding-bottom: 0; }

/* resource list (links page) ------------------------------------------------ */
.res-list { list-style: none; margin: 8px 0 0; padding: 0; }
.res-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.res-list li:last-child { margin-bottom: 0; }
.res-list .res-name { font-weight: 700; color: var(--accent-dark); font-size: 1.02rem; }
.res-list .res-ext {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 9px; margin-left: 8px; vertical-align: 2px; white-space: nowrap;
}
.res-list p { margin: 6px 0 0; color: var(--ink-soft); }

/* footer ------------------------------------------------------------------ */
.site-footer { background: #33222b; color: #e9d9dd; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr .8fr .8fr 1fr; gap: 30px;
  padding: 44px 22px 26px;
}
.footer-brand { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 8px; }
.footer-about p { color: #c9b2ba; font-size: .92rem; }
.footer-guilds a { color: #e5b98a; font-weight: 600; }
.footer-h { color: #fff; font-weight: 700; margin-bottom: 10px; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #e9d9dd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; color: #c9b2ba; line-height: 1.7; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; padding-bottom: 26px; }
.footer-legal p { color: #b29aa3; font-size: .85rem; margin: 0; }

/* lightbox ---------------------------------------------------------------- */
dialog.lightbox {
  border: none; background: transparent; padding: 0; max-width: min(92vw, 900px); max-height: 92vh;
}
dialog.lightbox::backdrop { background: rgba(30, 16, 22, .78); backdrop-filter: blur(3px); }
dialog.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.45); background: #fff; }
dialog.lightbox .lb-close {
  position: fixed; top: 14px; right: 18px; border: none; background: rgba(255,255,255,.14);
  color: #fff; font-size: 1.6rem; border-radius: 50%; width: 44px; height: 44px; cursor: pointer;
}

/* responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .item-layout, .about-layout, .contact-layout, .sitemap-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-burger { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; padding: 10px 16px; }
  .site-nav a { display: block; padding: 12px 14px; border-radius: 10px; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .header-inner { flex-wrap: wrap; }
  body { font-size: 16px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { flex-direction: column; align-items: flex-start; }
}

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

/* print ------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .crumbs, .cta-card, .pager, .related-cats, .nav-burger { display: none; }
  body { background: #fff; }
  main > article { padding: 0; max-width: 100%; }
}