/* ==========================================================================
   mikepoly.com — static rebuild
   Matches the original site look (clean, white, sans-serif)
   ========================================================================== */

:root {
  --text:        #2b2b2b;
  --text-soft:   #000; /* was #555 — flipped to pure black project-wide */
  --text-muted:  #000; /* was #888 — same */
  --bg:          #ffffff;
  --bg-soft:     #f6f6f6;
  --border:      #e5e5e5;
  --link:        #2b2b2b;
  --link-hover:  #888;
  --accent:      #6b5cff;
  --max:         1400px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--link-hover); }

/* All headings: a touch smaller and heavier than browser defaults. */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 2.25rem; } /* +50% — bigger section headings (e.g. "Recent Work.") */
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

/* ---------- Header / nav ---------- */
.site-header {
  /* No longer sticky — scrolls away with the rest of the page. */
  background: var(--bg);
}
.nav {
  /* No max-width — header spans the full viewport with its own
     horizontal padding. The 1400px content column does NOT apply here. */
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand img {
  width: 150px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
}
@media (max-width: 720px) {
  /* Compact mode — slightly smaller logo so it fits next to the nav links. */
  .nav-brand img { width: 110px; height: 50px; }
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
/* No coloured highlight on active/hover — stays the regular text colour
   with a subtle underline on hover for affordance. */
.nav-links a.active,
.nav-links a:hover { color: var(--text); }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hamburger toggle — hidden on desktop, shown on small viewports. */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 26px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .site-header .nav {
    flex-wrap: wrap;
    align-items: center;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
    position: relative;
    z-index: 110;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 80px 24px 24px;
    margin: 0;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .nav-links a {
    font-size: 1.6rem;
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  body:has(.nav-links.is-open) {
    overflow: hidden;
  }
}

/* ---------- Layout ---------- */
.container {
  /* No max-width — content is flexible, full viewport with side padding. */
  padding: 0 48px;
}
/* Use the long-hand padding so it doesn't blow away the horizontal
   padding from .container when both classes apply on the same element.
   That keeps the work-grid's left edge aligned with the header logo. */
.section       { padding-top: 48px; padding-bottom: 48px; }
.section-tight { padding-top: 28px; padding-bottom: 28px; }
/* Gap between a content section and the CTA banner that follows.
   This is the visible white space between the bottom of the cards/prose
   and the top edge of the CTA's background image. */
.section:has(+ .cta) { padding-bottom: 48px; }
/* Same 96px gap between the hero image and the "Recent Work." heading. */
.hero-image + .section { padding-top: 48px; }

/* ---------- Hero ---------- */
/* Same width + horizontal padding as the header .nav so the h1's
   left edge lines up exactly with the logo. */
.hero {
  text-align: center;
  padding: 48px 48px 24px;
}
.hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  max-width: 820px; /* keep line length readable when left-aligned */
}
.hero-image {
  position: relative;
  width: 100%;
  margin: 24px 0 0;
  /* Cinematic crop band — another 10% shorter than the previous 16/7. */
  aspect-ratio: 16 / 6.3;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* keep the top of the photo visible; crop from the bottom */
  display: block;
}
/* No tint — matches the Let's Work Together CTA, where the
   background image is shown at its natural colors. */

/* ---------- Cards / project grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  /* 96px lead-in above the cards — same value as the gap below the
     cards (to the CTA bg image) and the gap above "Recent Work." */
  margin: 48px 0 0;
}
.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.work-card .thumb {
  /* Width fills the column; height follows the image's natural ratio
     (matches the live mikepoly.com — no cropping). overflow: hidden
     contains the hover zoom inside the rounded corners. */
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-soft);
}
.work-card .thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease;
}
.work-card:hover .thumb img { transform: scale(1.03); }
.work-card h3 {
  margin-top: 16px;
  font-weight: 700;
  font-size: 1.05rem;
}

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---------- Body content (long-form pages) ---------- */
/* Block is centered on the page (max-width + auto margins),
   text inside reads left-aligned. Use `.prose.center` if you want
   the text itself centered too. */
.prose {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.prose h2 { margin-top: 0; }
/* "Recent Work." intro on the home page — slimmer column for easier reading. */
.prose.center { max-width: 600px; }
.prose.center p { color: var(--text); }
.prose p {
  color: var(--text-soft);
  text-align: justify;
  hyphens: auto;
}

/* ---------- About: heading-on-left / text-on-right two-column layout ---- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 128px; /* +100% — wider gap between heading and content columns */
}
/* When the left column has its own copy (contact page), style it here. */
.bio-heading h2 {
  margin: 0 0 .75em;
}
.bio-heading p,
.bio-heading p.lead {
  color: #000;
  margin: 0 0 1em;
  font-size: 0.95rem; /* smaller intro copy in the heading column */
  line-height: 1.5;
}
.bio-content h2 {
  margin: 0 0 .75em;
  /* heading still works at the top of the right column when present */
}
.bio-content p {
  color: #000;
  text-align: justify;
  hyphens: auto;
  margin: 0 0 1.25em;
}
.bio-content p:last-child { margin-bottom: 0; }

/* Contact page variant: heading copy on left, form on right, columns
   share the available width 50/50. */
.bio-grid:has(#contact-form) {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 900px) {
  /* On narrow viewports stack the heading above the text. */
  .bio-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .bio-grid:has(#contact-form) { grid-template-columns: 1fr !important; }
}

/* ---------- Contact page: main copy + form labels all black -------------- */
.prose p.lead { color: #000; }
#contact-form label span { color: #000; }

/* ---------- CTA banner ---------- */
/* Background spans the full viewport, but the inner content is left-aligned
   inside the same 1180px column the header uses, so the heading/paragraph/
   button all start at the same x as the logo. The padding math keeps
   that alignment on any viewport down to 1180px and falls back to 28px
   for narrow screens. */
.cta {
  position: relative;
  text-align: left;
  /* Symmetric vertical padding so the heading + button block sits with
     equal breathing room above and below. */
  padding-top: 96px;
  padding-bottom: 96px;
  padding-left:  48px;
  padding-right: 48px;
  background-size: cover;
  background-position: center;
  color: var(--text);
}
/* No overlay — show the background image at its natural tint. */
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: var(--text); font-weight: 700; font-size: 2.25rem; } /* +50% */
.cta p  {
  color: var(--text);
  max-width: 475px;
  margin: 0 0 32px;
}
.cta .btn {
  display: inline-block;
  padding: 12px 36px;
  background: var(--text);
  border: 1px solid var(--text);
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: .04em;
  margin: 0 6px 0 0;
  transition: background-color .2s ease, color .2s ease;
}
.cta .btn:hover {
  background: transparent;
  color: var(--text);
}

/* ---------- Project pages ---------- */
/* Outer section is centered on the page (max-width + auto margins).
   Headings and paragraphs share a 760px inner column that's also
   centered horizontally — but the text within reads left-aligned.
   Galleries / devices opt out and use the full 1100px width. */
.project-hero {
  padding: 18px 48px;
  text-align: left;
}
.project-hero h1 {
  font-size: 2rem;
  font-weight: 700;
}
.project-section {
  padding: 18px 48px;
}
.project-section h2 {
  font-weight: 700;
  font-size: 2.1rem; /* +50% from 1.4rem */
  margin-bottom: 1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.project-section p {
  color: var(--text-soft);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
  hyphens: auto;
}
/* Inside the project page bio-grid, keep paragraphs black and let
   them stretch the full column (no 760px max-width override). */
.project-section .bio-content p {
  color: #000;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
/* Extra breathing room above the first project section when it opens
   with a bio-grid (e.g. wavio-ios) — pushes the title further from
   the header. */
.project-section:has(> .bio-grid) {
  padding-top: 80px;
}

.devices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}
.devices img {
  width: 100%;
  border-radius: 8px;
}
@media (max-width: 800px) {
  .devices { grid-template-columns: repeat(2,1fr); }
}

.full-bg {
  display: block;
  max-width: 585px;
  /* Always leave at least 24px gutter on each side, even on narrow screens. */
  width: calc(100% - 48px);
  height: auto;
  margin: 0 auto; /* center horizontally */
}

/* ---------- Image with overlaid heading + copy ---------- */
/* Container is cropped to a shorter cinematic band so the photo doesn't
   tower above the overlaid text. Keeps the centered margin behaviour. */
.hero-overlay {
  position: relative;
  margin: 20px auto;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 8px;
}
.hero-overlay > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px;
  /* Subtle dark wash so the white text reads clearly over any photo. */
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}
.hero-overlay-text h2,
.hero-overlay-text p {
  color: #fff;
  max-width: 760px;
  margin: 0 0 .5em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.hero-overlay-text p:last-child { margin-bottom: 0; }

.gallery-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0;
}
.gallery-3 figcaption,
.captioned figcaption {
  margin-top: 5px;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.captioned { margin: 0; }

.gallery-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 20px 0;
}
.gallery-1 > img,
.gallery-2 > img,
.gallery-2 .captioned img,
.gallery-3 > img,
.gallery-3 .captioned img,
.gallery-4 > img,
.gallery-4 .captioned img,
.gallery-5 > img,
.gallery-6 > img,
.wireframes-feature .captioned img,
.wireframes-feature .gallery-4 .captioned img,
.wireframes-feature .gallery-1 img,
.broadcast-row .broadcast-image img {
  border-radius: 8px !important;
}
.gallery-2 > img,
.gallery-2 .captioned img,
.gallery-3 > img,
.gallery-3 .captioned img,
.gallery-4 > img,
.gallery-4 .captioned img,
.gallery-6 > img {
  display: block;
  width: 100%;
  height: auto;
}
.gallery-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin: 20px 0;
  background-color: rgb(39, 33, 30);
  padding: 56px 40px;
  border-radius: 8px;
}
.gallery-4 .captioned figcaption {
  color: #fff;
}
.gallery-4 .captioned figcaption strong {
  color: #fff;
}

/* Wrapper that bundles the captioned wireframes gallery with a
   broadcast-screen feature row underneath, sharing one dark band. */
.wireframes-feature {
  background-color: rgb(39, 33, 30);
  padding: 56px 40px;
  border-radius: 8px;
  margin: 20px 0;
}
.wireframes-feature .gallery-2,
.wireframes-feature .gallery-3,
.wireframes-feature .gallery-4,
.wireframes-feature .gallery-5,
.wireframes-feature .gallery-6 {
  background-color: transparent;
  padding: 0;
  margin: 0 0 64px;
  border-radius: 0;
}
.wireframes-feature > *:last-child {
  margin-bottom: 0 !important;
}
.wireframes-feature .captioned figcaption,
.wireframes-feature .captioned figcaption strong { color: #fff; }
.broadcast-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.broadcast-row .broadcast-image {
  display: flex;
  justify-content: center;
}
.broadcast-row .broadcast-image img {
  width: 100%;
  max-width: 285px; /* matches one wireframe column above */
  height: auto;
  display: block;
  border-radius: 8px;
}
.broadcast-row .broadcast-text { color: #fff; }
.project-section .broadcast-row .broadcast-text h2 {
  color: #fff;
  text-align: left;
  max-width: none;
  margin: 0 0 32px;
}
.project-section .broadcast-row .broadcast-text p {
  color: #fff;
  max-width: none;
  margin: 0 0 24px;
  text-align: left;
  hyphens: none;
}
.project-section .broadcast-row .broadcast-text p:last-child {
  margin-bottom: 0;
}
@media (max-width: 800px) {
  .broadcast-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.gallery-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin: 20px 0;
  background-color: rgb(39, 33, 30);
  padding: 56px 40px;
  border-radius: 8px;
}
.gallery-6 > img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
/* 5-image filmstrip — every image renders at the same fixed height with
   its natural width (no cropping). First and last images sit at the
   row edges (aligned with the header margins); the inner images sit
   close together with the gap acting as their minimum spacing. */
.gallery-5 {
  display: flex;
  flex-wrap: nowrap;
  margin: 20px 0;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.gallery-5 > img {
  height: 260px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Modifier for tall paper-prototype filmstrips (e.g., today-ios's
   3 large paper photos). Same-height filmstrip on a single row that
   continuously scales heights down on smaller viewports rather than
   wrapping. */
.paper-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.paper-strip > img {
  height: clamp(220px, 26vw, 700px) !important;
  width: auto !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
  object-fit: fill !important;
  border-radius: 8px !important;
}
@media (max-width: 1100px) {
  .paper-strip {
    flex-direction: column !important;
    align-items: center !important;
  }
  .paper-strip > img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
}
.gallery-1 {
  margin: 20px 0;
}

@media (max-width: 900px) {
  .gallery-2,
  .gallery-3,
  .gallery-4,
  .gallery-5,
  .gallery-6 {
    grid-template-columns: 1fr !important;
  }
  /* gallery-5 uses display:flex; force single-image rows by stacking vertically. */
  .gallery-5 {
    flex-direction: column !important;
    align-items: center !important;
  }
  .gallery-5 > img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    max-width: 100% !important;
  }
}

/* Pagination links between projects */
.proj-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 32px 0 0;
  padding: 16px 0;
}
.proj-nav a {
  font-size: 0.9rem;
  color: #000;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.proj-nav a strong {
  display: block;
  font-size: 2.1rem;
  text-transform: none;
  letter-spacing: 0;
  color: #000;
  margin-top: 6px;
  font-weight: 700;
}
.proj-nav .next { text-align: right; }

/* ---------- Footer ---------- */
/* Dark warm-charcoal footer that sits flush against the CTA section
   above it (no border, no margin gap). White text, content column
   aligned with the header logo on the left. */
.site-footer {
  background: rgb(39, 33, 30);
  color: #fff;
  padding-top: 64px;
  padding-bottom: 64px;
  margin-top: 0;
}
.site-footer .inner {
  /* No max-width — footer spans the full viewport with its own
     horizontal padding, independent of the content column. */
  padding: 0 48px;
  text-align: left;
}
.site-footer h3 {
  /* Same size + weight as the other section headings (Recent Work.,
     In Focus., Let's Work Together.) so "Mike's Info." reads like a
     proper section title. */
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: #fff;
}
.site-footer .meta {
  color: #fff;
  font-size: 0.9rem;
  margin: .25rem 0;
}
.site-footer .links a { margin: 0 14px 0 0; color: #fff; }
.site-footer .links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Helpers ---------- */
.center { text-align: center; }
.muted  { color: var(--text-muted); }
.lead   { font-size: 1.15rem; }
