/* ============ Portfolio page styles ============ */
@import url('styles.css');

/* === Index hero === */
.pf-index-hero {
  padding: 140px clamp(20px, 4vw, 48px) 80px;
  display: flex; flex-direction: column; gap: 56px;
}
.pf-index-title {
  font-size: clamp(48px, 9vw, 156px);
  line-height: 0.92; letter-spacing: -0.045em;
  font-weight: 800;
}
.pf-index-title .em {
  display: inline-block;
  font-style: normal; font-weight: 800;
  position: relative;
}
.pf-index-title .em::after {
  content: ""; position: absolute;
  left: -2%; right: -2%; bottom: 8%; height: 22%;
  background: var(--accent);
  z-index: -1;
  transform: skewX(-8deg);
}
.pf-index-foot {
  display: grid; grid-template-columns: 1.2fr auto;
  gap: 60px; align-items: end;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
@media (max-width: 800px) { .pf-index-foot { grid-template-columns: 1fr; } }
.pf-index-counts {
  display: flex; gap: 40px;
}
.pf-index-counts > div {
  display: flex; flex-direction: column; gap: 4px;
}
.pf-index-counts b {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.pf-index-counts span {
  font-size: 11px; color: var(--fg-mute);
  letter-spacing: 0.05em; text-transform: uppercase;
  font-weight: 600;
}

/* === Grid section === */
.pf-grid-section { padding: 80px clamp(20px, 4vw, 48px) 100px; }
.pf-grid-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 48px;
  flex-wrap: wrap; gap: 16px;
}
.pf-grid-note {
  font-size: 12px; color: var(--fg-mute);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
}

/* === Live preview grid === */
.pf-live-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .pf-live-grid { grid-template-columns: 1fr; } }

.pf-live-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.6,.2,1), border-color .25s, box-shadow .3s;
}
.pf-live-card:hover {
  transform: translateY(-4px);
  border-color: var(--fg);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.18);
}
.pf-live-card.tone-dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pf-live-card.tone-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.pf-live-head {
  padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid color-mix(in oklab, currentColor 10%, transparent);
}
.pf-live-head-left {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 12px; letter-spacing: 0.04em;
  font-weight: 600;
}
.pf-live-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; opacity: .55;
}
.pf-live-pkg { font-weight: 700; }
.pf-live-price {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px; font-weight: 700;
  padding: 5px 10px;
  background: color-mix(in oklab, currentColor 8%, transparent);
  border-radius: 4px;
}
.pf-live-card.tone-accent .pf-live-price {
  background: color-mix(in oklab, var(--accent-ink) 14%, transparent);
}

/* Live frame (browser chrome + iframe) */
.pf-live-frame {
  display: block;
  margin: 22px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in oklab, currentColor 14%, transparent);
  position: relative;
  text-decoration: none; color: inherit;
}
.pf-live-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  background: #f3f3f0;
  border-bottom: 1px solid #e5e5e0;
}
.pf-live-chrome > span:not(.pf-live-url) {
  width: 9px; height: 9px; border-radius: 50%;
  background: #d4d4cf;
}
.pf-live-chrome > span:nth-child(1) { background: #ff5f57; }
.pf-live-chrome > span:nth-child(2) { background: #febc2e; }
.pf-live-chrome > span:nth-child(3) { background: #28c840; }
.pf-live-url {
  margin-left: 12px;
  flex: 1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #555;
  letter-spacing: 0.02em;
  background: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pf-live-iframe-wrap {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #fff;
}
.pf-live-iframe-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: 0 0;
  pointer-events: none;
}
.pf-live-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.55) 100%);
  display: flex; align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s;
}
.pf-live-frame:hover .pf-live-overlay { opacity: 1; }
.pf-live-cta {
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  color: var(--accent-ink, #000);
  padding: 10px 16px;
  border-radius: 999px;
}

/* Live foot — meta + copy */
.pf-live-foot {
  padding: 4px 26px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.pf-live-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 11px; letter-spacing: 0.04em; font-weight: 600;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.pf-live-meta span {
  padding: 4px 10px;
  border: 1px solid color-mix(in oklab, currentColor 22%, transparent);
  border-radius: 999px;
  opacity: .8;
}
.pf-live-client {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700; letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 4px 0 0;
  text-wrap: balance;
}
.pf-live-summary {
  font-size: 13px; line-height: 1.6;
  color: color-mix(in oklab, currentColor 65%, transparent);
  max-width: 50ch;
  margin: 0;
}
.pf-live-deliverables {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 4px;
}
.pf-live-deliverables span {
  font-size: 11px;
  padding: 4px 8px;
  background: color-mix(in oklab, currentColor 8%, transparent);
  border-radius: 6px;
  font-weight: 500;
}

/* === Index CTA === */
.pf-cta {
  padding: clamp(80px, 12vw, 140px) clamp(20px, 4vw, 48px);
  background: var(--fg);
  color: var(--bg);
  text-align: left;
}
.pf-cta-title {
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95; letter-spacing: -0.04em;
  font-weight: 700;
  text-wrap: balance;
  margin-bottom: 24px;
}
.pf-cta-title .em { font-weight: 800; color: var(--accent); }
.pf-cta p {
  color: color-mix(in oklab, var(--bg) 70%, transparent);
  max-width: 50ch;
  font-size: 16px; line-height: 1.6;
}
.pf-cta-actions { margin-top: 40px; display: flex; gap: 12px; flex-wrap: wrap; }
.pf-cta .btn-secondary {
  border-color: color-mix(in oklab, var(--bg) 30%, transparent);
  color: var(--bg);
}
.pf-cta .btn-secondary:hover { background: var(--bg); color: var(--fg); border-color: var(--bg); }

/* === Detail view === */
.pf-detail-breadcrumb {
  padding: 100px clamp(20px, 4vw, 48px) 0;
}
.pf-detail-breadcrumb a { text-decoration: none; }

.pf-detail-hero {
  padding: 60px clamp(20px, 4vw, 48px) 80px;
  background: var(--bg);
  transition: background .4s, color .4s;
}
.pf-detail-hero.tone-dark { background: var(--fg); color: var(--bg); }
.pf-detail-hero.tone-accent { background: var(--accent); color: var(--accent-ink); }
.pf-detail-eyebrow {
  font-size: 12px; letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 32px;
  opacity: .65;
}
.pf-detail-title {
  font-size: clamp(40px, 8vw, 132px);
  line-height: 0.95; letter-spacing: -0.04em;
  font-weight: 800;
  text-wrap: balance;
}
.pf-detail-title .em {
  display: inline-block;
  font-style: normal; font-weight: 800;
  position: relative;
}
.pf-detail-title .em::after {
  content: ""; position: absolute;
  left: -2%; right: -2%; bottom: 8%; height: 22%;
  background: var(--accent);
  z-index: -1;
  transform: skewX(-8deg);
}
.pf-detail-hero.tone-accent .pf-detail-title .em::after { background: var(--accent-ink); }

.pf-detail-meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in oklab, currentColor 18%, transparent);
}
@media (max-width: 700px) { .pf-detail-meta { grid-template-columns: repeat(2, 1fr); } }
.pf-detail-meta > div { display: flex; flex-direction: column; gap: 6px; }
.pf-detail-meta span {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600; opacity: .55;
}
.pf-detail-meta b {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 600; letter-spacing: -0.01em;
}

.pf-detail-summary {
  padding: 80px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line-soft);
}
.pf-detail-summary-text {
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
  max-width: 28ch;
}
.pf-detail-role {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 64ch;
}
.pf-detail-role b {
  display: inline-block;
  margin-right: 12px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pf-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.pf-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.pf-detail-actions .btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.pf-detail-actions .btn-accent:hover {
  transform: translateY(-2px);
}
.pf-detail-actions .btn-accent .arrow {
  font-size: 18px;
  line-height: 1;
}
.pf-detail-actions .btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.pf-detail-actions .btn-secondary:hover {
  background: var(--fg);
  color: var(--bg);
}
.pf-detail-hero.tone-dark .btn-secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.pf-detail-hero.tone-dark .btn-secondary:hover {
  background: #fff;
  color: var(--ink);
}

.pf-detail-section {
  padding: 80px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line-soft);
}
.pf-detail-bg { background: var(--surface); }
.pf-detail-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
}
@media (max-width: 800px) { .pf-detail-grid { grid-template-columns: 1fr; gap: 24px; } }
.pf-detail-h {
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 24px;
}
.pf-detail-body {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--fg-soft);
  max-width: 60ch;
}

.pf-approach-list { display: grid; gap: 0; }
.pf-approach-list li {
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
}
.pf-approach-list li:last-child { border-bottom: 1px solid var(--line-soft); }
.pf-approach-list li span {
  font-size: 12px; color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em; font-weight: 600;
  padding-top: 4px;
}
.pf-approach-list li p {
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  font-weight: 500; letter-spacing: -0.015em;
}

.pf-deliverables {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
@media (max-width: 600px) { .pf-deliverables { grid-template-columns: 1fr; } }
.pf-deliverable {
  padding: 24px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 110px;
  font-size: 16px; font-weight: 500;
  transition: background .2s;
}
.pf-deliverable:hover { background: var(--bg); }
.pf-deliverable > span:first-child {
  font-size: 11px; color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em; font-weight: 600;
}

/* metrics */
.pf-metrics {
  background: var(--fg);
  color: var(--bg);
  padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px);
}
.pf-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
}
@media (max-width: 700px) { .pf-metrics-grid { grid-template-columns: 1fr; gap: 32px; } }
.pf-metric {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in oklab, var(--bg) 25%, transparent);
}
.pf-metric-num {
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.pf-metric-num span {
  font-size: 0.3em;
  margin-left: 6px;
  color: var(--accent);
  vertical-align: top;
  font-weight: 500;
  letter-spacing: 0;
}
.pf-metric-label {
  font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bg) 60%, transparent);
  font-weight: 600;
}

/* next case */
.pf-next {
  display: block;
  padding: clamp(60px, 8vw, 120px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  text-decoration: none; color: inherit;
  transition: background .3s, color .3s;
}
.pf-next:hover { background: var(--fg); color: var(--bg); }
.pf-next:hover .em::after { background: var(--accent); }
.pf-next-meta {
  display: flex; justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.08em; font-weight: 600;
  color: var(--fg-mute);
  margin-bottom: 32px;
}
.pf-next:hover .pf-next-meta { color: color-mix(in oklab, var(--bg) 60%, transparent); }
.pf-next-title {
  font-size: clamp(40px, 7vw, 112px);
  line-height: 0.95; letter-spacing: -0.04em;
  font-weight: 800;
}
.pf-next-title .em {
  display: inline-block;
  font-style: normal; font-weight: 800;
  position: relative;
}
.pf-next-title .em::after {
  content: ""; position: absolute;
  left: -2%; right: -2%; bottom: 8%; height: 22%;
  background: var(--accent);
  z-index: -1;
  transform: skewX(-8deg);
  transition: background .3s;
}

.wrap { width: min(1280px, 100%); margin-inline: auto; }
