/* Public site (home, about, portfolio, pricing, FAQ). Builds on tokens.css:
   every colour comes from a token, never a literal. Sizes follow artboard
   "A. Gallery" and "A on a phone". */

/* ── Base ─────────────────────────────────────────────── */
body {
  font-size: 17px;
  line-height: 1.55;
}

main { display: block; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p { margin: 0; }

main a:not(.btn) { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.site-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--ink); }
.btn-dark { background: var(--ink); color: var(--on-accent); }
.btn-dark:hover { background: var(--accent); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--on-accent); }

/* ── Headings shared by inner pages ───────────────────── */
.section-title {
  font-size: 40px;
  line-height: 1.1;
}

.page-intro {
  padding-top: 56px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin-left: 0;
}
.page-intro h1 { font-size: 52px; line-height: 1.05; letter-spacing: -0.025em; }
.page-intro p { font-size: 19px; color: var(--ink-2); max-width: 620px; }

/* ── Header ───────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}

.site-nav { display: flex; align-items: center; gap: 32px; font-size: 16px; }
.site-nav a {
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.site-cta { padding: 12px 22px; font-size: 16px; }

.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--ink);
  border-radius: 1px;
}

/* ── Phone menu ───────────────────────────────────────── */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--surface);
  padding: 12px 20px calc(32px + env(safe-area-inset-bottom));
  flex-direction: column;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; }

.nav-mobile-body { display: flex; flex-direction: column; flex: 1 0 auto; }

.nav-mobile-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.nav-mobile-links a {
  padding: 18px 0;
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-mobile-links a[aria-current="page"] { color: var(--accent); }

.nav-mobile-cta { margin-top: auto; width: 100%; }

/* ── Phone "Start a project" bar ──────────────────────── */
.mobile-cta-bar { display: none; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 56px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--ink-3);
}
#site-footer { border-top: 1px solid var(--line); margin-top: 56px; }
.site-footer-meta a { text-decoration: none; }
.site-footer-meta a:hover { text-decoration: underline; }

/* ── Smaller screens ──────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav, .site-cta { display: none; }
  .nav-hamburger { display: flex; }
  .site-header-inner { padding: 12px 20px; }
  .site-logo { font-size: 19px; }
}

@media (max-width: 640px) {
  .site-container { padding: 0 20px; }
  .page-intro { padding-top: 32px; padding-bottom: 24px; }
  .page-intro h1 { font-size: 36px; }
  .page-intro p { font-size: 17px; }
  .section-title { font-size: 28px; }

  .site-footer-inner {
    padding: 22px 20px calc(96px + env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
  }

  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--ink-2);
  }
  .mobile-cta-bar .btn { padding: 13px 20px; font-size: 16px; }
  .mobile-cta-bar.is-hidden { display: none; }
}

/* ── Closing call to action (about, pricing, FAQ, home) ─ */
.about-cta, .pricing-cta, .faq-cta, .home-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 56px;
  padding-bottom: 8px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.about-cta h2, .pricing-cta h2, .faq-cta h2, .home-cta h2 {
  font-size: 34px;
  line-height: 1.15;
  flex: 1 1 100%;
}
.about-cta p, .pricing-cta p, .faq-cta p { font-size: 18px; color: var(--ink-2); flex: 1 1 420px; }
.faq-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ── About ────────────────────────────────────────────── */
.about-intro h1 { font-size: 58px; }
.about-subtitle { font-size: 19px; color: var(--ink-2); }

.about-main {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: start;
}
.about-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-bio { max-width: 680px; display: flex; flex-direction: column; gap: 20px; font-size: 19px; color: var(--ink-2); }

.about-creds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 64px;
}
.cred-card {
  padding: 28px 32px 0 0;
  border-top: 1px solid var(--line);
}
.cred-card + .cred-card { padding-left: 32px; border-left: 1px solid var(--line); }
.cred-label { font-size: 15px; color: var(--ink-3); }
.cred-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.cred-sub { font-size: 16px; color: var(--ink-2); margin-top: 4px; }

/* ── Pricing ──────────────────────────────────────────── */
.pricing-tagline, .faq-tagline { font-size: 19px; color: var(--ink-2); }

.pricing-section { padding-top: 48px; padding-bottom: 8px; }
.pricing-section-label { font-size: 15px; color: var(--ink-3); }
.pricing-section-title { font-size: 32px; line-height: 1.15; margin: 4px 0 28px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.pricing-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pc-name { font-size: 18px; font-weight: 600; }
.pc-price { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; }
.pc-price-label { font-size: 14px; color: var(--ink-3); }
.pc-desc { font-size: 16px; color: var(--ink-2); }
.pc-alt-price {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}
.pc-alt-price-value { font-weight: 600; color: var(--ink); }

.pricing-divider { display: none; }

.addon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  border-top: 1px solid var(--line);
}
.addon-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.addon-price { font-weight: 600; white-space: nowrap; }
.addon-for { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.pricing-note { font-size: 15px; color: var(--ink-3); margin-top: 20px; max-width: 760px; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq-section { display: flex; flex-direction: column; gap: 48px; padding-top: 16px; }
.faq-group { max-width: 880px; }
.faq-group-title { font-size: 26px; margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-group-title + .faq-item { border-top: 1px solid var(--line); }
.faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 500;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--ink-2); }
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 0 20px; font-size: 17px; color: var(--ink-2); max-width: 760px; }
.faq-a a { color: var(--accent); }

/* ── Page sections on smaller screens ─────────────────── */
@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .about-main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about-creds { grid-template-columns: minmax(0, 1fr); }
  .cred-card, .cred-card + .cred-card { padding: 20px 0; border-left: 0; }
  .addon-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .about-intro h1 { font-size: 36px; }
  .about-subtitle, .about-bio, .pricing-tagline, .faq-tagline { font-size: 17px; }
  .pricing-grid, .pricing-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .pricing-section-title { font-size: 26px; }
  .about-cta, .pricing-cta, .faq-cta, .home-cta { flex-direction: column; align-items: stretch; margin-top: 40px; padding-top: 28px; }
  .about-cta h2, .pricing-cta h2, .faq-cta h2, .home-cta h2 { font-size: 26px; }
  .about-cta p, .pricing-cta p, .faq-cta p { flex: 0 0 auto; }
  .faq-cta-actions { flex-direction: column; }
  .about-cta .btn, .pricing-cta .btn, .faq-cta .btn, .home-cta .btn { width: 100%; }
}

/* ── Filter chips (portfolio) ─────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chip:hover { background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-accent); }

/* ── Photo tiles (portfolio) ──────────────────────────── */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.pf-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  aspect-ratio: 4 / 5;
}
.pf-item[hidden] { display: none; }
.pf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.pf-item:hover img { transform: scale(1.04); }

.pf-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  background: var(--scrim);
  color: var(--on-accent);
  transform: translateY(101%);
  transition: transform 0.3s ease;
}
.pf-cap { font-size: 16px; font-weight: 600; }
.pf-item:hover .pf-cap, .pf-item:focus-visible .pf-cap { transform: translateY(0); }

.pf-video-thumb { display: block; width: 100%; height: 100%; background: var(--placeholder); }

/* Touch screens have no hover: show the caption under each photo */
@media (hover: none) {
  .pf-item { aspect-ratio: auto; overflow: visible; background: none; }
  .pf-item img { height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--placeholder); }
  .pf-item:hover img { transform: none; }
  .pf-cap { position: static; transform: none; background: none; color: var(--ink); padding: 10px 0 0; }
}

/* ── Portfolio page ───────────────────────────────────── */
.pf-header { max-width: none; }
.pf-title { font-size: 58px; }

/* ── Lightbox ─────────────────────────────────────────── */
.pf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--backdrop);
  align-items: center;
  justify-content: center;
  padding: 72px 88px 56px;
  touch-action: pan-y pinch-zoom;
}
.pf-lightbox.open { display: flex; }
.pf-lb-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pf-lb-img { display: contents; }
.pf-lb-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); }
.pf-lb-video-mode .pf-lb-img iframe { width: min(100%, 1280px); aspect-ratio: 16 / 9; border: 0; }
.pf-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.pf-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.pf-lb-nav:hover { background: var(--bg); }
.pf-lb-prev { left: 20px; }
.pf-lb-next { right: 20px; }
.pf-lb-nav[hidden] { display: none; }
.pf-lb-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 15px;
  color: var(--on-accent);
}

@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pf-title { font-size: 36px; }
  .pf-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px 4px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; font-size: 15px; padding: 0 18px; }
  .pf-lightbox { padding: 64px 8px 56px; }
  .pf-lb-nav { top: auto; bottom: 8px; transform: none; width: 44px; height: 44px; font-size: 26px; }
  .pf-lb-prev { left: 12px; }
  .pf-lb-next { right: 12px; }
}

/* ── Homepage ─────────────────────────────────────────── */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-areas: "text frame" "thumbs frame";
  grid-template-rows: auto 1fr;
  column-gap: 56px;
  row-gap: 40px;
  padding-top: 48px;
  padding-bottom: 88px;
}
.home-hero-text { grid-area: text; display: flex; flex-direction: column; gap: 28px; }
.home-hero-text h1 { font-size: 58px; line-height: 1.04; letter-spacing: -0.025em; }
.home-hero-text p { font-size: 19px; color: var(--ink-2); max-width: 460px; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.home-hero-frame {
  grid-area: frame;
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 780px;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
  justify-self: end;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-img.is-active { opacity: 1; }
.hero-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 14px 20px;
  background: var(--scrim);
  color: var(--on-accent);
  font-size: 15px;
  border-top-right-radius: var(--radius);
}

.home-hero-thumbs { grid-area: thumbs; align-self: end; }
.hero-thumbs-label { font-size: 15px; color: var(--ink-3); margin-bottom: 12px; }
.hero-thumb-row { display: flex; gap: 12px; }
.hero-thumb {
  width: 84px;
  height: 110px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
  cursor: pointer;
  opacity: 0.55;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: opacity 0.25s ease;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover { opacity: 0.85; }
.hero-thumb[aria-pressed="true"] { opacity: 1; outline-color: var(--accent); }
.hero-thumb:focus-visible { outline: 3px solid var(--accent); }

.home-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
}
.home-services h2 { font-size: 22px; margin-bottom: 10px; }
.home-services p { font-size: 17px; color: var(--ink-2); }

.home-cta h2 { flex: 1 1 auto; max-width: 560px; }

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "text" "frame" "thumbs";
    grid-template-rows: auto;
    row-gap: 0;
    padding-top: 28px;
    padding-bottom: 56px;
  }
  .home-hero-text { gap: 18px; margin-bottom: 28px; }
  .home-hero-frame { max-height: none; justify-self: stretch; }
  .home-hero-thumbs { padding-top: 12px; }
  .hero-thumbs-label { display: none; }
}

@media (max-width: 640px) {
  .home-hero-text h1 { font-size: 36px; line-height: 1.08; }
  .home-hero-text p { font-size: 17px; }
  .home-hero-actions .btn { flex: 1; padding: 15px 10px; font-size: 16px; text-align: center; }
  .home-hero-frame { margin: 0 -20px; width: auto; border-radius: 0; }
  .hero-caption { font-size: 14px; padding: 10px 14px; }
  .hero-thumb-row { gap: 10px; }
  .hero-thumb { flex: 1; width: auto; height: 76px; }
  .home-services { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 40px; padding-top: 28px; }
  .home-services h2 { font-size: 20px; margin-bottom: 6px; }
  .home-services p { font-size: 16px; }
}
