/* ==========================================================================
   LIVELY LAYER  (trial, Nov 2026)
   Loaded after styles.css. Adds: terracotta, paper grain, handwritten notes
   (Reenie Beanie), scribbled underlines/circles, a photo collage on the
   cover, a pull quote, an inky-edged terracotta band and fewer number tags.

   To switch it all off: remove the <link ... lively.css> line from the pages
   (or restore the copies in "Design backups/before-lively-style").
   ========================================================================== */

:root {
  --terracotta: #b4532f;       /* main terracotta: cream text on it passes contrast */
  --terracotta-deep: #9a4526;  /* hover / marker on terracotta */
  --terracotta-soft: #f1d9cc;  /* pale wash */
  --font-hand: "Reenie Beanie", "Bradley Hand", "Segoe Print", cursive;

  /* hand-drawn shapes, used as masks so they take the text colour */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 36' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6c10-4 22 0 24 10s-4 14 2 16'/%3E%3Cpath d='M22.5 28.5 30 32.5l3.5-7.5'/%3E%3C/svg%3E");
  --scribble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none' fill='none' stroke='%23b4532f' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M3 9c38-6 78 3 118-3s58-1 76 2'/%3E%3Cpath d='M30 12c40-3 90-2 140-4' stroke-width='2' opacity='.7'/%3E%3C/svg%3E");
  --circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 100' preserveAspectRatio='none' fill='none' stroke='%23b4532f' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M40 18C100 2 230 4 280 26s6 58-90 66S12 86 8 54 54 10 150 8s140 10 132 30'/%3E%3C/svg%3E");
}

/* ---------- Paper grain over the whole page ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Handwritten notes ---------- */
.hand-note {
  display: inline-block;
  margin: 0;
  font: 400 2.5rem/1 var(--font-hand);
  color: var(--terracotta);
  letter-spacing: 0.01em;
  text-transform: none;
  rotate: -3deg;
}
.hand-note--arrow::after {
  content: "";
  display: inline-block;
  width: 1.15em;
  height: 1.05em;
  margin-left: 0.2em;
  vertical-align: -0.45em;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
          mask: var(--arrow) center / contain no-repeat;
}
/* a note tucked under a section heading */
h2 + .hand-note { margin: -0.35em 0 1.1rem clamp(1rem, 8vw, 7rem); }

/* ---------- Scribbles ---------- */
.scribble {
  padding-bottom: 0.14em;
  background: var(--scribble) left bottom / 100% 0.3em no-repeat;
}
.scribble-circle { position: relative; display: inline-block; }
.scribble-circle::after {
  content: "";
  position: absolute;
  inset: -0.5em -0.6em -0.42em -0.5em;
  background: var(--circle) center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- Fewer number tags: only About, Services, Results keep one ---------- */
.page-home main > section:is(.clients, .videos, .contact) > h2::before {
  content: none;
  counter-increment: none;
}

/* ---------- 1. Cover: CLAY MEDIA, then copy | photo collage ---------- */
.cover-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: var(--gap);
  align-items: center;
}
.cover-copy .cover-tagline { margin-top: 30px; }
.cover-collage {
  position: relative;
  height: 380px;
  margin: -24px 0 0;
}
.cover-collage img {
  position: absolute;
  object-fit: cover;
  border: 8px solid var(--paper);
  border-radius: 6px;
  box-shadow: 0 18px 36px -14px rgb(29 26 23 / 0.45);
}
.cover-collage .cc-1 { left: 2%;  top: 26px; width: 38%; aspect-ratio: 4 / 5; rotate: -7deg; z-index: 1; }
.cover-collage .cc-2 { left: 31%; top: 0;    width: 38%; aspect-ratio: 4 / 5; rotate: 3deg;  z-index: 2; }
.cover-collage .cc-3 { right: 0;  top: 150px; width: 44%; aspect-ratio: 3 / 2; rotate: -2deg; z-index: 3; }
.cover-collage figcaption { margin: 0; }
.cover-collage .hand-note {
  position: absolute;
  left: 4%;
  bottom: 4px;
  z-index: 4;
  rotate: -5deg;
}
.cover-collage .collage-credit {
  position: absolute;
  right: 2px;
  bottom: 0;
  font: 400 0.68rem/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 2. About: portrait as a tilted print + "based in Cornwall" note ---------- */
.about-photo { position: relative; margin: 0; }
.about-photo img {
  border: 8px solid var(--paper);
  border-radius: 6px;
  rotate: -2.5deg;
}
.about-text .about-location {
  display: block;
  width: max-content;
  margin: -4px 0 22px 1.6rem;
  color: var(--accent);
  font-size: 2.6rem;
  rotate: -4deg;
}
/* a quick pen underline under the note */
.about-location::after {
  content: "";
  display: block;
  height: 0.28em;
  margin-top: -0.05em;
  background: currentColor;
  -webkit-mask: var(--scribble) center / 100% 100% no-repeat;
          mask: var(--scribble) center / 100% 100% no-repeat;
}

/* ---------- Pull quote (off-centre, sentence case) ---------- */
main > section.pull-quote {
  padding-block: calc(var(--section-gap) * 0.6) calc(var(--section-gap) * 0.35);
}
.pull-quote blockquote {
  position: relative;
  max-width: 17ch;
  margin: 0 0 0 26%;
  font: 400 clamp(2.3rem, 5.2vw, 4.6rem)/1.08 var(--font-head);
  filter: url(#ink);
}
.pull-quote blockquote p { margin: 0; }
.pull-quote .scribble { white-space: nowrap; }
.pull-quote blockquote::before {
  content: "\201C";
  position: absolute;
  left: -0.5em;
  top: -0.18em;
  font-size: 2.6em;
  line-height: 1;
  color: var(--accent);
  z-index: -1;
}
.pull-quote .hand-note { margin: 14px 0 0 calc(26% + 2rem); }

/* ---------- Home: Services / work pages: My approach. Full-width terracotta band with inky (rough printed) edges ---------- */
main > section:is(.services, .discipline-approach) {
  position: relative;
  max-width: none;
  margin-block: 56px;
  padding-inline: max(var(--gutter), calc((100% - var(--page-width)) / 2 + var(--gutter)));
  padding-block: 72px 84px;
  background: var(--terracotta);
  color: var(--bg);
}
main > section:is(.services, .discipline-approach)::before,
main > section:is(.services, .discipline-approach)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='30' viewBox='0 0 1440 30'%3E%3Cfilter id='e' x='0' y='-40%25' width='100%25' height='180%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .06' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='22' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect x='-30' y='14' width='1500' height='40' fill='%23b4532f' filter='url(%23e)'/%3E%3C/svg%3E") left bottom / 1440px 30px repeat-x;
}
main > section:is(.services, .discipline-approach)::before { top: -29px; }
main > section:is(.services, .discipline-approach)::after { bottom: -29px; rotate: 180deg; }
:is(.services, .discipline-approach) > h2 { color: var(--bg); }
:is(.services, .discipline-approach) .hand-note { color: var(--accent); }
.services .service-card, .discipline-approach .approach-tile { color: var(--ink); }

/* ---------- 5. Results: feature tile in terracotta ---------- */
.result-tile--feature .kit-flip__front { background: var(--terracotta); color: var(--bg); }
.result-tile--feature .kit-flip:hover .kit-flip__front { background: var(--terracotta-deep); }
.result-tile--feature .kit-flip__front .result-client { color: rgb(246 241 234 / 0.82); }
.result-tile--feature .kit-flip__front .result-label { color: var(--bg); }
.result-tile--feature .kit-flip__front strong {
  color: var(--bg);
  background-image: linear-gradient(var(--terracotta-deep), var(--terracotta-deep));
}
.result-tile--feature .kit-flip__front .flip-hint { color: rgb(246 241 234 / 0.82); }

/* ---------- 7. See my work: circled in pen ---------- */
.portfolio-banner h2 { overflow: visible; }

/* ---------- Work pages ---------- */
.discipline-cases > h2 { display: block; }

/* ==========================================================================
   Tablet (1024px and below)
   ========================================================================== */
@media (max-width: 1024px) {
  .cover-collage { height: 330px; }
  .cover-collage .cc-3 { top: 130px; }
  .pull-quote blockquote { margin-left: 14%; }
  .pull-quote .hand-note { margin-left: calc(14% + 1.5rem); }
  main > section:is(.services, .discipline-approach) { padding-block: 56px 64px; }
}

/* ==========================================================================
   Phone (under 700px)
   ========================================================================== */
@media (max-width: 699px) {
  .hand-note { font-size: 2.1rem; }
  h2 + .hand-note { margin-left: 1.2rem; }

  .cover-body { grid-template-columns: 1fr; gap: 8px; }
  .cover-collage { height: min(78vw, 320px); margin: 28px 0 0; }
  .cover-collage img { border-width: 5px; }
  .cover-collage .cc-1 { top: 18px; width: 42%; }
  .cover-collage .cc-2 { left: 30%; width: 42%; }
  .cover-collage .cc-3 { top: auto; bottom: 30px; width: 50%; }
  .cover-collage .hand-note { bottom: 0; left: 0; }

  .about-photo { max-width: 78%; margin-bottom: 28px; }

  .pull-quote blockquote { margin-left: 2.1rem; font-size: clamp(2rem, 9vw, 2.6rem); }
  .pull-quote blockquote::before { left: -0.36em; font-size: 2.2em; }
  .pull-quote .hand-note { margin-left: 2.6rem; }

  main > section:is(.services, .discipline-approach) { margin-block: 40px; padding-block: 44px 52px; }
}
