/* Shopuler — site shell
   Reference implementation of Shopuler_Site_Shell_And_Pages_Spec.md v0.1
   Deployed path: /site.css   (root-absolute; both pages link it)
   No build step. No third-party requests. Light mode only. */

:root {
  /* Surface */
  --surface-ground: #F7F5F2;   /* palette.neutral.50  */
  --surface-page:   #FFFFFF;   /* palette.neutral.0   */
  --border-hair:    #E8E2D5;   /* palette.neutral.100 */

  /* Content */
  --content-strong: #2A2520;   /* palette.neutral.900 — wordmark     */
  --content-head:   #3B3730;   /* palette.neutral.800 — headings     */
  --content-body:   #4D4840;   /* palette.neutral.700 — body         */
  --content-muted:  #6B6457;   /* palette.neutral.600 — meta, footer */

  /* Brand */
  --brand:          #627B5B;   /* palette.brand.500 — focus ring only */
  --brand-text:     #51664B;   /* palette.brand.600 — link text       */

  /* Rhythm */
  --pad-edge:  1rem;           /* space.4  16px */
  --pad-wide:  1.5rem;         /* space.6  24px */
  --radius:    12px;           /* radius.lg     */
}

/* Typeface. Self-hosted; no CDN request. Falls back to a humanist system
   stack if the files are absent — see spec §3.1 for the visual cost. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/SourceSans3-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
/* Wordmark only. The app's own wordmark face — assets/fonts/PlayfairDisplay-Bold.ttf
   in the app repo, so the file already exists. Spec §3.6. */
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--surface-ground);
  color: var(--content-body);
  font-family: "Source Sans 3", "Segoe UI", Roboto, -apple-system,
               BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;   /* 17px at browser default */
  font-weight: 400;
  line-height: 1.6;
}

/* ---- Shell ------------------------------------------------------------ */

.shell { max-width: 40rem; margin: 0 auto; }

.masthead {
  padding: var(--pad-wide) var(--pad-edge);
}
.wordmark {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.375rem;         /* 22px — above body, below h1 */
  font-weight: 700;
  color: var(--content-strong);
  text-decoration: none;
  letter-spacing: 0.005em;
}
a.wordmark:hover { text-decoration: underline; }

.page {
  background: var(--surface-page);
  padding: var(--pad-wide) var(--pad-edge) 2rem;
}

@media (min-width: 40rem) {
  .shell { max-width: 43rem; padding: 0 var(--pad-wide); }
  .masthead { padding-left: 0; padding-right: 0; }
  .page {
    padding: 2rem var(--pad-wide) 2.5rem;
    border: 1px solid var(--border-hair);
    border-radius: var(--radius);
  }
}

/* ---- Type ------------------------------------------------------------- */

h1 {
  font-size: 1.75rem;      /* text.headingL 28px */
  line-height: 1.2;
  font-weight: 600;
  color: var(--content-head);
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.1875rem;    /* text.headingS 19px */
  line-height: 1.3;
  font-weight: 600;        /* inversion from the app's 500 — spec §3.2 */
  color: var(--content-head);
  margin: 2rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

p { margin: 0 0 1rem; }

ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

strong { font-weight: 600; color: var(--content-head); }

.lede { font-size: 1.0625rem; }
.meta {
  font-size: 0.875rem;     /* 14px */
  color: var(--content-muted);
  margin: 0 0 2rem;
}

/* ---- Links and focus -------------------------------------------------- */

a { color: var(--brand-text); text-decoration: underline; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Footer ----------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--border-hair);
  margin-top: 2.5rem;
  padding: 1.5rem var(--pad-edge) 3rem;
  font-size: 0.875rem;
  color: var(--content-muted);
}
.foot p { margin: 0 0 0.5rem; }
.foot a { display: inline-block; padding: 0.25rem 0; }

@media (min-width: 40rem) {
  .foot { padding-left: 0; padding-right: 0; }
}
