/* ==========================================================================
   InventHelp — Site 12
   Soft clay interface · pastel lilac + mint · puffy rounded panels
   Layout rhythm: floating pill masthead, overlapping title tile,
   alternating raised / pressed chapter panels, pillow image frames.
   ========================================================================== */

/* --- 1. Reset ------------------------------------------------------------ */

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd, li {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

a { color: inherit; }

/* --- 2. Tokens ----------------------------------------------------------- */

:root {
  /* pastel clay palette */
  --clay:        #ece7f9;   /* base surface                */
  --clay-lit:    #f6f3fd;   /* raised surface              */
  --clay-deep:   #ded6f2;   /* pressed surface             */
  --clay-floor:  #e5dff5;   /* page ground                 */

  --lilac:       #7a5bd0;
  --lilac-deep:  #52389c;
  --lilac-mist:  #cabbf0;

  --mint:        #4cc4a4;
  --mint-deep:   #21856c;
  --mint-mist:   #bdeddf;

  --ink:         #302a46;
  --ink-soft:    #6a6288;
  --ink-faint:   #8d86a8;

  /* soft dual-source shadows: light from the top left */
  --shade:       rgba(105, 82, 165, 0.26);
  --shade-soft:  rgba(105, 82, 165, 0.16);
  --light:       rgba(255, 255, 255, 0.96);

  --lift:
    9px 9px 22px var(--shade-soft),
    -7px -7px 18px var(--light);

  --lift-high:
    16px 18px 38px var(--shade-soft),
    -12px -12px 26px var(--light);

  --puff:
    9px 9px 22px var(--shade-soft),
    -7px -7px 18px var(--light),
    inset 2px 2px 4px var(--light),
    inset -3px -3px 7px var(--shade-soft);

  --press:
    inset 7px 7px 15px var(--shade),
    inset -6px -6px 14px var(--light);

  --press-soft:
    inset 4px 4px 9px var(--shade-soft),
    inset -4px -4px 9px var(--light);

  /* rounding */
  --r-pill: 999px;
  --r-sm:   16px;
  --r-md:   24px;
  --r-lg:   34px;
  --r-xl:   46px;

  --display: 'Fredoka', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --body:    'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --gutter: 1.5rem;
  --shell:  78rem;
  --column: 47rem;
  --break:  5rem;   /* how far pillow figures push past the text column */

  --step-2: 0.7rem;
  --step-1: 0.8rem;
  --step0:  1.06rem;
  --step1:  1.26rem;
  --step2:  1.55rem;
  --step3:  2.05rem;
  --step4:  2.95rem;
}

/* --- 3. Base ------------------------------------------------------------- */

body {
  background-color: var(--clay-floor);
  background-image:
    radial-gradient(58rem 42rem at 8% -12%, rgba(255, 255, 255, 0.92), transparent 62%),
    radial-gradient(46rem 34rem at 104% 6%, rgba(189, 237, 223, 0.55), transparent 60%),
    radial-gradient(52rem 40rem at 50% 118%, rgba(202, 187, 240, 0.5), transparent 64%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step0);
  line-height: 1.78;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--lilac-mist);
  color: var(--ink);
}

a {
  color: var(--lilac-deep);
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 -0.42em 0 var(--mint-mist);
  border-radius: 4px;
  padding: 0 0.12em;
  transition: box-shadow 0.18s ease, color 0.18s ease;
}

a:hover {
  color: var(--mint-deep);
  box-shadow: inset 0 -1.05em 0 var(--mint-mist);
}

a:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
  box-shadow: none;
}

strong { font-weight: 700; color: var(--ink); }

/* --- 4. Shell ------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- 5. Masthead: a floating clay pill ----------------------------------- */

.site-header {
  padding: 1.5rem 0 0.5rem;
}

.header-inner {
  position: sticky;
  top: 1rem;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 2rem;
  padding: 0.85rem 1.1rem 0.85rem 1.5rem;
  background: var(--clay-lit);
  border-radius: var(--r-xl);
  box-shadow: var(--lift);
}

.brand {
  flex: 0 0 auto;
  line-height: 0;
  box-shadow: none;
  padding: 0;
}

.brand:hover { box-shadow: none; }

.brand img {
  width: 196px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.site-nav a {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--clay-lit);
  border-radius: var(--r-pill);
  padding: 0.5rem 1.05rem;
  box-shadow: none;
}

.site-nav a:hover {
  color: var(--lilac-deep);
  box-shadow: var(--lift);
}

.site-nav a[aria-current='page'] {
  color: var(--lilac-deep);
  background: var(--clay-deep);
  box-shadow: var(--press-soft);
}

/* --- 6. Hero pillow + overlapping title tile ----------------------------- */

.hero {
  margin: 1.6rem 0 0;
}

.hero-frame {
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--clay-deep);
  box-shadow: var(--lift-high);
  aspect-ratio: 3 / 1.28;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
}

.title-block {
  position: relative;
  z-index: 5;
  max-width: 52rem;
  margin: -5.5rem auto 0;
  padding: 2.9rem 3rem 2.6rem;
  background: var(--clay-lit);
  border-radius: var(--r-xl);
  box-shadow: var(--lift-high);
  text-align: center;
}

.kicker {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-deep);
  background: var(--mint-mist);
  border-radius: var(--r-pill);
  padding: 0.42rem 1.15rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--press-soft);
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step4);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.standfirst {
  font-size: var(--step1);
  line-height: 1.62;
  color: var(--ink-soft);
  margin-top: 1.3rem;
  text-wrap: pretty;
}

.byline {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--clay-deep);
  border-radius: var(--r-pill);
  padding: 0.45rem 1.2rem;
  margin-top: 1.9rem;
  box-shadow: var(--press-soft);
}

/* --- 7. Article ---------------------------------------------------------- */

.article {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 3.2rem var(--gutter) 4.6rem;
}

.article p { margin-bottom: 1.35rem; }

.lead {
  font-size: var(--step1);
  line-height: 1.68;
  color: var(--ink);
  padding: 1.6rem 1.9rem;
  background: var(--clay-lit);
  border-radius: var(--r-lg);
  box-shadow: var(--puff);
  margin-bottom: 2.4rem;
}

.lead p:last-child { margin-bottom: 0; }

/* Chapters — raised by default, every alternate one pressed into the clay */

.chapter {
  margin-bottom: 3.1rem;
}

.chapter > p:last-child { margin-bottom: 0; }

.chapter--well {
  background: var(--clay-deep);
  border-radius: var(--r-xl);
  box-shadow: var(--press);
  padding: 2.4rem 2.5rem 2.2rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lilac-deep);
  background: var(--clay-lit);
  border-radius: var(--r-pill);
  padding: 0.42rem 1.1rem;
  margin-bottom: 1.05rem;
  box-shadow: var(--lift);
}

.chapter--well .eyebrow {
  color: var(--mint-deep);
  background: var(--clay-lit);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step3);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 1.15rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step2);
  line-height: 1.28;
  color: var(--ink);
  margin: 2rem 0 0.8rem;
}

/* Lists as small clay chips */

.article ul,
.article ol { margin: 0 0 1.6rem; }

.article li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.72rem;
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: var(--r-pill);
  background: var(--mint-mist);
  box-shadow: var(--press-soft);
}

.article ol { counter-reset: seq; }

.article ol li {
  counter-increment: seq;
}

.article ol li::before {
  content: counter(seq);
  position: absolute;
  left: 0;
  top: 0.24em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--r-pill);
  background: var(--clay-lit);
  box-shadow: var(--lift);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--lilac-deep);
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Pull quote — a fat mint-edged clay slab */

.pull {
  position: relative;
  margin: 2.7rem 0 2.9rem;
  padding: 2.2rem 2.3rem 1.9rem 3.4rem;
  background: var(--clay-lit);
  border-radius: var(--r-xl);
  box-shadow: var(--puff);
}

.pull::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 0.55rem;
  border-radius: var(--r-pill);
  background: var(--mint);
  box-shadow: inset -1px -1px 3px var(--shade-soft);
}

.pull p {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step2);
  line-height: 1.36;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin-bottom: 0;
  text-wrap: pretty;
}

.pull .attrib {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1.1rem;
}

/* Pillow figures — pushed past the text column, padded like a photo mount */

.clay-figure {
  margin: 2.8rem calc(var(--break) * -1) 3rem;
  padding: 0.85rem;
  background: var(--clay-lit);
  border-radius: var(--r-xl);
  box-shadow: var(--lift-high);
}

.clay-figure .frame {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--clay-deep);
  box-shadow: var(--press-soft);
}

.clay-figure .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ratio-wide  { aspect-ratio: 16 / 9; }
.ratio-still { aspect-ratio: 4 / 3; }
.ratio-tall  { aspect-ratio: 4 / 5; }

.clay-figure--tall { max-width: 30rem; margin-left: auto; margin-right: auto; }

/* Closing line */

.endnote {
  display: block;
  margin-top: 3.2rem;
  padding: 1.25rem 1.7rem;
  background: var(--clay-deep);
  border-radius: var(--r-lg);
  box-shadow: var(--press-soft);
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

/* --- 8. Footer ----------------------------------------------------------- */

.site-footer {
  padding: 1rem 0 3rem;
}

.site-footer .wrap > .footer-shell {
  background: var(--clay-lit);
  border-radius: var(--r-xl);
  box-shadow: var(--lift-high);
  padding: 2.6rem 2.6rem 2.2rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding-bottom: 2rem;
}

.footer-mark {
  line-height: 0;
  box-shadow: none;
  padding: 0;
}

.footer-mark:hover { box-shadow: none; }

.footer-mark img { width: 178px; height: auto; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.footer-nav a {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--ink-soft);
  background: var(--clay-lit);
  border-radius: var(--r-pill);
  padding: 0.45rem 1rem;
  box-shadow: var(--press-soft);
}

.footer-nav a:hover { color: var(--lilac-deep); box-shadow: var(--lift); }

/* Injected three-column link block */

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  padding: 0 0 1.9rem;
}

.footer-cols section {
  background: var(--clay-deep);
  border-radius: var(--r-lg);
  box-shadow: var(--press-soft);
  padding: 1.5rem 1.6rem 1.3rem;
}

.footer-cols h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lilac-deep);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.footer-cols ul li {
  margin-bottom: 0.55rem;
  line-height: 1.45;
}

.footer-cols a {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--ink-soft);
  box-shadow: none;
  padding: 0;
  border-radius: 3px;
}

.footer-cols a:hover {
  color: var(--lilac-deep);
  box-shadow: inset 0 -0.35em 0 var(--mint-mist);
}

.copyright {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding-top: 1.6rem;
  border-top: 2px solid var(--clay-deep);
}

/* --- 9. Responsive ------------------------------------------------------- */

@media (max-width: 1100px) {
  :root { --break: 2.5rem; }
}

@media (max-width: 900px) {
  :root {
    --break: 1rem;
    --step4: 2.35rem;
    --step3: 1.8rem;
    --r-xl: 36px;
    --r-lg: 28px;
  }

  .hero-frame { aspect-ratio: 16 / 10; }

  .title-block {
    margin-top: -3.5rem;
    padding: 2.2rem 2rem 2rem;
  }

  .chapter--well { padding: 1.9rem 1.8rem 1.7rem; }

  .site-footer .wrap > .footer-shell { padding: 2.1rem 1.8rem 1.8rem; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root {
    --break: 0rem;
    --gutter: 1.15rem;
    --step0: 1.02rem;
    --step1: 1.15rem;
    --step2: 1.32rem;
    --step3: 1.58rem;
    --step4: 1.95rem;
  }

  body { line-height: 1.72; }

  .header-inner {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    gap: 0.85rem;
  }

  .brand img { width: 168px; }

  .site-nav { gap: 0.4rem; }

  .site-nav a { padding: 0.42rem 0.85rem; font-size: 0.76rem; }

  .hero-frame { aspect-ratio: 4 / 3; }

  .title-block {
    margin-top: -2.4rem;
    padding: 1.8rem 1.4rem 1.6rem;
    text-align: left;
  }

  .article { padding-top: 2.4rem; }

  .lead { padding: 1.3rem 1.35rem; }

  .chapter--well { padding: 1.6rem 1.3rem 1.4rem; }

  .clay-figure { padding: 0.6rem; margin: 2.2rem 0 2.4rem; }

  .clay-figure--tall { max-width: none; }

  .ratio-tall { aspect-ratio: 3 / 4; }

  .pull { padding: 1.7rem 1.4rem 1.5rem 2.5rem; }

  .pull::before { left: 1rem; top: 1.9rem; bottom: 1.9rem; width: 0.45rem; }

  .footer-top { flex-direction: column; align-items: flex-start; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); }

  .endnote { padding: 1.05rem 1.2rem; }
}

@media (max-width: 420px) {
  .site-nav a { font-size: 0.72rem; padding: 0.4rem 0.7rem; }
}

/* --- 10. Motion & print -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-nav,
  .site-footer { display: none; }

  body { background: #fff; }

  .lead,
  .pull,
  .clay-figure,
  .title-block,
  .chapter--well { box-shadow: none; background: #fff; }
}
