/* =====================================================================
   CB Craftz · styles
   Palette pulled from the business card + logo:
     sky blue background, coral band, stitched pink letters, red stitch,
     white dashed "stitch" borders, warm wood tones for the craft itself.
   ===================================================================== */

:root {
  --sky:        #cfe6f4;
  --sky-light:  #e6f2fa;
  --sky-deep:   #a9d1ea;
  --coral:      #f28b8b;
  --coral-deep: #e86f70;
  --pink:       #f2b4ae;
  --pink-light: #fbe1dd;
  --red:        #eb4637;
  --red-deep:   #c9342a;
  --cream:      #fff9f5;
  --white:      #ffffff;
  --wood:       #8b5a3c;
  --wood-deep:  #6e4329;
  --ink:        #3a2a24;
  --ink-soft:   #6b5a52;
  --line:       #e9d9d2;

  --font-display: "Fredoka", "Arial Rounded MT Bold", "Nunito", sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(58, 42, 36, 0.12);
  --shadow-sm: 0 4px 14px rgba(58, 42, 36, 0.10);
  --container: 1140px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
button { font: inherit; cursor: pointer; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--red); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: .01em;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 0 var(--red-deep); }
.btn-primary:hover { background: #f05546; }
.btn-primary:active { box-shadow: 0 3px 0 var(--red-deep); }
.btn-outline { background: var(--white); color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--pink-light); }
.btn-sm { padding: 10px 18px; font-size: .95rem; }
.btn-block { width: 100%; }

.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; font-size: .9em; }

.eyebrow {
  margin: 0 0 6px; font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--red);
}
.section-title { font-size: clamp(2rem, 4vw, 2.75rem); color: var(--ink); }
.section-sub { max-width: 60ch; color: var(--ink-soft); margin: 10px 0 0; }
.section-head { margin-bottom: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(207, 230, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px dashed var(--white);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-logo { height: 30px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.02rem;
  transition: background .15s;
}
.nav-link:hover { background: var(--white); }
.nav-link.is-active { background: var(--white); color: var(--red); }
.nav-fb {
  margin-left: 6px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--red); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 var(--red-deep);
}
.nav-fb svg { width: 20px; height: 20px; fill: #fff; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--white);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 3px; background: var(--red); border-radius: 3px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { background: var(--sky); position: relative; overflow: hidden; }
.hero-sky {
  position: relative; padding: 56px 0 24px;
}
.hero-sky::before {
  /* stitched card-border motif */
  content: ""; position: absolute; inset: 18px 18px 0 18px; pointer-events: none;
  border: 4px dashed var(--white); border-bottom: 0; border-radius: 28px 28px 0 0; opacity: .9;
}
.hero-inner { text-align: center; max-width: 780px; position: relative; }
.hero-logo { width: min(560px, 86%); margin: 0 auto 6px; filter: drop-shadow(0 4px 0 rgba(201,52,42,.15)); }
.hero-ribbon {
  display: inline-block; position: relative; margin: 0 0 22px;
  background: var(--white); color: var(--red); font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: 1.05rem; padding: 6px 26px;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
  border-top: 2px solid var(--red); border-bottom: 2px solid var(--red);
}
.hero-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ink); font-weight: 600; margin-bottom: 14px; }
.hero-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 62ch; margin: 0 auto 26px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 18px; }
.hero-fb {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink);
  text-decoration: none; font-size: .95rem; padding: 6px 12px; border-radius: 999px;
}
.hero-fb svg { width: 22px; height: 22px; fill: var(--red); }
.hero-fb:hover { background: var(--white); }

.hero-shelf {
  position: relative; margin-top: 12px;
  background: linear-gradient(to bottom, var(--sky) 0 46%, var(--coral) 46% 100%);
}
.hero-shelf::after {
  content: ""; position: absolute; inset: auto 18px 18px 18px; height: 54%; pointer-events: none;
  border: 4px dashed var(--white); border-top: 0; border-radius: 0 0 28px 28px; opacity: .9;
}
.hero-frames {
  display: flex; justify-content: center; align-items: flex-end; gap: 14px; padding: 10px 0 40px;
  perspective: 900px;
}
.frame {
  width: 18%; min-width: 120px; aspect-ratio: 1; background: var(--white); padding: 8px;
  box-shadow: 0 12px 24px rgba(58,42,36,.25); transform: rotateY(-8deg); border-radius: 4px;
}
.frame:nth-child(even) { transform: rotateY(8deg) translateY(10px); }
.frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }

/* ---------- Services strip ---------- */
.services { background: var(--white); border-bottom: 1px solid var(--line); }
.services-list {
  list-style: none; margin: 0; padding: 26px 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px;
}
.services-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: start; }
.services-list .svc-icon { color: var(--red); font-size: 1.1rem; grid-row: span 2; padding-top: 2px; }
.services-list strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.services-list span:last-child { font-size: .9rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Gallery ---------- */
.work { padding: 72px 0; }
.filters { display: grid; gap: 14px; margin-bottom: 30px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.filter-label {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); min-width: 140px;
}
.filter-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-count {
  display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: var(--pink-light); color: var(--red-deep); font-size: .78em; line-height: 1.6;
}
.filter-btn.is-active .filter-count { background: rgba(255,255,255,.25); color: #fff; }
.filter-btn {
  padding: 10px 20px; border-radius: 999px; border: 2px solid var(--pink);
  background: var(--white); color: var(--ink); font-family: var(--font-display); font-weight: 600;
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--red); }
.filter-btn.is-active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-deep); }

/* Masonry columns: photos keep their natural shape (tall shelf pieces, wide panels) */
.gallery-grid { columns: 4 250px; column-gap: 24px; }
.card {
  break-inside: avoid; margin: 0 0 24px; width: 100%;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  border: 3px solid var(--white); outline: 3px dashed var(--sky); outline-offset: -8px;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: cardIn .35s ease both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--sky-light);
  overflow: hidden; cursor: zoom-in;
}
.card-media img { width: 100%; height: auto; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .zoom-hint {
  position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,.92); color: var(--red);
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s;
}
.card:hover .zoom-hint, .card-media:focus-visible .zoom-hint { opacity: 1; }
.card-tags { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px; background: var(--white); color: var(--ink);
}
.tag-featured { background: var(--red); color: #fff; }
.tag-recent { background: var(--sky); color: var(--ink); }
.tag-custom { background: var(--pink); color: var(--red-deep); }
/* Material tags in wood tones */
.tag-layered { background: var(--wood); color: #fff; }
.tag-engraved { background: #f6ead9; color: var(--wood-deep); box-shadow: inset 0 0 0 1.5px var(--wood); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 1.2rem; font-weight: 600; }
.card-desc { margin: 0; color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card-body .btn { margin-top: 8px; }
.gallery-empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }

/* ---------- About ---------- */
.about { background: var(--sky-light); padding: 64px 0; border-top: 3px dashed var(--white); border-bottom: 3px dashed var(--white); }
.about-inner { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; }
.about-photo img {
  width: 240px; height: 240px; border-radius: 50%; object-fit: cover;
  border: 6px solid var(--white); outline: 3px dashed var(--pink); outline-offset: 4px;
  box-shadow: var(--shadow);
}
.about-text p { margin: 0 0 14px; color: var(--ink-soft); max-width: 62ch; }
.about-text .section-title { margin-bottom: 14px; }
.about-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 6px; }

/* ---------- Contact ---------- */
.contact { padding: 72px 0 88px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.contact-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 28px 28px; border: 3px solid var(--white); outline: 3px dashed var(--pink); outline-offset: -9px;
}
.form-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin: 10px 0 22px; }
.form-tab {
  background: none; border: 0; padding: 14px 16px; margin-bottom: -2px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink-soft);
  border-bottom: 3px solid transparent;
}
.form-tab.is-active { color: var(--red); border-bottom-color: var(--red); }
.form[hidden] { display: none; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.req { color: var(--red); }
.opt { color: var(--ink-soft); font-weight: 400; font-size: .85em; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  font: inherit; color: var(--ink); background: var(--cream); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(235,70,55,.15); background: #fff; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.field .err { color: var(--red); font-size: .85rem; margin-top: 4px; display: none; }
.field.has-error .err { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-item-note {
  background: var(--pink-light); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 16px;
  font-size: .95rem;
}
.form-status { margin: 14px 0 0; min-height: 1.4em; font-weight: 700; }
.form-status.ok { color: #1f8a4c; }
.form-status.bad { color: var(--red); }

.contact-aside h3 { font-size: 1.35rem; margin-bottom: 14px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.contact-list .c-ico {
  width: 44px; height: 44px; border-radius: 50%; background: var(--sky); color: var(--red);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem;
  font-family: var(--font-display);
}
.contact-list .c-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 800; }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--coral); color: var(--ink); padding: 36px 0; border-top: 4px dashed var(--white); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-logo {
  /* White stitched badge so the pink/red logo reads against the coral footer */
  box-sizing: content-box; height: 30px; width: auto;
  padding: 14px 26px; background: var(--white); border-radius: 999px;
  outline: 2px dashed var(--pink); outline-offset: -7px;
  box-shadow: 0 4px 0 var(--coral-deep);
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-nav a { color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.footer-copy { margin: 0; font-size: .88rem; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(58,42,36,.72); backdrop-filter: blur(3px); }
.lightbox-panel {
  position: relative; width: min(960px, 100%); max-height: calc(100vh - 40px);
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  animation: lbIn .25s ease;
}
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lb-media { background: var(--sky-light); display: grid; place-items: center; min-height: 320px; }
.lb-media img { width: 100%; height: 100%; max-height: calc(100vh - 40px); object-fit: contain; }
.lb-body { padding: 36px 28px 28px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.lb-tags { display: flex; gap: 6px; }
.lb-title { font-size: 1.6rem; font-weight: 600; }
.lb-desc { margin: 0; color: var(--ink-soft); flex: 1; }
.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--ink); font-size: 1.6rem; line-height: 1; box-shadow: var(--shadow-sm);
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--red); font-size: 2rem; line-height: 1; box-shadow: var(--shadow-sm);
}
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-nav:hover, .lb-close:hover { background: var(--pink-light); }
body.lb-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .about-text p { margin-inline: auto; }
  .about-links { justify-content: center; }
  .lightbox-panel { grid-template-columns: 1fr; max-height: calc(100vh - 24px); overflow: auto; }
  .lb-media { min-height: 0; }
  .lb-media img { max-height: 52vh; }
  .lb-nav { top: 24vh; }
  .frame { width: 22%; min-width: 0; }
  .hero-frames .frame:nth-child(5) { display: none; }
}
@media (max-width: 720px) {
  .filter-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .filter-label { min-width: 0; }
  .filter-btn { padding: 8px 14px; font-size: .95rem; }
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h); flex-direction: column; align-items: stretch;
    background: var(--sky); padding: 12px 16px 18px; gap: 4px; border-bottom: 3px dashed var(--white);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .nav-link { padding: 12px 14px; }
  .nav-fb { margin: 8px 0 0 14px; }
  .hero-sky { padding-top: 36px; }
  .hero-sky::before, .hero-shelf::after { inset-inline: 10px; }
  .frame { width: 30%; }
  .hero-frames .frame:nth-child(4) { display: none; }
  .lightbox { padding: 12px; }
  .contact-card { padding: 6px 18px 20px; }
  .work, .contact { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .lightbox-panel { animation: none; }
}
