/* ==========================================================================
   The Food Noise Check-In (/check-in/).
   Builds on style.css, v2.css and v3.css: same tokens, type scale, pills and reveals.
   Everything here is prefixed ci- so it can't leak into the rest of the site.
   ========================================================================== */

.ci-body { background: var(--bg); }

/* ---------- Nav: logo, the promise, a quiet way back ---------- */
.ci-nav .nav__right { gap: 28px; align-items: center; }
.ci-nav__note { font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--gray); }
.ci-nav__back { font-size: 14px; font-weight: 600; color: var(--gray); transition: color .3s var(--ease); }
.ci-nav__back:hover { color: var(--sage); }

/* ---------- Screens ---------- */
.ci { min-height: 72vh; }
.ci-screen { display: none; padding: clamp(128px, 15vh, 176px) var(--gutter) clamp(72px, 9vh, 120px); }
.ci-screen.is-active { display: block; animation: ciIn .55s var(--ease-out) both; }
@keyframes ciIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ci-screen.is-active { animation: none; } }

.ci-wrap { max-width: 860px; margin: 0 auto; }
.ci-wrap--narrow { max-width: 680px; }

/* ---------- Shared type ---------- */
.ci-title { margin-top: 24px; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5vw, 76px); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); }
.ci-title--sm { margin-top: 18px; font-size: clamp(32px, 3.4vw, 52px); line-height: 1.08; }
.ci-title:focus, .ci-q__text:focus, [tabindex="-1"]:focus { outline: none; }

/* ---------- Opening: copy left, the noise itself right ---------- */
.ci-intro__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(48px, 6vw, 112px); align-items: center; max-width: 1180px; }
.ci-lead { margin-top: clamp(28px, 3vw, 40px); max-width: 28em; font-size: clamp(17px, .45vw + 12px, 20px); line-height: 1.65; color: var(--ink); }
.ci-def { margin-top: 16px; max-width: 33em; font-size: 15px; line-height: 1.75; color: var(--gray); }
.ci-def strong { font-weight: 600; color: var(--ink); }

.ci-start { margin-top: clamp(30px, 3.2vw, 44px); display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.ci-start__meta { font-size: 13px; font-weight: 500; letter-spacing: .02em; line-height: 1.7; color: var(--gray-light); }
.ci-start__meta strong { font-weight: 600; color: var(--sage); }

/* The five thoughts, floating inside a soft arch — the food noise, pictured */
.ci-intro__noise { position: relative; padding: clamp(36px, 4vw, 56px) clamp(16px, 1.8vw, 28px) clamp(24px, 2.6vw, 36px); }
.ci-intro__noise::before { content: ''; position: absolute; inset: 0 2%; border-radius: 999px 999px var(--radius) var(--radius); background: rgba(212, 168, 153, .16); }
.ci-thoughts { position: relative; display: flex; flex-direction: column; gap: 14px; }
.ci-thoughts li {
  align-self: flex-start; max-width: 86%; padding: 11px 22px;
  border: 1px solid var(--hairline); border-radius: 999px; background: var(--white);
  box-shadow: 0 22px 40px -32px rgba(74, 55, 40, .5);
  font-family: var(--serif); font-size: clamp(15px, 1.1vw, 17.5px); line-height: 1.45; color: var(--ink);
  rotate: var(--r, 0deg);
  animation: ciFloat 5.5s ease-in-out var(--fd, 0s) infinite alternate;
}
.ci-thoughts li:nth-child(even) { align-self: flex-end; }
.ci-thoughts li.is-accent { border-color: rgba(199, 106, 54, .32); color: var(--sage); }
@keyframes ciFloat { from { translate: 0 0; } to { translate: 0 -7px; } }
@media (prefers-reduced-motion: reduce) { .ci-thoughts li { animation: none; } }
.ci-thoughts__caption { position: relative; margin: 26px auto 0; max-width: 21em; font-family: var(--serif); font-style: italic; font-size: 16.5px; line-height: 1.6; text-align: center; color: var(--gray); }

.ci-smallprint { margin-top: clamp(64px, 8vh, 104px); padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 12.5px; line-height: 1.8; color: var(--gray-light); }
.ci-smallprint strong { font-weight: 600; color: var(--gray); }

/* ---------- Progress ---------- */
.ci-progress { margin-bottom: clamp(32px, 4vh, 48px); }
.ci-progress__label { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.ci-progress__bar { margin-top: 10px; height: 4px; border-radius: 999px; background: rgba(74, 55, 40, .1); overflow: hidden; }
.ci-progress__fill { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sage); transition: width .5s var(--ease-out); }

/* ---------- Questions ---------- */
.ci-q__text { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.18; letter-spacing: -.01em; color: var(--ink); }
.ci-q__sub { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--gray-light); font-style: italic; }
.ci-options { margin-top: clamp(28px, 3.6vh, 40px); display: grid; gap: 12px; }
.ci-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 16px 20px; text-align: left;
  border: 1px solid var(--hairline); border-radius: 14px; background: var(--white);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ci-option:hover { border-color: rgba(199, 106, 54, .5); transform: translateY(-1px); box-shadow: 0 14px 28px -22px rgba(74, 55, 40, .5); }
.ci-option__label { font-size: 16px; font-weight: 500; color: var(--ink); }
.ci-option__mark { position: relative; flex: none; width: 22px; height: 22px; border: 1.5px solid rgba(74, 55, 40, .25); border-radius: 50%; transition: border-color .25s var(--ease), background .25s var(--ease); }
.ci-option__mark::after { content: ''; position: absolute; left: 7px; top: 3.5px; width: 4.5px; height: 9px; border: solid var(--white); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg) scale(0); transition: transform .2s var(--ease-out); }
.ci-option.is-picked { border-color: var(--sage); background: rgba(199, 106, 54, .07); }
.ci-option.is-picked .ci-option__mark { border-color: var(--sage); background: var(--sage); }
.ci-option.is-picked .ci-option__mark::after { transform: rotate(45deg) scale(1); }

.ci-stepnav { margin-top: clamp(28px, 3.6vh, 40px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ci-back { font-size: 14px; font-weight: 600; color: var(--gray-light); transition: color .3s var(--ease); }
.ci-back:hover { color: var(--sage); }

/* ---------- The unscored question ---------- */
.ci-checks { margin-top: clamp(28px, 3.6vh, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ci-check { position: relative; display: block; cursor: pointer; }
.ci-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ci-check span {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border: 1px solid var(--hairline); border-radius: 14px; background: var(--white);
  font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.45;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.ci-check span::before {
  content: ''; flex: none; width: 20px; height: 20px; border: 1.5px solid rgba(74, 55, 40, .25); border-radius: 7px;
  background: center / 11px no-repeat;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.ci-check span:hover { border-color: rgba(199, 106, 54, .5); }
.ci-check input:checked + span { border-color: var(--sage); background: rgba(199, 106, 54, .07); }
.ci-check input:checked + span::before {
  border-color: var(--sage); background-color: var(--sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' fill='none'%3E%3Cpath d='M1 5.2 4.4 8.6 11 1.4' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.ci-check input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 3px; }
.ci-field--other { margin-top: 14px; }

/* ---------- Form (email capture) ---------- */
.ci-capture__lead { margin-top: 22px; max-width: 36em; font-size: clamp(16px, .4vw + 12px, 18px); line-height: 1.75; color: var(--gray); }
.ci-card { margin-top: 32px; max-width: 580px; padding: clamp(22px, 2.2vw, 30px); border-radius: var(--radius); background: var(--white); box-shadow: 0 36px 70px -46px rgba(74, 55, 40, .45), 0 0 0 1px rgba(74, 55, 40, .05); }
.ci-form { display: grid; gap: 14px; }
.ci-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ci-field { display: block; }
.ci-field__label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); }
.ci-field__label em { margin-left: 6px; font-style: normal; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--gray-light); }
.ci-field__input {
  display: block; width: 100%; height: 52px; margin-top: 8px; padding: 0 16px;
  border: 1px solid rgba(74, 55, 40, .14); border-radius: 12px; background: var(--bg);
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.ci-field__input::placeholder { color: var(--gray-light); }
.ci-field__input:hover { border-color: rgba(74, 55, 40, .28); }
.ci-field__input:focus { outline: none; border-color: var(--sage); background: var(--white); box-shadow: 0 0 0 4px rgba(199, 106, 54, .14); }
.ci-field__input[aria-invalid="true"] { border-color: #b4472a; box-shadow: 0 0 0 4px rgba(180, 71, 42, .1); }
.ci-submit { width: 100%; height: 54px; margin-top: 4px; }
.ci-submit .pill__label { font-size: 13px; }
.ci-submit[disabled] { opacity: .7; cursor: progress; transform: none; }
.ci-submit.is-loading .pill__label::after { content: ''; display: inline-block; width: 1em; margin-left: 2px; text-align: left; animation: cidots 1.2s steps(4) infinite; }
@keyframes cidots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.ci-form__note { font-size: 13px; line-height: 1.7; color: var(--gray-light); }
.ci-form__note .inline-link { color: var(--gray); }
.ci-form__error { padding: 12px 14px; border-radius: 10px; background: rgba(180, 71, 42, .08); font-size: 14px; line-height: 1.6; color: #8f3a22; }
.ci-form__error a { color: inherit; font-weight: 600; text-decoration: underline; }
.ci-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Result ---------- */
.ci-score { position: relative; width: 152px; height: 152px; margin-top: 30px; }
.ci-score__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ci-score__ring circle { fill: none; stroke-width: 5; }
.ci-score__track { stroke: rgba(74, 55, 40, .09); }
.ci-score__arc { stroke: var(--sage); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 1.2s var(--ease-out) .25s; }
@media (prefers-reduced-motion: reduce) { .ci-score__arc { transition: none; } }
.ci-score__val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--serif); color: var(--ink); }
.ci-score__num { font-size: 46px; line-height: 1; letter-spacing: -.02em; }
.ci-score__of { margin-top: 4px; font-size: 13px; letter-spacing: .02em; color: var(--gray-light); }
.ci-band__body { margin-top: clamp(24px, 3vh, 34px); display: grid; gap: 16px; max-width: 42em; font-size: clamp(16px, .4vw + 12px, 18px); line-height: 1.75; color: var(--gray); }
.ci-band__body strong { font-weight: 600; color: var(--ink); }
.ci-band__body em { font-style: italic; color: var(--ink); }
.ci-process { font-weight: 600; color: var(--sage); font-style: normal; }
.ci-step { margin-top: 26px; max-width: 42em; padding: 20px 24px; border-left: 2px solid var(--sage); border-radius: 0 14px 14px 0; background: var(--white); font-size: 16px; line-height: 1.75; color: var(--gray); }
.ci-step__k { margin-bottom: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.ci-step em { color: var(--ink); }
.ci-band__soft { margin-top: 26px; font-size: 15px; line-height: 1.75; color: var(--gray-light); }
.ci-cta { margin-top: 30px; }
.ci-result__note { margin-top: clamp(36px, 4.4vh, 52px); max-width: 44em; padding-top: 22px; border-top: 1px solid var(--hairline); font-size: 13.5px; line-height: 1.8; color: var(--gray-light); }
.ci-result__email { margin-top: 10px; font-size: 13.5px; color: var(--gray-light); }
.ci-result__email strong { color: var(--gray); }

/* ---------- Slim footer ---------- */
.ci-foot { padding: 72px var(--gutter) 40px; background: var(--cocoa); color: rgba(255, 255, 255, .72); }
.ci-foot__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 64px; align-items: start; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ci-foot__logo img { height: 52px; width: auto; }
.ci-foot__note { max-width: 680px; justify-self: end; font-size: 14px; line-height: 1.8; }
.ci-foot__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; padding-top: 32px; font-size: 14px; }
.ci-foot__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ci-foot__links a { transition: color .3s var(--ease); }
.ci-foot__links a:hover { color: var(--white); }
.ci-foot__copy { color: rgba(255, 255, 255, .45); }

/* ---------- Phones ---------- */
@media (max-width: 809px) {
  .ci-nav__note { display: none; }
  .ci-screen { padding-top: 112px; }
  .ci-intro__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .ci-intro__noise { margin: 0 4px; }
  .ci-thoughts li { max-width: 92%; }
  .ci-smallprint { margin-top: 56px; }
  .ci-title { font-size: clamp(38px, 10.5vw, 56px); }
  .ci-title--sm { font-size: clamp(30px, 8.5vw, 40px); }
  .ci-form__row { grid-template-columns: minmax(0, 1fr); }
  .ci-checks { grid-template-columns: minmax(0, 1fr); }
  .ci-stepnav { flex-direction: column-reverse; align-items: stretch; }
  .ci-stepnav .ci-back { align-self: center; padding: 10px; }
  .ci-foot__top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ci-foot__note { justify-self: start; }
}
