/* Hero */
.hero { padding: 120px 0 88px; text-align: center; }
.hero-title {
  font-size: clamp(44px, 8vw, 80px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04;
  margin: 12px 0 20px;
}
.gradient-text {
  background: var(--hero-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(19px, 2.4vw, 24px); color: var(--text-secondary); max-width: 700px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* About */
.about-heading { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.about-heading .section-title { margin: 0; overflow-wrap: anywhere; }
.about-portrait {
  flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
}
.about-portrait img {
  width: 100%; height: 100%; object-fit: cover; transform: translate(6%, 5%) scale(1.2);
}
@media (max-width: 760px) {
  .about-portrait { width: 72px; height: 72px; }
}
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; margin-top: 40px; align-items: start; }
.about-text p { font-size: 17px; color: var(--text-secondary); margin-bottom: 16px; }
.about-text p strong { color: var(--text-primary); font-weight: 600; }
.facts { display: grid; gap: 12px; }
.fact { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 18px 20px; }
.fact-label { font-family: var(--font-text); font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.fact-value { font-size: 17px; font-weight: 600; margin-top: 2px; }

.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 20px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 10px; }
.skill-chips li { font-family: var(--font-text); font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 980px; background: var(--card-bg); color: var(--text-primary); }

/* Projects */
#projects .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; margin-top: 48px; }
.project-card {
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; cursor: pointer; text-align: left; border: 1px solid var(--border-color); color: inherit;
  font-family: inherit; transition: transform var(--transition);
}
.project-card:hover { transform: translateY(-4px); }
#projects .project-media { aspect-ratio: 3 / 2; flex-shrink: 0; background: var(--bg-alt); }
#projects .project-media img { width: 100%; height: 100%; object-fit: contain; }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-type { font-family: var(--font-text); font-size: 12px; font-weight: 600; color: var(--apple-blue); text-transform: uppercase; letter-spacing: 0.04em; }
.chip { font-family: var(--font-text); font-size: 11px; padding: 3px 10px; border-radius: 980px; background: var(--bg-alt); color: var(--text-secondary); }
.chip-live { background: rgba(0, 128, 9, 0.12); color: #008009; }
[data-theme="dark"] .chip-live { color: #30d158; background: rgba(48, 209, 88, 0.15); }
.project-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.project-desc { font-size: 15px; color: var(--text-secondary); flex: 1; }
.project-link { font-family: var(--font-text); font-size: 15px; color: var(--apple-blue); margin-top: 8px; }

/* Approach */
#approach .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.step { background: var(--card-bg); border-radius: var(--radius); padding: 28px 24px; }
#approach .step-icon { width: 40px; height: 40px; object-fit: contain; }
[data-theme="dark"] #approach .step-icon { filter: invert(1); }
.step h3 { font-size: 19px; font-weight: 600; margin: 8px 0; }
.step p { font-size: 15px; color: var(--text-secondary); }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] #approach .step-icon { filter: invert(1); }
}
@media (max-width: 860px) {
  #approach .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #approach .steps { grid-template-columns: minmax(0, 1fr); }
}

/* Contact */
.contact { text-align: center; }
.contact .section-lead { margin: 0 auto 28px; }
.footer { padding: 32px 24px; text-align: center; color: var(--text-secondary); font-size: 13px; background: var(--bg-alt); }

/* Info dialog */
.info-dialog {
  margin: auto; border: none; border-radius: var(--radius); padding: 28px; max-width: 420px; width: calc(100% - 48px);
  background: var(--card-bg); color: var(--text-primary); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.info-dialog::backdrop { background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); }
.info-dialog h3 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.info-dialog p { font-size: 15px; color: var(--text-secondary); margin-bottom: 20px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 80px 0 56px; }
}

/* Project case study */
.case-study .case-header { padding-top: 48px; padding-bottom: 32px; }
.case-study .case-header h1 { margin-top: 32px; }
.case-study .case-details { margin: 16px 0 32px; color: var(--text-secondary); }
.case-study .case-section { padding: 32px 0; }
.case-study .case-section h2 { font-size: clamp(26px, 4vw, 36px); }
.case-study .case-section p,
.case-study .case-screen figcaption { max-width: 72ch; color: var(--text-secondary); }
.case-study .case-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style-position: inside;
  margin-top: 12px;
}
.case-study .case-visual-label { font-size: 16px; margin-top: 16px; }
.case-study .case-flow li {
  position: relative; background: var(--bg-alt); padding: 16px; border-radius: var(--radius-sm);
}
.case-study .case-flow span { display: block; margin-top: 4px; color: var(--text-secondary); }
.case-study .case-hierarchy { display: grid; gap: 8px; list-style: none; margin-top: 12px; max-width: 860px; }
.case-study .case-hierarchy li {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: center;
  background: var(--bg); border-radius: var(--radius-sm); border-inline-start: 3px solid var(--apple-blue);
  padding: 12px 16px;
}
.case-study .case-hierarchy span { color: var(--text-secondary); }
.case-study .case-image { width: 100%; height: auto; border-radius: var(--radius-sm); }
.case-study .case-screen { margin-top: 24px; }
.case-study .case-screen a { display: block; border-radius: var(--radius-sm); }
.case-study .case-screen figcaption { margin-top: 8px; }
@media (min-width: 761px) {
  .case-study .case-flow li + li::before {
    content: ""; position: absolute; top: 50%; right: 100%; width: 24px;
    border-top: 2px solid var(--apple-blue);
  }
}
@media (max-width: 760px) {
  .case-study .case-flow { grid-template-columns: 1fr; gap: 8px; }
  .case-study .case-hierarchy li { grid-template-columns: 1fr; gap: 4px; }
  .case-study .case-section { padding: 24px 0; }
}

/* Voyago case study */
.voyago-case-study .voyago-screens {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  max-width: 900px; margin: 24px auto 0;
}
.voyago-case-study .voyago-screens .case-screen { margin-top: 0; }
.voyago-case-study .voyago-tasks { width: 100%; max-width: 760px; border-collapse: collapse; text-align: left; }
.voyago-case-study .voyago-tasks th,
.voyago-case-study .voyago-tasks td {
  padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--border-color);
}
.voyago-case-study .voyago-tasks thead { background: var(--bg); }
.voyago-case-study .voyago-tasks th:first-child { width: 38%; }
.voyago-case-study .voyago-tasks td { color: var(--text-secondary); }
.voyago-case-study .voyago-decision { padding-block: clamp(40px, 6vw, 72px); }
.voyago-case-study .voyago-comparison .case-screen {
  padding: clamp(8px, 2vw, 16px); background: var(--bg-alt); border-radius: var(--radius-sm);
}
.voyago-case-study .voyago-comparison .case-screen:last-child {
  box-shadow: inset 0 3px var(--apple-blue);
}
.voyago-case-study .case-screen figcaption strong { display: block; color: var(--text-primary); }
.voyago-case-study .voyago-walkthrough { list-style: none; counter-reset: voyago-step; }
.voyago-case-study .voyago-walkthrough > li { counter-increment: voyago-step; }
.voyago-case-study .voyago-walkthrough figcaption {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px;
}
.voyago-case-study .voyago-walkthrough figcaption::before {
  content: counter(voyago-step);
  grid-row: span 2; display: grid; place-items: center; align-self: start;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--apple-blue);
  color: var(--apple-blue); font-weight: 600;
}
@media (max-width: 760px) {
  .voyago-case-study .voyago-screens { grid-template-columns: 1fr; max-width: 480px; }
}

/* HomeEase case study */
.homeease-case-study { --homeease-accent: #087a71; }
[data-theme="dark"] .homeease-case-study { --homeease-accent: #66d6c5; }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .homeease-case-study { --homeease-accent: #66d6c5; }
}
.homeease-case-study .homeease-details,
.homeease-case-study .homeease-journey {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.homeease-case-study .homeease-details dt,
.homeease-case-study .homeease-chapter .eyebrow,
.homeease-case-study .homeease-journey span { color: var(--homeease-accent); }
.homeease-case-study .homeease-details dt { font-weight: 600; }
.homeease-case-study .homeease-journey { list-style: none; }
.homeease-case-study .homeease-journey a {
  display: flex; align-items: baseline; gap: 10px; height: 100%; padding: 14px 16px;
  background: var(--bg-alt); border-radius: var(--radius-sm); font-weight: 600;
}
.homeease-case-study .homeease-journey a:hover { text-decoration: underline; }
.homeease-case-study .homeease-screens {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start; gap: 20px; margin-top: 24px;
}
.homeease-case-study :where(#book-with-confidence) .homeease-screens {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.15fr) minmax(0, 1.2fr);
}
.homeease-case-study :where(#what-happens-next) .homeease-screens {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
}
.homeease-case-study .homeease-screens .case-screen { margin: 0; }
.homeease-case-study .case-screen figcaption strong { display: block; color: var(--text-primary); }
.homeease-case-study .case-section p + p { margin-top: 8px; }
@media (max-width: 760px) {
  .homeease-case-study .homeease-details,
  .homeease-case-study .homeease-journey,
  .homeease-case-study .homeease-chapter .homeease-screens {
    grid-template-columns: 1fr;
  }
  .homeease-case-study .homeease-chapter .homeease-screens { max-width: 460px; margin-inline: auto; }
}
