/* ===========================================================
   Sub-page styles (services, case studies, blog, apply)
   =========================================================== */

/* Common subpage hero */
.subpage-hero {
  padding: 140px var(--gutter) 64px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.subpage-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(51,153,255,0.10), transparent 70%);
  pointer-events: none;
}
.subpage-hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
.subpage-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--paper);
}
.subpage-hero h1 em {
  font-style: italic;
  color: var(--brand);
}
.subpage-hero .sh-lede {
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--mute);
  max-width: 44ch;
  line-height: 1.5;
}
.crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 28px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.crumbs a { color: var(--mute); }
.crumbs a:hover { color: var(--paper); }
.crumbs .sep { opacity: 0.4; }
@media (max-width: 820px) {
  .subpage-hero { padding-top: 110px; padding-bottom: 48px; }
  .subpage-hero .wrap { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}

/* Generic dark section */
.section {
  padding: clamp(72px, 9vw, 120px) 0;
  background: var(--ink);
}
.section.light { background: var(--paper); color: var(--ink); }
.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ===== Services page ===== */
.service-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(56px, 7vw, 100px) 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.service-block:first-of-type { border-top: 0; }
.service-block .sb-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute);
  margin-bottom: 18px;
}
.service-block h2 {
  font-size: clamp(40px, 5.2vw, 80px);
  margin-bottom: 18px;
}
.service-block .sb-lede {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.45;
  color: var(--paper);
  max-width: 38ch;
  margin-bottom: 28px;
}
.service-block .sb-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.sb-pillar {
  padding: 22px 24px;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sb-pillar h4 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.sb-pillar p {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.5;
}
.sb-pillar .sb-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--brand);
}
.service-block .sb-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sb-meta {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}
.sb-meta h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.sb-meta ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sb-meta li {
  font-size: 14px;
  color: var(--paper);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sb-meta li:last-child { border-bottom: 0; }
.sb-meta li span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
}
@media (max-width: 820px) {
  .service-block { grid-template-columns: 1fr; }
  .service-block .sb-pillars { grid-template-columns: 1fr; }
}

/* ===== Case studies page ===== */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cs-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a1a;
  cursor: pointer;
  isolation: isolate;
  display: block;
}
.cs-bg {
  position: absolute; inset: 0;
  transition: transform 1.2s var(--ease-out), filter .6s ease;
}
.cs-card:hover .cs-bg { transform: scale(1.06); filter: brightness(0.55); }
.cs-name {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 52px);
  color: #fff;
  letter-spacing: -0.02em;
  z-index: 3;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.cs-card:hover .cs-name { opacity: 0.9; transform: translate(-50%, calc(-50% - 6px)); transition: transform .5s var(--ease-out), opacity .3s ease; }
.cs-cat {
  position: absolute;
  top: 22px; left: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
  z-index: 3;
  text-transform: uppercase;
}
.cs-result {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  font-family: var(--display);
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.01em;
  z-index: 2;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: opacity .3s ease;
}
.cs-card:hover .cs-result { opacity: 0; }
.cs-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .5s var(--ease-out);
}
.cs-card:hover .cs-meta { opacity: 1; transform: translateY(0); }
.cs-services { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-services .pill { background: var(--brand); color: var(--ink); border-color: transparent; }
.cs-readmore {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cs-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.cs-filter {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  cursor: pointer;
  transition: all .2s ease;
}
.cs-filter:hover { color: var(--paper); }
.cs-filter.is-active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
@media (max-width: 900px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cs-grid { grid-template-columns: 1fr; } }

/* Case studies stats strip */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 56px);
}
.cs-stats .n {
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.cs-stats .n .u { color: var(--brand); font-size: 0.55em; }
.cs-stats .l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 10px;
  max-width: 24ch;
  line-height: 1.5;
}
@media (max-width: 760px) { .cs-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

/* ===== Blog page ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s ease, transform .35s var(--ease-out);
  background: var(--ink);
}
.blog-card:hover { border-color: var(--paper); transform: translateY(-2px); }
.blog-cover {
  aspect-ratio: 16/10;
  position: relative;
}
.blog-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.blog-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex;
  gap: 10px;
  align-items: center;
}
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--mute); }
.blog-card h3 {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--paper);
}
.blog-card p { color: var(--mute); font-size: 14px; line-height: 1.5; }
.blog-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  font-size: 12px;
  color: var(--mute);
}
.blog-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 8px;
}
.blog-feature .blog-cover { aspect-ratio: auto; }
.blog-feature .blog-body { padding: clamp(28px, 4vw, 48px); justify-content: center; gap: 18px; }
.blog-feature h3 { font-size: clamp(28px, 3vw, 44px); line-height: 1.05; }
.blog-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.blog-cat {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  cursor: pointer;
  transition: all .2s ease;
}
.blog-cat:hover { color: var(--paper); }
.blog-cat.is-active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.blog-sub {
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: rgba(255,255,255,0.02);
}
.blog-sub h3 {
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.blog-sub p { color: var(--mute); font-size: 13px; }
.blog-sub form { display: flex; gap: 8px; }
.blog-sub input {
  padding: 13px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  min-width: 240px;
}
.blog-sub input:focus { outline: none; border-color: var(--brand); }
@media (max-width: 1000px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-feature { grid-template-columns: 1fr; }
  .blog-feature .blog-cover { aspect-ratio: 16/9; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-sub { grid-template-columns: 1fr; }
  .blog-sub form { flex-direction: column; }
  .blog-sub input { min-width: 0; width: 100%; }
}

/* ===== Apply page ===== */
.apply-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(72px, 9vw, 100px) 0;
}
.apply-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.field .req { color: var(--brand); }
.field input, .field select, .field textarea {
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  width: 100%;
  transition: border-color .2s ease, background .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(51,153,255,0.04);
}
.field .err {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--pink);
  text-transform: uppercase;
  display: none;
}
.field.has-err input,
.field.has-err select,
.field.has-err textarea { border-color: var(--pink); background: rgba(232,68,111,0.04); }
.field.has-err .err { display: block; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.radio-tile {
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--paper);
  cursor: pointer;
  transition: all .2s ease;
  text-align: left;
  position: relative;
}
.radio-tile input { position: absolute; opacity: 0; pointer-events: none; }
.radio-tile:hover { border-color: rgba(255, 255, 255, 0.92); }
.radio-tile.is-checked {
  background: rgba(51,153,255,0.08);
  border-color: var(--brand);
  color: var(--paper);
}
.radio-tile.is-checked::after {
  content: "✓";
  position: absolute;
  top: 50%; right: 14px;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 14px;
}
.apply-form .submit {
  padding: 18px 24px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  font-size: 15px;
}
.apply-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
  align-self: start;
}
.apply-side .panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  background: rgba(255,255,255,0.02);
}
.apply-side .panel h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.apply-side .step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.apply-side .step:last-child { border-bottom: 0; }
.apply-side .step .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.apply-side .step .b {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.apply-side .step .t {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.5;
}
.apply-success {
  display: none;
  padding: 48px 40px;
  text-align: center;
  border: 1px solid var(--brand);
  background: rgba(51,153,255,0.06);
  border-radius: 18px;
}
.apply-success.is-shown { display: block; }
.apply-success h3 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.apply-success h3 em { color: var(--brand); font-style: italic; }
.apply-success p { color: var(--mute); max-width: 38ch; margin: 0 auto 22px; line-height: 1.5; }
.apply-success .ticket {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand);
  padding: 10px 18px;
  border: 1px dashed var(--brand);
  border-radius: 999px;
  display: inline-block;
}
.apply-hr {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}
@media (max-width: 900px) {
  .apply-shell { grid-template-columns: 1fr; }
  .apply-side { position: static; }
}
@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
  .radio-group { grid-template-columns: 1fr; }
}
