/* Idel Crochet & Papa Kenny's Shop — site styles
   Concept: two materials, one table. Yarn colors on the left, turned wood on the right,
   joined by a running-stitch line. */

:root {
  --linen: #F7F5F1;      /* page */
  --walnut: #33241B;     /* text, dark wood */
  --maple: #D9B98C;      /* light wood */
  --yarn-rose: #D2557A;  /* Idel Crochet accent */
  --yarn-teal: #1F7F7C;  /* Papa Kenny's accent */
  --muted: #6E5E52;
  --rule: #E3DBD0;
  --surface: #FFFFFF;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 7vw, 4.75rem);

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--walnut);
  font: 400 var(--step-0)/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yarn-teal); text-underline-offset: 3px; }
a:hover { color: var(--walnut); }
:focus-visible { outline: 3px solid var(--yarn-rose); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* The running stitch: the site's one recurring device. */
.stitch {
  height: 6px; border: 0; margin: 0;
  background: repeating-linear-gradient(90deg, var(--yarn-rose) 0 14px, transparent 14px 24px);
}
.stitch.teal { background: repeating-linear-gradient(90deg, var(--yarn-teal) 0 14px, transparent 14px 24px); }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: var(--step-1); color: var(--walnut); text-decoration: none; line-height: 1.15; }
.brand span { display: block; font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-family: var(--display); font-weight: 500; }
.nav a { color: var(--walnut); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--maple); }
.nav a[aria-current="page"] { border-bottom-color: var(--yarn-rose); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 40px; }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 44ch; }
/* Portrait photos sit beside the headline on wide screens */
.hero.with-photos { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-photos img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; border-radius: 6px; background: var(--rule); }
.hero-photos img:last-child { margin-top: 56px; }

.button {
  display: inline-block; font-family: var(--display); font-weight: 600;
  background: var(--walnut); color: var(--linen); text-decoration: none;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; font-size: var(--step-0);
}
.button:hover { background: var(--yarn-teal); color: #fff; }
.button.ghost { background: transparent; color: var(--walnut); box-shadow: inset 0 0 0 2px var(--walnut); }
.button.ghost:hover { background: var(--walnut); color: var(--linen); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Two makers: yarn half, wood half */
.makers { display: grid; grid-template-columns: 1fr 1fr; margin: 56px 0; border-radius: 8px; overflow: hidden; }
.maker { padding: clamp(24px, 4vw, 48px); }
.maker img { height: 120px; width: auto; margin-bottom: 20px; }
.maker.yarn { background: #FBE9EE; }
.maker.wood { background: #EFE2CD; }
.maker.yarn h3 { color: var(--yarn-rose); }
.maker.wood h3 { color: var(--yarn-teal); }
.maker p { margin-bottom: 0; }

.section { padding: 48px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* Events */
.event { padding: 20px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 8.5rem 1fr; gap: 20px; }
.event time { font-family: var(--display); font-weight: 650; font-size: var(--step-1); line-height: 1.15; color: var(--yarn-rose); }
.event h3 { margin-bottom: 4px; }
.event address { font-style: normal; color: var(--muted); }
.empty { padding: 28px; background: var(--surface); border-radius: 8px; border: 1px dashed var(--maple); }

/* Shop */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; margin-top: 24px; }
.product img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 6px; background: var(--rule); }
.product h3 { margin: 12px 0 2px; }
.product .price { font-family: var(--display); font-weight: 600; }
.product .maker-tag { font-size: var(--step--1); color: var(--muted); margin: 0 0 10px; }
.product .sold { color: var(--muted); font-style: italic; }

/* Forms */
form { display: grid; gap: 16px; max-width: 34rem; }
label { font-family: var(--display); font-weight: 500; display: grid; gap: 6px; }
input, textarea {
  font: inherit; color: inherit; background: var(--surface);
  border: 1.5px solid #CDBFAF; border-radius: 6px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--yarn-teal); box-shadow: 0 0 0 3px rgba(31,127,124,.2); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 0; font-family: var(--display); }
.form-status.ok { color: var(--yarn-teal); }
.form-status.err { color: #A2283F; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 30rem; }
.inline-form input[type=email] { flex: 1 1 14rem; }

/* Footer */
.site-footer { background: var(--walnut); color: #EADFCF; margin-top: 64px; padding: 40px 0 28px; font-size: var(--step--1); }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.site-footer h2 { font-size: var(--step-0); color: var(--maple); margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .fine { margin-top: 28px; color: #BFAE9A; }

@media (max-width: 760px) {
  .makers, .split, .site-footer .cols { grid-template-columns: 1fr; }
  .hero.with-photos { grid-template-columns: 1fr; }
  .hero-photos img:last-child { margin-top: 32px; }
  .event { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
