/* Styles for inner pages (services, work, guides). Built on the tokens in home.css. */

body.page { background: #FFFFFF; color: #0F1115; }

/* light-context tokens for every inner-page section (home.css defaults are the dark context) */
.p-hero, .p-sec:not(.p-sec--dark) {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-raised: #F2F4F7;
  --line: #E5E8ED;
  --text: #0F1115;
  --text-2: #4A5160;
  --text-3: #7E8493;
  --muted: #4A5160;
  --brass: #4A5160;
  --btn-primary-hover-bg: #21252D;
  --btn-ghost-border: #0F1115;
  --btn-ghost-hover-bg: rgba(15, 17, 21, 0.05);
  color: var(--text);
}

/* nav links on inner pages point across pages, so keep them uppercase pills like home */
.nav__link.is-current { color: #0F1115; }

.wrap { max-width: var(--maxw); margin: 0 auto; }
.narrow { max-width: 760px; }

/* ---------- page hero ---------- */
.p-hero {
  position: relative;
  padding: clamp(132px, 14vw, 176px) var(--gutter) clamp(64px, 8vw, 104px);
  background: #FFFFFF;
  overflow: hidden;
}
.p-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,17,21,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,17,21,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.p-hero__grid {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.p-hero__grid--single { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: #7E8493; margin-bottom: 22px;
}
.crumbs a { color: #4A5160; }
.crumbs span[aria-hidden] { color: #C5CAD3; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.p-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #0F1115;
}
.p-hero__lead {
  margin-top: 22px;
  font-size: clamp(16.5px, 1.5vw, 19px);
  line-height: 1.65;
  color: #4A5160;
  max-width: 58ch;
}
.p-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.p-hero .btn--primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.p-hero .btn--primary:hover { background: #E85A27; border-color: #E85A27; }
.p-hero .btn--ghost { color: #0F1115; border-color: #0F1115; }
.p-hero__facts {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px;
  font-size: 14px; color: #4A5160;
}
.p-hero__facts li { list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.p-hero__facts li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.p-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: 14px; color: #7E8493; }

/* stacked document pages in the hero */
.docs {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 480px;
  justify-self: end;
  width: 100%;
}
.docs__page {
  position: absolute;
  width: 68%;
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15,17,21,.08), 0 22px 48px rgba(15,17,21,.16);
  border: 1px solid rgba(15,17,21,.08);
}
.docs__page img { display: block; width: 100%; height: auto; }
.docs__page--back { right: 0; top: 0; transform: rotate(3deg); }
.docs__page--front { left: 0; bottom: 0; transform: rotate(-2deg); }

/* ---------- sections ---------- */
.p-sec { padding: clamp(72px, 9vw, 120px) var(--gutter); background: #FFFFFF; }
.p-sec--alt { background: #FAFAFA; border-top: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; }
.p-sec--dark { background: var(--bg-dark); color: #F2F4F7; }
.p-sec__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.p-sec h2, .p-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.p-sec__head p { margin-top: 16px; font-size: 17px; line-height: 1.7; color: #4A5160; }
.p-sec--dark .p-sec__head p { color: #AEB4BF; }

/* problem / answer split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.split__col h3 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #7E8493; margin-bottom: 18px;
}
.split__col--good h3 { color: var(--accent); }
.ticks { list-style: none; display: grid; gap: 14px; }
.ticks li {
  position: relative; padding-left: 30px;
  font-size: 16.5px; line-height: 1.6; color: #2B303A;
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #FFE7DD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6B35' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.crosses li::before {
  background: #EEF0F3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E8493' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* card grid */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: #FFFFFF;
  border: 1px solid #E5E8ED;
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}
.p-sec--alt .card { background: #FFFFFF; }
.card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; color: #0F1115; }
.card p { font-size: 15.5px; line-height: 1.65; color: #4A5160; }
.card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #0F1115; color: #FFFFFF;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  margin-bottom: 18px;
}

/* example gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot { margin: 0; }
.shot__frame {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E5E8ED;
  background: #F2F4F7;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .25s ease, transform .25s ease;
}
a.shot__frame:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.shot__frame img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: #4A5160; }
.shot figcaption strong { color: #0F1115; display: block; font-size: 15px; margin-bottom: 2px; }

/* work index cards */
.wcard { display: flex; flex-direction: column; gap: 14px; color: inherit; }
.wcard:hover { text-decoration: none !important; }
.wcard:hover .shot__frame { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.wcard__tag { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.wcard__title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: #0F1115; }
.wcard__desc { font-size: 15px; line-height: 1.6; color: #4A5160; }

/* price block */
.price {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  background: #0F1115; color: #F2F4F7;
  border-radius: 18px;
  padding: clamp(28px, 4vw, 44px);
}
.price__label { font-size: 12.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #AEB4BF; }
.price__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.02em; margin-top: 8px; }
.price__num small { font-size: 0.42em; font-weight: 500; color: #AEB4BF; letter-spacing: 0; }
.price__note { margin-top: 12px; font-size: 15.5px; line-height: 1.65; color: #AEB4BF; max-width: 58ch; }
.price .btn--primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

/* review quote */
.quote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 24px;
  max-width: 820px;
}
.quote p { font-size: clamp(18px, 2vw, 22px); line-height: 1.55; color: #0F1115; font-weight: 500; }
.quote footer { margin-top: 14px; font-size: 14px; color: #7E8493; }

/* related links */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px; border: 1px solid #E5E8ED; border-radius: 12px; background: #FFFFFF;
  font-weight: 600; font-size: 15.5px; color: #0F1115;
  transition: border-color .2s ease;
}
.related a:hover { border-color: #0F1115; text-decoration: none !important; }
.related a::after { content: "\2192"; color: var(--accent); font-weight: 700; }

/* FAQ on inner pages: single column */
/* FAQ layout comes from home.css (.faq__list two columns, .faq__col); --single keeps short lists full width */
.p-faq .faq__list--single { grid-template-columns: minmax(0, 1fr); }
.p-faq .faq__list--single .faq__col { display: flex; flex-direction: column; gap: 14px; }

/* ---------- article prose ---------- */
.prose { max-width: 720px; font-size: 17.5px; line-height: 1.75; color: #2B303A; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(25px, 2.8vw, 32px); line-height: 1.2; letter-spacing: -0.02em;
  color: #0F1115; margin-top: 2.1em;
}
.prose h3 { font-size: 20px; font-weight: 700; color: #0F1115; margin-top: 1.7em; letter-spacing: -0.01em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose strong { color: #0F1115; }
.prose a { color: #0F1115; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose figure { margin: 2em 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid #E5E8ED; }
.prose figcaption { font-size: 14px; color: #7E8493; margin-top: 10px; line-height: 1.5; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #E5E8ED; vertical-align: top; }
.prose th { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: #4A5160; background: #F7F8FA; }
.prose .callout {
  background: #FFF4EF; border: 1px solid #FFD9C8; border-radius: 12px; padding: 18px 20px;
  font-size: 16.5px;
}
.toc { background: #FAFAFA; border: 1px solid #EEF0F3; border-radius: 12px; padding: 20px 22px; font-size: 15.5px; }
.toc strong { display: block; font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #7E8493; margin-bottom: 10px; }
.toc ol { padding-left: 1.2em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.author {
  display: flex; gap: 16px; align-items: center;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid #E5E8ED; max-width: 720px;
}
.author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #F2F4F7; }
.author p { font-size: 15px; line-height: 1.6; color: #4A5160; }
.author strong { color: #0F1115; }

/* inner-page contact uses the home contact block (dark context); tighten its padding */
.page .contact,
.page .footer { background: var(--bg-dark); color: var(--text); }
.page .contact { padding-top: clamp(96px, 10vw, 140px); padding-bottom: clamp(96px, 10vw, 140px); border-top: 0; }
.footer--links .footer__inner { font-family: var(--font-sans); letter-spacing: normal; font-size: 14px; }

/* footer with links */
.footer--links .footer__inner {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; text-align: left;
}
.footer__col h4 { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #6B7280; margin-bottom: 14px; font-weight: 700; }
.footer__col ul { list-style: none; display: grid; gap: 9px; }
.footer__col a { color: #AEB4BF; font-size: 14.5px; }
.footer__col a:hover { color: #F2F4F7; }
.footer__brand p { color: #AEB4BF; font-size: 14.5px; line-height: 1.65; max-width: 34ch; margin-top: 10px; }
.footer__brand strong { color: #F2F4F7; font-size: 17px; }
.footer__copy { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid #2B2F38; color: #6B7280; font-size: 13.5px; }

@media (max-width: 1024px) {
  .p-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .docs { justify-self: start; max-width: 420px; }
  .cards, .gallery, .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer--links .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .split, .cards, .cards--2, .gallery, .gallery--2, .related { grid-template-columns: minmax(0, 1fr); }
  .price { grid-template-columns: minmax(0, 1fr); }
  .docs { max-width: 340px; }
  .footer--links .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 16.5px; }
}

/* =====================================================================
   Polish pass (2026-10-16): grid alignment, hero alignment, guide layout,
   compact figures, tables.
   ===================================================================== */

/* clip (not hidden) so position: sticky keeps working on guide pages */
body.page { overflow-x: clip; }

/* single-column heroes line up with the grid below instead of floating in the centre */
.p-hero__grid--single { max-width: var(--maxw); }
.p-hero__grid--single > div { max-width: 860px; }

/* example / card grids: every card uses the same A4-shaped frame, so US Letter and A4
   pages sit on one baseline and captions line up row by row */
.gallery { gap: 48px 32px; }
.shot__frame { aspect-ratio: 1 / 1.414; border-radius: 12px; }
.shot__frame img { width: 100%; height: 100%; object-fit: contain; object-position: top center; }
.shot figcaption { margin-top: 18px; display: grid; gap: 4px; font-size: 15px; line-height: 1.6; }
.shot figcaption strong { font-size: 16.5px; margin: 0; }
.shot figcaption span { display: block; }
.shot__more {
  justify-self: start; margin-top: 10px;
  font-weight: 600; font-size: 14.5px; color: #0F1115;
  border-bottom: 2px solid var(--accent); padding-bottom: 1px;
}
.shot__more:hover { color: var(--accent); text-decoration: none !important; }
.wcard { gap: 16px; }

/* guide pages: article + sticky sidebar, using the full container width */
.guide {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: start;
}
.guide .prose { max-width: none; }
.guide .author { max-width: none; }
.guide__side { position: sticky; top: 104px; display: grid; gap: 18px; }
.toc a { color: #2B303A; text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc li + li { margin-top: 8px; }
.side-cta { background: #0F1115; color: #F2F4F7; border-radius: 16px; padding: 26px 24px; }
.side-cta h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 10px; color: #F2F4F7; }
.side-cta p { font-size: 15px; line-height: 1.6; color: #AEB4BF; }
.side-cta .btn { margin-top: 18px; width: 100%; justify-content: center; background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.side-cta__price { margin-top: 14px; font-size: 13.5px !important; color: #7E8493 !important; }

/* figures inside articles: compact image beside its caption, click to enlarge */
.prose figure {
  margin: 2em 0; padding: 20px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center;
  background: #FAFAFA; border: 1px solid #EEF0F3; border-radius: 16px;
}
.prose figure a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid #E5E8ED; background: #FFFFFF; cursor: zoom-in; }
.prose figure img { width: 100%; height: auto; border: 0; border-radius: 0; display: block; }
.prose figcaption { margin: 0; font-size: 15px; line-height: 1.65; color: #4A5160; }
.prose figcaption::after { content: "Click the image to enlarge."; display: block; margin-top: 8px; font-size: 13px; color: #7E8493; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid #E5E8ED; border-radius: 14px; background: #FFFFFF; }
.table-wrap table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { padding: 15px 20px; border-bottom: 1px solid #E5E8ED; text-align: left; vertical-align: top; }
.prose th { background: #F2F4F7; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #4A5160; font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: #FBFBFC; }
.prose tbody td:first-child { font-weight: 600; color: #0F1115; }

@media (max-width: 1024px) {
  .guide { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .guide__side { display: contents; }
  .guide__side .toc { order: -1; }
  .guide__side .side-cta { order: 2; }
}
@media (max-width: 680px) {
  .prose figure { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .prose figure a { max-width: 280px; }
  .gallery { gap: 36px 20px; }
}

/* Case study sections: heading on the left, content on the right, so the page uses its full width */
.cs-section { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 64px; align-items: start; }
.cs-section__head { position: sticky; top: 112px; }
.cs-section__head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.15; letter-spacing: -0.025em; }
.cs-section__body .prose { max-width: 740px; }
.cs-section__body .gallery { margin-top: 36px !important; gap: 32px; }
@media (max-width: 1024px) {
  .cs-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cs-section__head { position: static; }
}
