/* ── Case study pages · AY Solutions ──
   Loaded after style.css. New file name per change (css/* is cached for a year). */

.cs-main { position: relative; z-index: 2; }
.cs-wrap { max-width: 1200px; margin: 0 auto; }

/* Hero */
.cs-hero { padding: 150px 5vw 56px; }
.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 1px;
  color: var(--text-muted); text-decoration: none; margin-bottom: 40px;
  transition: color 0.2s;
}
.cs-back:hover { color: var(--accent); }
.cs-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.cs-chips .section-tag { margin: 0 8px 0 0; }
.cs-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 12px; border-radius: 100px;
  border: 1px solid rgba(79,255,176,0.3); color: var(--accent); background: rgba(79,255,176,0.06);
}
.cs-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cs-status.is-dev { color: #ffc24a; border-color: rgba(255,194,74,0.35); background: rgba(255,194,74,0.07); }
.cs-status.is-concept { color: #a99dff; border-color: rgba(123,109,255,0.4); background: rgba(123,109,255,0.08); }
.cs-status.is-inhouse { color: var(--text-muted); border-color: var(--border2); background: var(--surface); }
.cs-title {
  font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 0.95; color: var(--text);
  max-width: 14ch;
}
.cs-title em { font-style: normal; color: var(--accent); }
.cs-summary {
  margin-top: 28px; max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--text-muted);
}
.cs-meta {
  margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cs-meta div { padding: 22px 20px 22px 0; }
.cs-meta div + div { padding-left: 20px; border-left: 1px solid var(--border); }
.cs-meta dt {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 8px;
}
.cs-meta dd { font-size: 0.95rem; color: var(--text); line-height: 1.45; }
.cs-meta dd a { color: var(--accent); text-decoration: none; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Showcase band */
.cs-show {
  margin: 0 5vw; border-radius: 28px; overflow: hidden; position: relative;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 80% at 50% 100%, var(--glow, rgba(79,255,176,0.16)), transparent 70%), var(--bg2);
  padding: 72px 4vw 0;
}
.cs-phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(14px, 3vw, 36px); }
.cs-phones .phone:nth-child(2) { transform: translateY(-36px); }
.cs-wide { padding: 56px 4vw; display: flex; justify-content: center; }
.cs-wide img { width: 100%; height: auto; max-width: 1100px; border-radius: 14px; box-shadow: 0 40px 120px rgba(0,0,0,0.6); display: block; }

/* Phone frame */
.phone {
  position: relative; flex: 0 0 auto;
  width: clamp(150px, 22vw, 270px); aspect-ratio: 390 / 844;
  border-radius: clamp(24px, 3.4vw, 42px); padding: clamp(5px, 0.7vw, 8px);
  background: linear-gradient(160deg, #2a2a36, #111118);
  box-shadow: 0 40px 100px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: clamp(19px, 2.8vw, 35px); display: block; background: #000;
}
.cs-show .phone { margin-bottom: -60px; }

/* Text sections */
.cs-sec { padding: 120px 5vw 0; }
.cs-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 6vw; }
.cs-split h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
}
.cs-prose p { font-size: 1.06rem; line-height: 1.8; color: var(--text-muted); }
.cs-prose p + p { margin-top: 18px; }
.cs-prose strong { color: var(--text); font-weight: 600; }

/* Features */
.cs-features { display: flex; flex-direction: column; gap: 120px; padding-top: 80px; }
.cs-feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 6vw; align-items: center; }
.cs-feat:nth-child(even) .cs-feat-media { order: -1; }
.cs-feat-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 2px; color: var(--accent); margin-bottom: 14px; }
.cs-feat h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; }
.cs-feat p { font-size: 1rem; line-height: 1.75; color: var(--text-muted); }
.cs-feat ul { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.cs-feat li { display: flex; gap: 12px; font-size: 0.95rem; color: var(--text); line-height: 1.5; }
.cs-feat li::before { content: '→'; color: var(--accent); font-family: var(--mono); flex-shrink: 0; }
.cs-feat-media {
  border-radius: 24px; border: 1px solid var(--border); background: var(--surface);
  padding: 48px 24px; display: flex; justify-content: center; gap: 20px; overflow: hidden;
  background-image: radial-gradient(circle at 50% 120%, var(--glow, rgba(79,255,176,0.12)), transparent 60%);
}
.cs-feat-media .phone { width: clamp(150px, 17vw, 240px); }
.cs-feat-media.is-doc { padding: 32px; gap: 14px; align-items: flex-start; }
.cs-feat-media.is-doc img { width: calc((100% - 28px) / 3); height: auto; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); display: block; }
.cs-feat-media.is-doc img:nth-child(2) { margin-top: 28px; }
.cs-feat-media.is-doc img:nth-child(3) { margin-top: 56px; }
.cs-feat-media.is-spread { padding: 28px; flex-direction: column; }
.cs-feat-media.is-spread img { width: 100%; height: auto; border-radius: 6px; display: block; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }

/* Stack + next */
.cs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.cs-card { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 24px; }
.cs-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.cs-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.cs-tags span {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.5px;
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border2); color: var(--text-muted);
}
.cs-list { list-style: none; display: flex; flex-direction: column; }
.cs-list li { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); font-size: 1rem; line-height: 1.6; color: var(--text-muted); }
.cs-list li b { color: var(--text); font-weight: 600; }
.cs-list li::before { content: attr(data-n); font-family: var(--mono); font-size: 0.72rem; color: var(--accent); padding-top: 4px; min-width: 22px; }
.cs-note {
  margin-top: 24px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.5px; color: var(--text-dim);
}

.cs-cta {
  margin: 140px 5vw 0; padding: 72px 6vw; border-radius: 28px; border: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 120% at 100% 0%, rgba(79,255,176,0.14), transparent 60%), var(--surface);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center;
}
.cs-cta h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.cs-cta h2 em { font-style: normal; color: var(--accent); }
.cs-cta p { margin-top: 14px; color: var(--text-muted); line-height: 1.7; max-width: 520px; }
.cs-cta .cs-actions { margin-top: 0; }

.cs-next { padding: 72px 5vw 120px; }
.cs-next a {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  border-top: 1px solid var(--border); padding-top: 32px; text-decoration: none; color: var(--text);
}
.cs-next small { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.cs-next strong { font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; transition: color 0.2s; }
.cs-next span.arrow { font-size: 2rem; color: var(--accent); transition: transform 0.3s; }
.cs-next a:hover strong { color: var(--accent); }
.cs-next a:hover span.arrow { transform: translateX(8px); }

/* Reveal */
.cs-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.cs-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cs-reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .cs-split { grid-template-columns: 1fr; gap: 24px; }
  .cs-feat { grid-template-columns: 1fr; gap: 32px; }
  .cs-feat:nth-child(even) .cs-feat-media { order: 0; }
  .cs-cta { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cs-hero { padding: 120px 5vw 40px; }
  .cs-back { margin-bottom: 28px; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta div { padding: 18px 12px 18px 0; }
  .cs-meta div + div { padding-left: 14px; }
  .cs-meta dd { font-size: 0.88rem; }
  .cs-meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-meta div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .cs-show { margin: 0 16px; padding: 48px 12px 0; border-radius: 22px; }
  .cs-phones .phone:nth-child(2) { transform: translateY(-20px); }
  .cs-phones .phone:nth-child(3) { display: none; }
  .phone { width: 42vw; }
  .cs-show .phone { margin-bottom: -40px; }
  .cs-wide { padding: 28px 12px; }
  .cs-sec { padding-top: 88px; }
  .cs-features { gap: 80px; padding-top: 48px; }
  .cs-feat-media { padding: 32px 16px; border-radius: 20px; }
  .cs-feat-media .phone { width: 40vw; }
  .cs-feat-media.is-doc { padding: 18px; gap: 8px; }
  .cs-feat-media.is-doc img { width: calc((100% - 16px) / 3); }
  .cs-feat-media.is-spread { padding: 14px; }
  .cs-cards { grid-template-columns: 1fr; }
  .cs-cta { margin: 96px 16px 0; padding: 40px 24px; border-radius: 22px; }
  .cs-next { padding: 56px 5vw 88px; }
}

/* Client quote */
.cs-quote { margin: 120px 5vw 0; padding: 56px 6vw; border-radius: 28px; border: 1px solid var(--border); position: relative;
  background: radial-gradient(ellipse 70% 120% at 0% 0%, var(--glow, rgba(79,255,176,.12)), transparent 60%), var(--surface); }
.cs-quote > span { position: absolute; top: 6px; left: 30px; font-size: 7rem; line-height: 1; font-weight: 800; color: var(--accent); opacity: .35; }
.cs-quote blockquote { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 500; line-height: 1.5; max-width: 900px; position: relative; }
.cs-quote figcaption { margin-top: 24px; font-family: var(--mono); font-size: .75rem; letter-spacing: 1px; color: var(--text-muted); }
.cs-quote figcaption b { color: var(--text); font-family: var(--display); font-size: .95rem; letter-spacing: 0; }
@media (max-width: 768px) { .cs-quote { margin: 88px 16px 0; padding: 48px 22px 32px; } .cs-quote > span { left: 14px; font-size: 5rem; } }

/* Get-the-app call to action */
.cs-get { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.cs-get span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 1px; color: var(--text-dim); }
