﻿/* ============================================================
   ECHHAWANI DECISION STORY (ec-*) â€” centered, single-column,
   editorial. Loaded after case-study.css, reuses its tokens only
   (no new colors beyond tints of --accent). Page-scoped so other
   case studies are untouched.
   ============================================================ */
.ec-center{ text-align: center; display: flex; flex-direction: column; align-items: center; }
.ec-center .section-number{ margin-bottom: 22px; text-transform: uppercase; }
.ec-title{ font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; text-wrap: balance; }
.ec-lede{ margin-top: 22px; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.7; max-width: 62ch; text-wrap: pretty; }
.ec-kicker{ margin-top: 72px; text-align: center; font-family: var(--font-meta); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.ec-sec{ padding: 140px 0; }
.ec-sec--decision{ padding: 120px 0; }
.ec-sec--last{ padding-bottom: 160px; }
@media (max-width: 780px){ .ec-sec, .ec-sec--decision{ padding: 84px 0; } .ec-kicker{ margin-top: 48px; } }

/* fading phone crops: the screen bleeds off the bottom instead of a hard cut */
.ec-fade{ border-radius: 9% 9% 0 0 / 5% 5% 0 0; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }

/* --- hero --- */
.ec-hero{ padding: 48px 0 0; border-bottom: 1px solid var(--border); }
.ec-hero .back-link{ margin-bottom: 40px; }
.ec-hero__title{ font-size: clamp(3rem, 9vw, 6.2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.ec-hero__sub{ margin-top: 20px; font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; max-width: 24ch; text-wrap: balance; }
.ec-hero__phones{ display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 3vw, 40px); margin-top: 64px; height: 560px; overflow: hidden; }
.ec-hero__phone{ height: auto; }
.ec-hero__phone--a{ width: min(36vw, 340px); }
.ec-hero__phone--b{ width: min(38vw, 380px); margin-top: 120px; }
.ec-meta{ display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: 0; margin: 0; padding: 28px 0; border-top: 1px solid var(--border); }
.ec-meta > div{ padding: 0 36px; border-left: 1px solid var(--border); text-align: center; }
.ec-meta > div:first-child{ border-left: none; }
.ec-meta dt{ font-family: var(--font-meta); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ec-meta dd{ margin: 0; font-family: var(--font-meta); font-size: 0.95rem; }
@media (max-width: 720px){
  .ec-hero__phones{ height: 270px; margin-top: 44px; }
  .ec-hero__phone--b{ margin-top: 70px; }
  .ec-meta{ grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .ec-meta > div{ padding: 0 12px; }
  .ec-meta > div:nth-child(3){ border-left: none; }
}

/* --- hook --- */
.ec-hook{ padding: 150px 0 40px; }
.ec-hook__line{ font-size: clamp(1.7rem, 3.7vw, 3.1rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.22; color: var(--muted); text-wrap: balance; }
.ec-hook__strong{ color: var(--ink); font-weight: 700; }
.ec-hook .ec-lede{ margin-top: 36px; }
@media (max-width: 780px){ .ec-hook{ padding: 90px 0 20px; } }

/* --- turning point --- */
.ec-turn{ background: var(--dark-bg); color: var(--dark-ink); padding: 130px 0; margin-top: 60px; }
.ec-turn__big{ font-family: var(--font-meta); font-size: clamp(2rem, 5.4vw, 4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; text-transform: uppercase; }
.ec-turn .ec-lede{ color: var(--dark-muted); }
@media (max-width: 780px){ .ec-turn{ padding: 88px 0; } }

/* --- screens --- */
.ec-screen{ margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.ec-screen__img{ width: 100%; }
.ec-screen__img img{ width: 100%; height: auto; }
.ec-screen figcaption{ font-family: var(--font-meta); font-size: 0.88rem; font-weight: 600; text-align: center; line-height: 1.3; }
.ec-cap__k{ display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }

/* placeholder for screens that aren't in the project assets */
.ec-ph{
  aspect-ratio: 9 / 17; width: 100%; border: 1.5px dashed var(--muted); border-radius: 22px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  font-family: var(--font-meta); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted);
}

/* --- annotations: research notes, not cards --- */
.ec-note{ position: relative; background: #F1EFE6; padding: 16px 18px 18px; font-size: 0.92rem; line-height: 1.5; color: var(--ink); border-radius: 2px; text-align: left; }
.ec-note--chosen{ background: rgba(179,252,68,.22); }
.ec-note p{ margin: 0; }
.ec-note__k{ display: block; font-family: var(--font-meta); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ec-note__k--t{ margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(16,16,16,.25); }
.ec-note__list li{ position: relative; padding-left: 14px; margin-top: 4px; }
.ec-note__list li::before{ content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.ec-note--v{ margin-top: 26px; font-size: 0.86rem; }
.ec-note--v::before{ content: ""; position: absolute; left: 50%; top: -26px; width: 1px; height: 26px; background: var(--ink); }
.ec-note--v::after{ content: ""; position: absolute; left: calc(50% - 4px); top: -30px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1px solid var(--ink); }

/* --- the decision stage: note | before -> after | note --- */
.ec-stage{
  margin: 80px auto 0; max-width: 1180px; display: grid; align-items: start; justify-content: center;
  grid-template-columns: 250px minmax(0, 300px) 56px minmax(0, 300px) 250px; column-gap: 40px;
  grid-template-areas: "na a ar b nb";
}
.ec-stage .ec-na{ grid-area: na; margin-top: 150px; }
.ec-stage .ec-a{ grid-area: a; }
.ec-stage .ec-arrow{ grid-area: ar; }
.ec-stage .ec-b{ grid-area: b; }
.ec-stage .ec-nb{ grid-area: nb; margin-top: 150px; }
.ec-arrow{ align-self: start; margin-top: 230px; text-align: center; font-family: var(--font-meta); font-size: 1.6rem; color: var(--ink); }
.ec-arrow--vs{ font-size: 0.85rem; font-weight: 700; letter-spacing: .12em; }
.ec-stage--iter{ grid-template-columns: minmax(0, 300px) 56px minmax(0, 300px) 250px; grid-template-areas: "a ar b nb"; }

/* thin connector from note to its screen */
.ec-stage .ec-note--l::after, .ec-stage .ec-note--r::after{ content: ""; position: absolute; top: 28px; width: 40px; height: 1px; background: var(--ink); }
.ec-stage .ec-note--l::after{ left: 100%; }
.ec-stage .ec-note--r::after{ right: 100%; }
.ec-stage .ec-note--l::before, .ec-stage .ec-note--r::before{ content: ""; position: absolute; top: 25px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1px solid var(--ink); z-index: 1; }
.ec-stage .ec-note--l::before{ left: calc(100% + 37px); }
.ec-stage .ec-note--r::before{ right: calc(100% + 37px); }

/* tablet / mobile: phones side by side, notes stacked underneath */
@media (max-width: 1140px){
  .ec-stage, .ec-stage--iter{
    grid-template-columns: minmax(0, 260px) 40px minmax(0, 260px); column-gap: 12px; row-gap: 28px; max-width: 640px;
    grid-template-areas: "a ar b" "na na na" "nb nb nb";
  }
  .ec-stage--iter{ grid-template-areas: "a ar b" "nb nb nb"; }
  .ec-stage .ec-na, .ec-stage .ec-nb{ margin-top: 0; }
  .ec-arrow{ margin-top: 25%; }
  .ec-stage .ec-note--l::before, .ec-stage .ec-note--l::after, .ec-stage .ec-note--r::before, .ec-stage .ec-note--r::after{ display: none; }
  .ec-stage .ec-note{ border-left: 3px solid var(--ink); }
}
@media (max-width: 520px){
  .ec-stage, .ec-stage--iter{ grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); column-gap: 8px; margin-top: 48px; }
  .ec-arrow{ font-size: 1.2rem; }
  .ec-screen figcaption{ font-size: 0.8rem; }
}

/* --- connected flows (4 or 5 screens) --- */
.ec-flow{ list-style: none; margin: 72px auto 0; padding: 0; display: grid; align-items: start; column-gap: 8px; max-width: 1180px; }
.ec-flow--4{ grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr) 36px minmax(0,1fr) 36px minmax(0,1fr); }
.ec-flow--5{ grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr); max-width: 1240px; }
.ec-flow--final{ max-width: 1280px; }
.ec-flow__step{ min-width: 0; padding: 0 clamp(0px, 1vw, 12px); }
.ec-flow__arrow{ align-self: start; margin-top: 34%; text-align: center; font-family: var(--font-meta); font-size: 1.4rem; line-height: 1; }
.ec-flow__step .ec-screen{ flex-direction: column-reverse; }
.ec-flow__step .ec-screen__img{ max-width: 270px; margin: 0 auto; aspect-ratio: 9 / 17; }
.ec-flow__step .ec-screen__img img{ height: 100%; object-fit: cover; object-position: top; }
.ec-flow__step .ec-ph{ height: 100%; aspect-ratio: auto; }
.ec-flow--final .ec-screen__img{ max-width: 300px; }
@media (max-width: 900px){
  .ec-flow--4, .ec-flow--5{ grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; column-gap: 20px; max-width: 520px; }
  .ec-flow--5{ grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }
  .ec-flow__arrow{ display: none; }
}
@media (max-width: 460px){ .ec-flow--5{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- trade-off row (decision 4) --- */
.ec-notes-row{ display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 24px; max-width: 900px; margin: 72px auto 0; }
@media (max-width: 780px){ .ec-notes-row{ grid-template-columns: 1fr; gap: 14px; margin-top: 48px; } }

/* --- why I chose it --- */
.ec-why{ margin: 88px auto 0; max-width: 46ch; text-align: center; }
.ec-why__k{ display: inline-block; font-family: var(--font-meta); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; background: var(--accent); padding: 4px 10px; margin-bottom: 18px; }
.ec-why p{ font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; text-wrap: balance; }
@media (max-width: 780px){ .ec-why{ margin-top: 56px; } }

/* --- takeaways --- */
.ec-take{ list-style: none; margin: 72px auto 0; padding: 0; max-width: 720px; border-top: 1px solid var(--border); }
.ec-take li{ display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--border); text-align: left; }
.ec-take__n{ font-family: var(--font-meta); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.ec-take__n::before{ content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.ec-take p{ margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }


/* full-phone screenshots (frame included) — no bottom fade */
.ec-full{ display: block; width: 100%; height: auto; }
.ec-flow__step .ec-screen__img{ aspect-ratio: 1482 / 3072; }
.ec-flow__step .ec-screen__img img{ object-fit: contain; object-position: top; }
.ec-notes-row .ec-note__k--t{ margin-top: 0; padding-top: 0; border-top: 0; }
.ec-flow__step .ec-screen__img img.ec-fade{ height: auto; }

/* three-screen flow (original experience) */
.ec-flow--3{ grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr) 44px minmax(0,1fr); max-width: 980px; }
@media (max-width: 900px){
  .ec-flow--3{ grid-template-columns: minmax(0, 1fr); row-gap: 56px; max-width: 300px; }
}

/* the original-home crop is shorter than a full phone: extend its connector across the gap
   (image height = 600/326 of width; the box is 3072/1482, so the gap is ~11.2% of box height) */
.ec-flow--3 .ec-flow__step:first-child .ec-screen__img{ position: relative; }
.ec-flow--3 .ec-flow__step:first-child .ec-screen__img::after{ content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 11.3%; background: var(--ink); }
