/* calico features page. Colours only through the site variables. Motion only inside the
   no-preference block at the foot. */
.fhero { padding: 56px 0 8px; }
.fhero h1 { font-size: clamp(2.5rem, 9vw, 4.6rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0; text-wrap: balance; max-width: 14ch; }
.flede { font-size: clamp(1.05rem, 2.4vw, 1.25rem); line-height: 1.5; color: var(--ink-secondary); max-width: 34rem; margin: 1.1rem 0 0; }
.fnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.6rem; }
.fnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--raised); color: var(--ink); font-weight: 700; text-decoration: none; }
.fnav a:hover { background: var(--tint); }

.fgroup { padding: clamp(48px, 9vw, 96px) 0 0; scroll-margin-top: 80px; }
.fhead { max-width: 36rem; margin-bottom: 1.6rem; }
.fhead p:last-child { color: var(--ink-secondary); font-size: 1.1rem; line-height: 1.5; margin: 0.8rem 0 0; }

.fgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fc { background: var(--raised); border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink); }
.fc h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0.9rem 0 0; }
.fc p { margin: 0; color: var(--ink-secondary); font-size: 1rem; line-height: 1.5; }
.fc-stone { background: var(--patch-stone); }
.fc-stone p, .fc-stone li { color: var(--ink); }
.fc-tint { background: var(--tint); }
.fc-moment { background: var(--moment); }
.fc-soot { background: var(--patch-soot); color: var(--on-patch-soot); }
.fc-soot h3, .fc-soot p, .fc-soot li { color: var(--on-patch-soot); }
.fc-soot a { color: var(--on-patch-soot); font-weight: 700; text-underline-offset: 3px; }
.fc-vis { display: grid; align-content: center; justify-items: center; min-height: 110px; }
.fc-vis .stage { max-width: 402px; }
.fc .canvas .bx { margin: 0 0 calc(var(--u)*14); }
.fc .canvas .bx:last-child { margin-bottom: 0; }
.fc .canvas .a-src { background: var(--page); }
.fc .canvas .a-src.a-raised { background: var(--page); margin-top: calc(var(--u)*10); }
.fc-tint .canvas .a-src { background: var(--page); }
.fc .canvas .q-small { font-size: calc(var(--u)*22); line-height: calc(var(--u)*28); margin-bottom: calc(var(--u)*4); }
.fc .fc-flat { background: var(--page); }
.fc-moment .canvas .s-moment.fc-flat { background: var(--page); }
.fnote { color: var(--ink-secondary); font-size: 1rem; margin: 6px 4px 0; }
.fnote a, .fc a { color: var(--seal); }
.fc-soot a { color: var(--on-patch-soot); }

/* voice */
.fc-voice { grid-auto-flow: column; justify-content: center; gap: 14px; }
.mic { width: 56px; height: 56px; border-radius: 50%; background: var(--ginger); color: var(--on-ball); display: grid; place-items: center; }
.mic svg { width: 26px; height: 26px; }
.bars { display: flex; align-items: center; gap: 4px; height: 56px; }
.bars i { display: block; width: 5px; border-radius: 3px; background: var(--ink); height: calc(10px + (var(--n, 3)) * 5px); }
.bars i:nth-child(1) { --n: 1; } .bars i:nth-child(2) { --n: 4; } .bars i:nth-child(3) { --n: 7; } .bars i:nth-child(4) { --n: 3; } .bars i:nth-child(5) { --n: 8; }
.bars i:nth-child(6) { --n: 5; } .bars i:nth-child(7) { --n: 2; } .bars i:nth-child(8) { --n: 6; } .bars i:nth-child(9) { --n: 1; }

/* label */
.fc-label { gap: 10px; justify-items: start; padding: 4px 6px; }
.lab-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.15rem; font-weight: 600; color: var(--ink) !important; }
.lab-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--tint); font-weight: 700; font-size: 0.95rem; }
.lab-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--m08); }
.lab-raw { font-size: 0.95rem !important; }

/* photo */
.fc-photo { color: var(--ink); }
.fc-photo svg { width: 120px; height: 84px; }

/* opens to writing */
.ph { position: relative; width: 74px; height: 120px; border-radius: 16px; border: 2px solid var(--ink); display: block; }
.ph b { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 20px; border-radius: 10px; background: var(--ginger); }
.ph .cur { position: absolute; left: 14px; top: 26px; width: 2px; height: 18px; background: var(--ink); }

/* doors and devices */
.fc-row { display: grid; gap: 18px; }
.doors, .devices { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.doors li, .devices li { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--page); color: var(--ink) !important; font-weight: 700; font-size: 0.98rem; }
.doors svg, .devices svg { width: 22px; height: 22px; flex: none; }

/* counting */
.fc-count { justify-items: start; gap: 6px; padding: 4px 6px; }
.cq { font-weight: 700; color: var(--ink) !important; font-size: 1.05rem; }
.cn { font-family: "Young Serif", Georgia, serif; font-size: 4.2rem !important; line-height: 1; letter-spacing: -0.03em; color: var(--ink) !important; }

/* honest note */
.fc-honest { justify-items: start; }
.fc-honest p { display: flex; gap: 10px; align-items: flex-start; font-size: 1.05rem; line-height: 1.45; font-weight: 600; color: var(--ink) !important; }
.fc-honest i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ginger); margin-top: 0.5em; }
.fc-moment p { color: var(--ink); }

/* past answers */
.fc-past ul { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.fc-past li { display: flex; justify-content: space-between; gap: 10px; background: var(--page); border-radius: 16px; padding: 10px 14px; font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.fc-past em { font-style: normal; color: var(--seal); font-weight: 700; }

/* shelf */
.fc-shelf { align-content: end; min-height: 190px; width: 100%; }
.books { display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 1.4vw, 10px); height: 180px; width: 100%; padding-bottom: 8px; border-bottom: 3px solid var(--ink); }
.books i { flex: 1; max-width: 34px; height: var(--h); border-radius: 6px 6px 2px 2px; background: var(--c); transform-origin: 50% 100%; }

/* paragraph */
.fc-para { justify-items: start; background: var(--page); border-radius: 20px; padding: 16px 18px; align-content: start; }
.para-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink) !important; }
.para-h i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.para-t { color: var(--ink) !important; margin-top: 8px !important; line-height: 1.5; }
.para-f { font-size: 0.85rem !important; font-weight: 700; color: var(--seal) !important; margin-top: 8px !important; }

/* book */
.book { position: relative; display: block; width: 120px; height: 150px; border-radius: 6px 16px 16px 6px; background: var(--patch-soot); color: var(--on-patch-soot); box-shadow: inset 10px 0 0 var(--ginger); }
.book b { position: absolute; left: 28px; right: 12px; top: 40px; font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: 1.25rem; line-height: 1.15; }
.book i { position: absolute; right: 22px; top: 0; width: 12px; height: 34px; background: var(--ginger); border-radius: 0 0 4px 4px; }

/* goal */
.fc-goal { justify-items: stretch; background: var(--page); border-radius: 20px; padding: 18px; gap: 12px; }
.g-title { font-weight: 700; font-size: 1.1rem; color: var(--ink) !important; }
.g-bar { height: 16px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.g-bar span { display: block; height: 100%; width: 58%; border-radius: 999px; background: var(--ginger); }
.g-note { font-size: 0.92rem !important; }

/* nothing */
.fc-none ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; justify-items: start; }
.fc-none li { padding: 8px 16px; border-radius: 999px; background: var(--page); color: var(--ink-secondary); text-decoration: line-through; text-decoration-color: var(--seal); text-decoration-thickness: 2px; font-weight: 700; }

/* lock */
.fc-lock { color: var(--ink); }
.fc-lock svg { width: 140px; height: 94px; }

/* plain lists, chips */
.plain { list-style: none; padding: 0; margin: 0.7rem 0 0; display: grid; gap: 0.7rem; }
.plain li { position: relative; padding-left: 22px; line-height: 1.5; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 0.58em; width: 8px; height: 8px; border-radius: 50%; background: var(--ginger); }
.fc-link { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 1rem !important; }
.fc-link a { display: inline-flex; align-items: center; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.9rem !important; }
.chips span { padding: 7px 14px; border-radius: 999px; background: var(--tint); color: var(--ink); font-weight: 700; font-size: 0.9rem; }

.closer-note { margin: 1rem 0 0; }
.closer-note a { display: inline-flex; align-items: center; min-height: 44px; color: var(--seal); }

@media (min-width: 720px) {
  .fgrid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .fgrid > .span-6, .fgrid > .span-4, .fgrid > .fnote { grid-column: 1 / -1; }
  .fc { padding: 26px; }
  .fc-row { grid-template-columns: 1fr 1.3fr; align-items: center; gap: 28px; }
}
@media (min-width: 1000px) {
  .fgrid { grid-template-columns: repeat(6, 1fr); }
  .fgrid > .span-2 { grid-column: span 2; }
  .fgrid > .span-3 { grid-column: span 3; }
  .fgrid > .span-4 { grid-column: span 4; }
  .fgrid > .span-6, .fgrid > .fnote { grid-column: 1 / -1; }
  .fc { padding: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  .fc { transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease, opacity 0.8s ease; }
  .reveals .fc[data-reveal].in:hover, .fc:hover { transform: translateY(-4px); transition-delay: 0s; }
  .fgrid > .fc:nth-child(2) { transition-delay: 0.07s; } .fgrid > .fc:nth-child(3) { transition-delay: 0.14s; }
  .fgrid > .fc:nth-child(4) { transition-delay: 0.21s; } .fgrid > .fc:nth-child(5) { transition-delay: 0.28s; }
  .fgrid > .fc:nth-child(6) { transition-delay: 0.35s; }
  .fnav a { transition: transform 0.2s ease, background-color 0.2s ease; }
  .fnav a:hover { transform: translateY(-2px); }

  /* voice bars dance while the card is on screen */
  .reveals .fc.in .bars i { animation: dance 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--n) * -0.13s); }
  .reveals .fc.in .mic { animation: breathe 2.2s ease-in-out infinite; }
  @keyframes dance { from { transform: scaleY(0.45); } to { transform: scaleY(1.15); } }
  @keyframes breathe { 50% { transform: scale(1.07); } }

  /* the label chip pops as the colon lands */
  .reveals .fc:not(.in) .lab-chip { transform: scale(0.5); opacity: 0; }
  .reveals .fc.in .lab-chip { transform: none; opacity: 1; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.3) 0.8s, opacity 0.3s ease 0.8s; }

  /* the cursor blinks once the card is in */
  .reveals .fc.in .ph .cur { animation: blink 1s steps(2, start) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* the count counts up to land, and the answer note fades */
  .reveals .fc:not(.in) .cn { opacity: 0; transform: translateY(10px) scale(0.9); }
  .reveals .fc.in .cn { opacity: 1; transform: none; transition: opacity 0.4s ease 0.5s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.2) 0.5s; }

  /* past answers file in one by one */
  .reveals .fc:not(.in) .fc-past li, .reveals .fc:not(.in) .fc-none li { opacity: 0; transform: translateX(-12px); }
  .reveals .fc.in .fc-past li, .reveals .fc.in .fc-none li { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
  .reveals .fc.in li:nth-child(1) { transition-delay: 0.4s; } .reveals .fc.in li:nth-child(2) { transition-delay: 0.55s; } .reveals .fc.in li:nth-child(3) { transition-delay: 0.7s; }

  /* books stand up one after another, and lift when touched */
  .reveals .fc:not(.in) .books i { transform: scaleY(0); }
  .reveals .fc.in .books i { transform: none; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.15), translate 0.25s ease; }
  .reveals .fc.in .books i:nth-child(1) { transition-delay: 0.2s; } .reveals .fc.in .books i:nth-child(2) { transition-delay: 0.27s; }
  .reveals .fc.in .books i:nth-child(3) { transition-delay: 0.34s; } .reveals .fc.in .books i:nth-child(4) { transition-delay: 0.41s; }
  .reveals .fc.in .books i:nth-child(5) { transition-delay: 0.48s; } .reveals .fc.in .books i:nth-child(6) { transition-delay: 0.55s; }
  .reveals .fc.in .books i:nth-child(7) { transition-delay: 0.62s; } .reveals .fc.in .books i:nth-child(8) { transition-delay: 0.69s; }
  .reveals .fc.in .books i:nth-child(9) { transition-delay: 0.76s; } .reveals .fc.in .books i:nth-child(10) { transition-delay: 0.83s; }
  .reveals .fc.in .books i:nth-child(11) { transition-delay: 0.9s; }
  .books i:hover { translate: 0 -8px; transition-delay: 0s !important; }

  /* the goal bar fills, then rests */
  .reveals .fc:not(.in) .g-bar span { width: 0; }
  .reveals .fc.in .g-bar span { transition: width 1.6s cubic-bezier(0.3, 0.7, 0.2, 1) 0.5s; }

  /* the book settles in with a small tilt */
  .reveals .fc:not(.in) .book { transform: rotate(-8deg) translateY(12px); }
  .reveals .fc.in .book { transform: none; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1.2) 0.4s; }
  .fc:hover .book { transform: rotate(-3deg); }

  .reveals .fc:not(.in) .chips span { opacity: 0; transform: translateY(8px); }
  .reveals .fc.in .chips span { opacity: 1; transform: none; transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
  .reveals .fc.in .chips span:nth-child(2) { transition-delay: 0.1s; } .reveals .fc.in .chips span:nth-child(3) { transition-delay: 0.2s; }
  .reveals .fc.in .chips span:nth-child(4) { transition-delay: 0.3s; } .reveals .fc.in .chips span:nth-child(5) { transition-delay: 0.4s; }
}
