/* Loose placement with document flow: fragments never overlap. */
.thoughts {
  --thought-paper:#F4EFE3;
  --thought-green:#1B3F34;
  --thought-plum:#5B3F6E;
  --thought-gold:#D4BC7E;
  background:var(--thought-paper);
  color:var(--thought-green);
}
.nav + main.thoughts { padding-top:var(--page-header-height,var(--nav-height,140px)); }
.thoughts-wrap { width:min(1200px,calc(100% - 64px)); margin-inline:auto; }
.thoughts-hero { padding:24px 0; text-align:center; background:radial-gradient(ellipse at 0% 100%,#5B3F6E66,transparent 55%),var(--thought-green); color:var(--thought-paper); border-bottom:1px solid #D4BC7E66; }
.thoughts h1 { font:400 clamp(2.25rem,4.4vw,4rem)/1.12 var(--serif); letter-spacing:-.045em; margin:0 0 14px; }
.thoughts h1 em { color:var(--thought-gold); }
.thoughts-lead { max-width:680px; margin:0 auto; font-size:1rem; line-height:1.65; }
.thoughts .thoughts-hero .thoughts-wrap { display:flex; flex-direction:column; align-items:center; text-align:center; }
.thoughts .thoughts-hero h1 { width:100%; max-width:none; margin:0 auto 14px; text-align:center; }
.thoughts .thoughts-hero .thoughts-lead { width:100%; max-width:680px; margin:0 auto; text-align:center; color:#E8E1CF; }
.thought-cloud { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); align-items:start; gap:72px 32px; padding-block:40px 80px; }
.thought-fragment { position:relative; isolation:isolate; min-width:0; padding:36px; scroll-margin-top:calc(var(--header-clearance,140px) + 24px); }
.thought-fragment { --cloud-center:#FFFDF8; --cloud-edge:#FBF8EF; --cloud-accent:#70572C; }
.thought-fragment::before { content:''; position:absolute; z-index:-1; inset:-18px; background:radial-gradient(ellipse at 50% 50%,var(--cloud-center) 0%,var(--cloud-edge) 48%,transparent 76%); border-radius:42% 58% 54% 46% / 46% 42% 58% 54%; filter:blur(7px); pointer-events:none; }
.thought-fragment:nth-child(4n + 1) { grid-column:1 / 6; margin-top:100px; transform:rotate(-2deg); }
.thought-fragment:nth-child(4n + 2) { grid-column:7 / 13; transform:rotate(1deg); }
.thought-fragment:nth-child(4n + 3) { grid-column:2 / 8; transform:rotate(-1deg); }
.thought-fragment:nth-child(4n + 4) { grid-column:8 / 13; margin-top:90px; transform:rotate(2deg); }
.thought-fragment:nth-child(1) { grid-row:1; }
.thought-fragment:nth-child(2) { grid-row:1 / span 2; }
.thought-fragment:nth-child(3) { grid-column:2 / 7; grid-row:2; }
.thought-fragment:nth-child(6n + 2) { --cloud-center:#F6EFF6; --cloud-edge:#E9DCEA; --cloud-accent:#5B3F6E; }
.thought-fragment:nth-child(6n + 3) { --cloud-center:#EDF1E8; --cloud-edge:#DCE7D4; --cloud-accent:#3F5B3D; }
.thought-fragment:nth-child(6n + 4) { --cloud-center:#F8EDE8; --cloud-edge:#EED8CF; --cloud-accent:#824A40; }
.thought-fragment:nth-child(6n + 5) { --cloud-center:#EBF1F3; --cloud-edge:#D7E5EA; --cloud-accent:#365B6B; }
.thought-fragment:nth-child(6n) { --cloud-center:#F8F0DA; --cloud-edge:#EFE0B9; --cloud-accent:#715725; }
.thought-fragment:nth-child(even)::before { border-radius:58% 42% 40% 60% / 38% 57% 43% 62%; }
.thought-quote { display:block; height:48px; color:#B8964F; font:5rem/1 var(--serif); }
.thought-fragment h2 { margin:0 0 22px; font:italic 400 clamp(1.8rem,3vw,2.6rem)/1.15 var(--serif); color:var(--cloud-accent); letter-spacing:-.025em; }
.thought-text p { margin:0 0 1em; font:400 1.125rem/1.75 var(--serif); overflow-wrap:break-word; }
.thought-text p:last-child { margin-bottom:0; }
.thought-fragment-short .thought-text p { font-size:clamp(1.65rem,2.5vw,2.3rem); line-height:1.45; }
.thought-fragment-long .thought-text p:last-child:not(:first-child) { font-style:italic; color:var(--cloud-accent); font-size:1.3rem; }
.thoughts-end { text-align:center; font:italic 1rem/1.6 var(--serif); padding-bottom:48px; margin-block:0; color:#6B6358; }
@media(max-width:800px) {
  .thoughts-wrap { width:calc(100% - 40px); }
  .thoughts-hero { padding:20px 0; }
  .thoughts-lead br { display:none; }
  .thought-cloud { display:flex; flex-direction:column; gap:44px; padding-block:32px 48px; }
  .thought-cloud .thought-fragment { width:94%; margin-top:0; padding:22px 16px; transform:none; }
  .thought-cloud .thought-fragment:nth-child(even) { align-self:flex-end; }
  .thought-fragment::before { inset:0; filter:blur(12px); }
}
@media(max-width:899px) {
  .nav:not(.navigation-ready) + main.thoughts { padding-top:0; }
}
.thought-controls { display:none; }
@media(max-width:800px) {
  .thought-cloud { position:relative; flex-direction:row; align-items:flex-start; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; padding-block:12px; }
  .thought-cloud .thought-fragment { flex:0 0 100%; width:100%; align-self:flex-start; scroll-snap-align:start; scroll-snap-stop:always; }
  .thought-cloud .thought-fragment:nth-child(even) { align-self:flex-start; }
  .thought-cloud.thought-carousel-ready { display:block; overflow:hidden; scroll-snap-type:none; touch-action:pan-y pinch-zoom; }
  .thought-carousel-ready .thought-fragment { display:none; }
  .thought-carousel-ready .thought-fragment.thought-active { display:block; width:100%; margin:0; transform:none; }
  .thought-carousel-ready .thought-text { max-height:none; overflow:visible; }
  .thought-controls:not([hidden]) { display:flex; align-items:center; justify-content:center; gap:24px; padding:8px 0 28px; color:var(--thought-green); }
  .thought-controls button { width:48px; height:48px; border:1px solid var(--thought-green); border-radius:50%; color:var(--thought-green); background:transparent; font-size:1.8rem; }
  .thought-controls button:disabled { opacity:.3; cursor:default; }
  .thought-controls span { min-width:64px; text-align:center; font-size:1rem; }
}
