/* Mesh Labz – "My work" pages (project list + case studies). Builds on home.css
   (colours, fonts, header, buttons). */

.page { padding: 140px var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
@media (max-width: 860px) { .page { padding-top: 150px; } }
@media (max-width: 520px) { .page { padding-top: 180px; } }

.page-head { max-width: 760px; }
.back-link { color: var(--muted); transition: color .15s; }
.back-link:hover { color: var(--text); }
figure.frame { margin: 0; }
figure.frame.lede-gap { margin-top: 32px; }   /* same space as under a section intro */
.page-head .name { margin: 1.1rem 0 .8rem; }
.page-head .lede { margin: 1.2rem 0 0; }

.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.section > h2, .section-title, .split h2 {
  margin: 0 0 .8rem;
  font: 700 clamp(1.8rem, 3.4vw, 2.6rem)/1.1 var(--f-head); letter-spacing: -0.02em;
}
.section-intro { max-width: 680px; color: #c3ced9; font-size: 1.05rem; margin: 0 0 2rem; }
.section .mono { color: var(--muted); display: block; margin-bottom: .9rem; }

/* Framed media: a thin label bar on top, like a viewport */
.frame { border: 1px solid var(--line); background: #0a0c0f; overflow: hidden; }
.frame-bar { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.frame video, .frame img { display: block; width: 100%; height: auto; }
/* Video on the left (half the page), short overview on the right */
.showcase {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  margin-top: clamp(32px, 5vw, 56px);
}
.overview .mono { color: var(--muted); display: block; margin-bottom: 1rem; }
.overview p { margin: 0 0 1rem; color: #c3ced9; font-size: 1.05rem; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }

/* How it works: the six steps as a text grid */
/* No table: each item stands alone, separated by space and a short blue line on top. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(24px, 4vw, 56px); }
.step { position: relative; padding-top: 1.2rem; }
.step::before, .did div::before { content: ""; position: absolute; top: 0; left: 0; width: 32px; height: 2px; background: var(--bright); }
.step h3 { margin: .7rem 0 .5rem; font: 700 1.2rem/1.2 var(--f-head); letter-spacing: -0.02em; }
.step p { margin: 0; color: #c3ced9; }
.step .num { color: var(--bright); }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* What I did */
.did { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(24px, 4vw, 56px); }
.did div { position: relative; padding-top: 1.2rem; }
.did .did-lead { grid-column: 1 / -1; max-width: 820px; }   /* the custom-design point leads, full width */
.did h3 { margin: 0 0 .5rem; font: 700 1.1rem/1.2 var(--f-head); letter-spacing: -0.02em; }
.did p { margin: 0; color: #c3ced9; }
@media (max-width: 760px) { .did { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta {
  margin: clamp(64px, 9vw, 112px) 0 0; padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.cta h2 { margin: 0 0 .4rem; font: 700 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--f-head); letter-spacing: -0.02em; }
.cta p { margin: 0; color: #c3ced9; }
.cta .btn { min-width: 220px; }

/* Gallery pages (e.g. the mech environment) */
.media-hero { margin-top: clamp(32px, 5vw, 56px); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.gallery .span-2 { grid-column: 1 / -1; }
.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topo-video { margin-bottom: clamp(12px, 2vw, 20px); }
.look-gap { height: clamp(12px, 2vw, 20px); }
.frame figcaption { padding: .7rem 1rem; border-top: 1px solid var(--line); color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.split .tall video { width: 100%; height: auto; }
.more-link { color: var(--bright); }
.more-link:hover { color: var(--text); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split .tall { max-width: 360px; }
}

/* Slide-only pages (e.g. the mech breakdown) */
.slides { display: grid; gap: clamp(16px, 2.5vw, 28px); margin-top: clamp(32px, 5vw, 56px); }

/* Project list (My work) */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); margin-top: clamp(32px, 5vw, 56px); }
.project { display: flex; flex-direction: column; gap: .9rem; }
.project .frame { transition: border-color .15s; }
a.project:hover .frame { border-color: var(--bright); }
.project h2 { margin: 0; font: 700 1.5rem/1.15 var(--f-head); letter-spacing: -0.02em; }
.project p { margin: 0; color: #c3ced9; }
.project .more { color: var(--bright); }
.project .kind { color: var(--muted); }
.project-art .frame { display: grid; place-items: center; aspect-ratio: 1335 / 1080; }
.project-art img { width: auto; max-height: 100%; -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22%); mask-image: linear-gradient(to top, transparent 0, #000 22%); }
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }

.page-foot { margin-top: clamp(64px, 9vw, 112px); padding: 22px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; }
.page-foot a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Free guide page: page previews on the left, contents and sign-up on the right */
.guide-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: clamp(32px, 5vw, 56px); }
.guide-cover img { width: 100%; height: auto; }
.guide-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.guide-thumbs img { width: 100%; height: auto; border: 1px solid var(--line); }
.guide-side > .mono { color: var(--muted); display: block; margin-bottom: 1.2rem; }
.guide-contents { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; counter-reset: ch; }
.guide-contents li { position: relative; padding-left: 2.4rem; color: #c3ced9; counter-increment: ch; }
.guide-contents li::before { content: counter(ch, decimal-leading-zero); position: absolute; left: 0; top: .1rem; font: 600 .75rem/1.6 var(--f-label); color: var(--bright); letter-spacing: .08em; }
.guide-contents b { display: block; color: var(--text); font: 700 1.05rem/1.3 var(--f-head); letter-spacing: -0.01em; margin-bottom: .2rem; }
.guide-form { margin-top: clamp(28px, 4vw, 40px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--line); }
.guide-form label { display: block; color: var(--muted); margin-bottom: .7rem; }
.guide-field { display: flex; gap: 10px; }
.guide-field input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 1rem;
  background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 0;
  font: 400 1rem/1 var(--f-body);
}
.guide-field input::placeholder { color: var(--muted); }
.guide-field input:focus { outline: none; border-color: var(--bright); }
.guide-field .btn { white-space: nowrap; }
.guide-note { margin: .8rem 0 0; color: var(--muted); font-size: .9rem; }
.guide-note[data-state="error"] { color: #ff8a8a; }
.guide-note[data-state="ok"] { color: var(--bright); }
@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-preview { max-width: 520px; }
}
@media (max-width: 520px) {
  .guide-field { flex-direction: column; }
  .guide-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Armoured character: the cut-out render on a soft blue glow */
.char-hero { background: radial-gradient(60% 70% at 50% 60%, #10304c 0%, #05080c 75%); display: flex; justify-content: center; padding-top: clamp(24px, 4vw, 48px); }
.char-hero img { width: auto; max-width: 100%; height: min(78vh, 760px); object-fit: contain; object-position: center bottom; }
figure.frame.square-hero { max-width: min(100%, 82vh, 760px); margin-inline: auto; }   /* square render, kept within one screen */

/* Two vertical videos side by side, kept to a sensible height */
.gallery-tall { max-width: 760px; }

/* Selected work: one feature project, then a curated 2-column grid, all frames the same shape */
.projects .project .frame { aspect-ratio: 16 / 10; overflow: hidden; }
.projects .project .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.22, 1, .36, 1); }
.projects a.project:hover .frame img { transform: scale(1.03); }
.project-feature { grid-column: 1 / -1; }
.project-feature .frame { aspect-ratio: 21 / 9 !important; }
.project-feature h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.project-meta { display: flex; gap: .9rem; align-items: baseline; }
.project-meta .num { color: var(--bright); }
.projects .project-art .frame { display: block; background: radial-gradient(60% 70% at 50% 60%, #10304c 0%, #05080c 75%); }
.projects .project-art .frame img { object-fit: contain; object-position: center bottom; -webkit-mask-image: none; mask-image: none; padding-top: 4%; }
.more-work { margin-top: clamp(40px, 6vw, 72px); padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); border: 1px dashed rgba(232,238,244,.22);
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; }
.more-work p { margin: 0; color: #c9d4de; font-size: 1.05rem; max-width: 46ch; }
.more-work .row { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.more-work .more-link { color: var(--bright); }
.project-feature .frame img { object-position: center top; }

/* Mech environment: big, unmissable link to the 12-stage breakdown */
.breakdown-btn, .section .breakdown-btn { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: 1.4rem; row-gap: .25rem;
  margin-top: 1.6rem; padding: 1.15rem 1.6rem 1.15rem 1.8rem; border-radius: var(--r-md); text-align: left;
  background: var(--bright); border-color: var(--bright); color: #00131f; box-shadow: 0 16px 40px rgba(26,155,230,.35); }
.breakdown-btn span { font: 800 clamp(1.05rem, 1.8vw, 1.35rem)/1.15 var(--f-label); letter-spacing: .06em; }
.breakdown-btn small { grid-row: 2; font: 600 .78rem/1.2 var(--f-label); letter-spacing: .08em; opacity: .75; text-transform: uppercase; }
.breakdown-btn i { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 1.8rem; transition: transform .2s; }
.breakdown-btn:hover { background: var(--text); border-color: var(--text); }
.breakdown-btn:hover i { transform: translateX(4px); }
.section .breakdown-btn { color: #00131f; margin-bottom: 0; }
.section .breakdown-btn:hover { color: #000; }

/* Armoured character: sculpting timelapse beside a 2x2 block of sculpt stills */
.sculpt-block { display: grid; grid-template-columns: 9fr 8fr 8fr; grid-template-rows: 1fr 1fr; gap: clamp(10px, 1.6vw, 16px); }
.sculpt-block .frame { margin: 0; min-height: 0; }
.sculpt-block .sculpt-video { grid-row: 1 / 3; }
.sculpt-block video { width: 100%; height: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; }
.sculpt-block img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .sculpt-block { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .sculpt-block .sculpt-video { grid-row: auto; grid-column: 1 / -1; } .sculpt-block video { aspect-ratio: 4 / 5; } }
/* Breakdown button: single line, white text, space below before the first render */
.breakdown-btn, .section .breakdown-btn { color: #fff; row-gap: 0; margin-bottom: clamp(24px, 3vw, 36px); }
.breakdown-btn i { grid-row: 1; }
.breakdown-btn:hover, .section .breakdown-btn:hover { color: #000; }
.section .breakdown-btn { margin-bottom: 0; }
.credit-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232,238,244,.4); }
.credit-link:hover { color: var(--bright); }
.more-work p { max-width: none; }
.more-work a { color: var(--bright); text-decoration: underline; text-underline-offset: 3px; }
.more-work a:hover { color: var(--text); }

/* Lusso: bigger video, overview panel stretches to the video's full height */
.showcase { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; }
.showcase .video-frame { margin: 0; }
.showcase .overview { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(22px, 2.6vw, 36px);
  border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(26,155,230,.08), rgba(26,155,230,0) 55%), var(--field); }
.showcase .overview p { font-size: clamp(1.02rem, 1.35vw, 1.2rem); line-height: 1.6; }
.showcase .overview p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }
.showcase .overview { justify-content: flex-start; }
.showcase .overview .mono + p { margin-top: auto; }
.fine-print { margin: .9rem 0 0; color: var(--muted); font-size: .82rem; }
/* Lusso overview: text at the top, the list of disciplines at the bottom of the panel */
.showcase .overview .mono + p { margin-top: 0; }
.overview-list { list-style: none; margin: auto 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .55rem; }
.overview-list li { position: relative; padding-left: 1.1rem; font: 600 .98rem/1.3 var(--f-body); color: var(--text); }
.overview-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--bright); }
/* Click-to-play video with a big round play button */
.play-video { position: relative; }
.play-video .play-btn { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--bright); color: #fff; box-shadow: 0 0 0 10px rgba(26,155,230,.2), 0 20px 50px rgba(0,0,0,.5); transition: transform .25s; }
.play-video .play-btn:hover { transform: scale(1.07); }
.play-video .play-btn svg { width: 32px; height: 32px; margin-left: 4px; }
.play-video.playing .play-btn { display: none; }
/* Lusso overview: "Simple, premium, easy to use" sits just above the list */
.overview-did { margin-top: auto; padding-top: 1rem; }
.overview-did h3 { margin: 0 0 .35rem; font: 700 1.15rem/1.2 var(--f-head); color: var(--text); }
.showcase .overview .overview-did p { margin: 0 0 1rem; font-size: .95rem; color: #c3ced9; }
.overview-did + .overview-list { margin-top: 0; }
/* Overview now holds more: slightly smaller text so the panel stays the video's height */
.showcase .overview { padding: clamp(18px, 2vw, 28px); }
.showcase .overview p { font-size: clamp(.92rem, 1.05vw, 1rem); line-height: 1.55; margin-bottom: .7rem; }
.showcase .overview .mono { margin-bottom: .7rem; }
.overview-did { padding-top: .6rem; }
.overview-did h3 { font-size: 1.05rem; }
.showcase .overview .overview-did p { font-size: .88rem; margin-bottom: .8rem; }
.overview-list { gap: .4rem; padding-top: .8rem; }
.overview-list li { font-size: .9rem; }
.showcase .video-frame { display: flex; flex-direction: column; }
.showcase .video-frame video { flex: 1; min-height: 0; object-fit: cover; }
/* Overview: larger text so the panel feels full (sizes scale with the screen to keep matching the video) */
.showcase .overview p { font-size: clamp(.92rem, 1.2vw, 1.12rem); line-height: 1.6; margin-bottom: .9rem; }
.overview-did h3 { font-size: clamp(1.05rem, 1.45vw, 1.35rem); }
.showcase .overview .overview-did p { font-size: clamp(.88rem, 1.1vw, 1.02rem); }
.overview-list { gap: clamp(.4rem, .6vw, .6rem); }
.overview-list li { font-size: clamp(.9rem, 1.1vw, 1.02rem); }
.showcase .overview p { font-size: clamp(.95rem, 1.32vw, 1.2rem); }
.overview-did h3 { font-size: clamp(1.1rem, 1.6vw, 1.45rem); }
.showcase .overview .overview-did p { font-size: clamp(.9rem, 1.2vw, 1.08rem); }
.overview-list li { font-size: clamp(.92rem, 1.2vw, 1.08rem); }
.showcase .overview p { font-size: clamp(.95rem, 1.32vw, 1.1rem); }
.overview-did h3 { font-size: clamp(1.1rem, 1.6vw, 1.32rem); }
.showcase .overview .overview-did p { font-size: clamp(.9rem, 1.2vw, 1rem); }
.overview-list li { font-size: clamp(.92rem, 1.2vw, 1rem); }
@media (max-width: 1000px) { .showcase { grid-template-columns: 1fr; } .showcase .video-frame video { object-fit: contain; } }
