/*
 * Site-wide type system.
 * Loaded after page-specific styles so the hierarchy stays consistent.
 * Recipe-card typography is managed separately to preserve its character.
 */
:root {
  --type-label: 0.78rem;
  --type-small: 0.9375rem;
  --type-body: 1rem;
  --type-lead: 1.125rem;
  --type-h3: 1.4rem;
  --type-h2: clamp(2rem, 3.4vw, 3rem);
  --type-display: clamp(3rem, 6vw, 5.5rem);
}

html { font-size: 16px; }

body,
body * {
  font-family: 'IM Fell English', serif !important;
}

body {
  font-size: var(--type-body);
  line-height: 1.6;
}

/* Keep the editorial front page composed on wide screens. */
.front-page-shell {
  width: 100%;
  border-bottom: 3px solid var(--ink);
}

.front-page {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  border-bottom: 0;
}

/* Small uppercase labels, navigation and metadata */
.masthead-top,
.masthead-nav a,
.mobile-nav-toggle,
.ticker-inner,
.hero-band-cta,
.hero-band-meta,
.eyebrow,
.byline,
.front-service-num,
.services-header h2,
.service-number,
.process-header h2,
.work-index-header h2,
.work-item-number,
.work-item-type,
.about-header-label,
.about-side-location,
.about-side-link,
.about-location,
.footer-left,
.footer-legal,
.footer-right,
.menu-header-label,
.menu-card-badge,
.docket-eyebrow,
.docket-studio-name,
.docket-field-label,
.docket-thankyou,
.ps-content h3,
.why-link,
.why-sub-label,
.sp-btn,
.sp-success-label,
.record-btn,
.svc-num,
.svc-tag,
.svc-includes-label,
.menu-card-includes,
.docket-studio,
.docket-label,
.docket-thank,
.why-link-label,
.journal-header h1,
.post-category,
.post-date,
.post-read-more,
.subscribe-form button,
.sidebar-label,
.post-cta a,
.cs-back,
.cs-meta-label,
.img-placeholder span,
.cs-process-col h3,
.cs-outcome-label,
.cs-testimonial-label p,
.cs-testimonial-attribution,
.aside-label,
.cs-cta a,
.privacy-sidebar nav a,
.privacy-body .updated,
.journal-header > span,
.post-header > a,
.post-header-inner > span,
.about-header > span:last-child,
.sp-right form > p:last-child {
  font-size: var(--type-label) !important;
  line-height: 1.35;
}

/* Main reading copy: a comfortable 16px baseline */
.hero-band-support,
.article-deck,
.article-body,
.founder-compact-intro,
.about-body,
.manifesto-body,
.sp-left p,
.sp-left .sp-email,
.sp-field input,
.sp-field select,
.sp-field textarea,
.sp-cs-trigger,
.sp-cs-option,
#sp-success p,
#sp-error,
.svc-body-col p,
.svc-includes li,
.start-project-left p,
.start-project-left .alt-email,
.sp-submit-note,
.post-deck,
.subscribe-left p,
.subscribe-form input[type="email"],
.post-body-main p,
.post-body-main li,
.cs-deck,
.cs-main p,
.privacy-body p,
.privacy-body li,
.page-header-left p,
.featured-post-sidebar p {
  font-size: var(--type-body) !important;
  line-height: 1.65;
}

/* Compact supporting copy remains clearly readable */
.front-service-desc,
.service-desc,
.process-step p,
.industry p,
.menu-card-desc,
.menu-card-includes-label,
.menu-card li,
.menu-disclaimer,
.docket-card,
.docket-field-value,
.docket-value,
.docket-date-line,
.ps-content p,
.why-col p,
.why-sub-link,
.sp-field-error,
.sidebar-section p,
.aside-section p,
.aside-section li,
.cs-process-col p,
.svc-includes li,
.pscontent p,
.why-faq {
  font-size: var(--type-small) !important;
  line-height: 1.6;
}

.sidebar-section a {
  font-size: var(--type-small) !important;
  line-height: 1.5;
}

/* Match the two Why Pixel Soufflé actions to the column grid. */
.why-link,
.why-sub-link a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0;
  box-sizing: border-box;
  line-height: 1.25;
}

.why-link { margin-bottom: 1rem; }
.why-sub-link { width: 100%; font-style: italic; }
.why-sub-link a { font-size: inherit; }

/* Headlines and display type */
.masthead-title h1 {
  font-size: clamp(4rem, 10vw, 8.5rem) !important;
  line-height: 0.9;
}

.hero-band-headline,
.page-headline,
.cs-title-col h1 {
  font-size: var(--type-display) !important;
  line-height: 0.96;
}

.article-headline.large,
.post-header .article-headline,
.privacy-body h1 {
  font-size: clamp(2.75rem, 5vw, 4.5rem) !important;
  line-height: 1;
}

.article-headline,
.about-headline,
.sp-left h2,
.start-project-left h2,
#sp-success h3 {
  font-size: var(--type-h2) !important;
  line-height: 1.08;
}

.founder-compact-title,
.pull-quote,
.manifesto-headline,
.subscribe-left h2,
.post-cta p,
.cs-pullquote,
.cs-testimonial-quote,
.cs-cta p {
  font-size: clamp(1.55rem, 2.5vw, 2.15rem) !important;
  line-height: 1.25;
}

.front-service-title,
.service-title,
.process-step h3,
.work-item-title,
.industry h3,
.about-role,
.about-side-title,
.why-col h2,
.svc-title-col h2,
.pscontent h3,
.post-body-main h2,
.cs-main h2,
.privacy-body h2 {
  font-size: var(--type-h3) !important;
  line-height: 1.2;
}

.post-card .post-headline {
  font-size: 1.75rem !important;
  line-height: 1.12;
}

.menu-card-title {
  font-size: 1rem !important;
  line-height: 1.25;
  align-items: center;
  height: 3.8125rem;
  min-height: 3.8125rem;
  padding-bottom: 1.25rem !important;
  box-sizing: border-box;
}

.menu-card-from,
.founder-mix,
.founder-acquainted,
.about-header-note,
.about-kicker,
.record-vibe-note,
.footer-cta {
  font-size: var(--type-lead) !important;
}

.menu-card-price { font-size: 2.75rem !important; }
.process-step-num,
.ps-num,
.psnum { font-size: 2.5rem !important; }
.cs-process-num { font-size: 3.25rem !important; }
.cs-outcome-num { font-size: 3rem !important; }
.cs-meta-value { font-size: 1.05rem !important; }
.masthead-tagline { font-size: 0.9rem !important; }
#sp-success::after { font-size: 0.5rem !important; }
.about-kicker { font-size: 1.5rem !important; }
.featured-post .post-headline {
  font-size: clamp(2.5rem, 4vw, 3.75rem) !important;
}

.manifesto-headline {
  font-style: normal;
}

/* Restore the studio's handwritten accents. */
.menu-card-from,
.founder-mix {
  font-family: 'Caveat', cursive !important;
  font-weight: 400;
}

.record-vibe-note,
.founder-compact-title .founder-name,
.about-header-note {
  font-family: 'Caveat', cursive !important;
  font-weight: 600;
}

/* Keep menu-card headings and rules on one shared baseline. */
.menu-card,
.menu-card.featured {
  padding-top: 2rem !important;
}

.menu-card-badge {
  width: max-content !important;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 1.1rem !important;
  box-sizing: border-box;
  line-height: 1.1;
}

/* Align process numerals with the first line of their copy. */
.ps-row,
.process-step-row {
  align-items: start;
}

.ps-num,
.psnum {
  align-self: start;
  transform: translateY(-0.08em);
}

/* Bottom-align the full desktop player unit with “Let’s get acquainted”. */
@media (min-width: 769px) {
  .founder-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    column-gap: 1.25rem;
  }

  .record-player-wrap {
    grid-column: 2;
    grid-row: 1 / 5;
    align-self: end;
    justify-self: end;
    float: none;
    margin: 0;
  }

  .founder-compact-title {
    grid-column: 1;
    grid-row: 1;
  }

  .founder-compact-intro {
    grid-column: 1;
    grid-row: 2;
  }

  .founder-mix {
    grid-column: 1;
    grid-row: 3;
  }

  .founder-acquainted {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
  }
}

/* Share the process row tracks so both columns draw rules at identical heights. */
@media (min-width: 769px) {
  .docket-section {
    grid-template-rows: repeat(3, auto);
  }

  .docket-wrap,
  .process-col,
  .why-col {
    grid-row: 1 / -1;
  }

  .process-col {
    display: grid;
    grid-template-rows: subgrid;
  }

  .ps-row,
  .process-step-row {
    height: 100%;
  }
}

/* Keep form controls at 16px or above so mobile browsers do not zoom. */
input,
select,
textarea {
  font-size: 1rem !important;
}

/* Pixel Soufflé recipe-card keeps its original type styles at a larger scale. */
.recipe-card {
  z-index: 2;
  background: var(--paper);
  font-size: 15px;
}
.recipe-card > div:first-of-type {
  font-family: 'Caveat', cursive !important;
  font-size: 1.2rem !important;
  font-style: normal;
  font-weight: 700;
}
.recipe-card-content,
.recipe-card-content * {
  font-family: 'IM Fell English', serif !important;
}
.recipe-card-content > div:first-child,
.recipe-method-title { font-size: 0.875rem !important; }
.recipe-card-content > ul,
.recipe-method li { font-size: 1rem !important; }
.recipe-method-num { font-size: 0.72rem !important; }
.recipe-definition {
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(10, 10, 10, 0.35);
  font-size: 1rem !important;
  font-style: italic;
  line-height: 1.45;
}

/*
 * Tablet and compact-desktop composition.
 * The original layout moved directly from five tracks to one at 768px,
 * leaving common tablet widths with compressed desktop columns.
 */
@media (min-width: 769px) and (max-width: 1180px) {
  .front-page {
    grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr);
  }

  .founder-compact {
    grid-template-columns: minmax(0, 1fr) 306px;
    column-gap: 2rem;
  }

  .record-player-wrap {
    width: 280px;
    margin-right: 26px;
    transform: translateX(-14px);
  }

  .record-plinth,
  .record-disc {
    width: 230px;
    height: 230px;
  }

  .tonearm-wrap {
    top: -11.5px;
    right: -48.5px;
    width: 126.5px;
    height: 253px;
    transform-origin: 103.5px 26.8px;
  }

  .front-page > .col:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-right: 0;
    padding-left: 0;
    border-bottom: 1px solid var(--ink);
  }

  .front-page > .col:nth-child(1) {
    grid-column: 1;
    grid-row: 2;
    padding-right: 1.25rem;
    padding-left: 0;
  }

  .front-page > .col:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
    padding-right: 0;
    padding-left: 1.25rem;
  }

  .front-page > .col-divider:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
  }

  .front-page > .col-divider:nth-child(4) { display: none; }

  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docket-section {
    grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(3, auto) auto;
  }

  .docket-wrap {
    grid-column: 1;
    grid-row: 1 / 4;
  }

  .process-col { grid-row: 1 / 4; }

  .why-col {
    grid-column: 1 / -1;
    grid-row: 4;
    padding: 1.5rem 0;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .start-project-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .sp-left {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    column-gap: 2rem;
    align-items: start;
  }

  .sp-left > :not(.sp-cup) { grid-column: 1; }

  .sp-cup {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    margin-top: 0;
  }

  .sp-cup img {
    width: 160px !important;
    margin-left: 0 !important;
  }

  .about-grid { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
  .about-copy-columns { grid-template-columns: 1fr; }
  .about-copy-column + .about-copy-column {
    padding-left: 0;
    border-left: 0;
  }

  .industries-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry:nth-child(-n + 2) { border-bottom: 1px solid var(--ink); }
  .industry:nth-child(2) { border-right: 0; }
  .industry:nth-child(3) {
    padding-left: 0;
    border-right: 1px solid var(--ink);
  }
}

@media (max-width: 768px) {
  .masthead-title h1 {
    font-size: clamp(3rem, 13vw, 5rem) !important;
  }

  .hero-band-headline,
  .page-headline,
  .cs-title-col h1 {
    font-size: clamp(2.6rem, 11vw, 4rem) !important;
  }

  .article-headline.large,
  .post-header .article-headline,
  .privacy-body h1 {
    font-size: clamp(2.35rem, 9vw, 3.5rem) !important;
  }
}
