/*
 * brand-package-publisher / styles.css
 *
 * Print-first stylesheet for the landscape brand package. Every .page is a
 * single full-bleed landscape slide. The @page size is set by the renderer
 * via an inline <style> block in master.html based on the chosen pageFormat.
 *
 * Keep this file dependency-free. No @import, no remote fonts. The brand
 * typography is injected by inline style attributes on each page so fallback
 * to system fonts is always graceful.
 */

:root {
  --pkg-surface:       #ffffff;
  --pkg-ink:           #0f172a;
  --pkg-muted:         #475569;
  --pkg-border:        #e2e8f0;
  --pkg-primary:       #0ea5e9;
  --pkg-accent:        #a78bfa;
  --pkg-rule:          #cbd5e1;
  --pkg-cover-bg:      #000000;
  --pkg-cover-fg:      #ffffff;

  --pkg-font-body:     "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pkg-font-display:  "Inter Display", "Inter", ui-sans-serif, system-ui, sans-serif;
  --pkg-font-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, "Menlo", monospace;

  --pkg-pad-x:         96px;
  --pkg-pad-y:         96px;

  --pkg-footer-size:   14px;
  --pkg-body-size:     16px;
  --pkg-hero-size:     220px;
  --pkg-section-size:  240px;
  --pkg-number-size:   280px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--pkg-ink);
  background: var(--pkg-surface);
  font-family: var(--pkg-font-body);
  font-size: var(--pkg-body-size);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.package {
  width: 100%;
}

/*
 * Page base.
 * Every page is width × height of the chosen pageFormat. The renderer
 * relies on preferCSSPageSize + page-break-after:always to turn each
 * .page into one physical PDF page.
 */
.page {
  position: relative;
  width: 1920px;
  height: 1080px;
  padding: var(--pkg-pad-y) var(--pkg-pad-x);
  overflow: hidden;
  background: var(--pkg-surface);
  color: var(--pkg-ink);
  page-break-after: always;
  break-after: page;
  display: grid;
  grid-template-rows: 1fr auto;
}

.page:last-child {
  page-break-after: auto;
  break-after: auto;
}

/*
 * Footer — shared by every page except the cover. Four-column layout:
 * left (brand), center (section), center-right (subsection), right (page number).
 */
.pkg-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 120px;
  align-items: end;
  font-size: var(--pkg-footer-size);
  letter-spacing: 0.02em;
  color: var(--pkg-ink);
}
.pkg-footer .f-center-right {
  justify-self: start;
}
.pkg-footer .f-right {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

/* Darker variants of the footer for dark-background pages */
.page[data-theme="dark"] .pkg-footer,
.page.dark .pkg-footer {
  color: var(--pkg-cover-fg);
}

/* ----------------------------------------------------------------------------
 * COVER PAGE
 * -------------------------------------------------------------------------- */
.page.cover {
  background: var(--pkg-cover-bg);
  color: var(--pkg-cover-fg);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 96px;
}
.page.cover .cover-brand {
  display: grid;
  place-items: center;
  text-align: center;
}
.page.cover .cover-brand-name {
  font-family: var(--pkg-font-display);
  font-weight: 700;
  font-size: 220px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.page.cover .cover-subtitle {
  margin-top: 32px;
  font-family: var(--pkg-font-body);
  font-size: 28px;
  color: rgba(255,255,255,0.75);
}
.page.cover .cover-footer {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  font-size: var(--pkg-footer-size);
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
}
.page.cover .cover-footer .cf-right {
  justify-self: end;
}

/* ----------------------------------------------------------------------------
 * INDEX PAGE
 * -------------------------------------------------------------------------- */
.page.index {
  background: var(--pkg-primary);
  color: #ffffff;
}
.page.index .index-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: 96px;
  row-gap: 56px;
  align-content: center;
  padding-top: 72px;
}
.page.index .index-row {
  display: contents;
  font-family: var(--pkg-font-display);
  font-weight: 400;
}
.page.index .index-row .index-number {
  font-size: 96px;
  line-height: 1;
  font-feature-settings: "lnum";
  opacity: 0.95;
}
.page.index .index-row .index-title {
  font-size: 96px;
  line-height: 1;
}

/* ----------------------------------------------------------------------------
 * SECTION INTRO PAGE
 * -------------------------------------------------------------------------- */
.page.section-intro {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 72px 96px;
  background: #dcdcdc;
  color: var(--pkg-ink);
}
.page.section-intro .si-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 96px;
  align-items: start;
  font-size: 14px;
  line-height: 1.45;
}
.page.section-intro .si-subs {
  display: grid;
  grid-template-columns: 40px 1fr;
  row-gap: 6px;
}
.page.section-intro .si-subs .si-sub-id { font-variant-numeric: tabular-nums; }
.page.section-intro .si-summary {
  max-width: 64ch;
}
.page.section-intro .si-icon {
  position: absolute;
  top: 72px;
  right: 96px;
  width: 64px;
  height: 64px;
}
.page.section-intro .si-title {
  align-self: end;
  justify-self: start;
  font-family: var(--pkg-font-display);
  font-weight: 400;
  font-size: 240px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
}
.page.section-intro .si-number {
  position: absolute;
  right: 96px;
  bottom: 96px;
  font-family: var(--pkg-font-display);
  font-weight: 400;
  font-size: 280px;
  line-height: 0.9;
}

/* ----------------------------------------------------------------------------
 * LOGO PAGES
 * -------------------------------------------------------------------------- */
.page.logo-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  column-gap: 96px;
  padding: 72px 96px 96px 96px;
  align-items: start;
}
.page.logo-page .lp-sidebar h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px 0;
}
.page.logo-page .lp-sidebar p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pkg-muted);
  margin: 0 0 12px 0;
  max-width: 40ch;
}
.page.logo-page .lp-canvas {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 720px;
}
.page.logo-page .lp-canvas img { max-width: 80%; max-height: 100%; }
.page.logo-page.dark {
  background: #0b1220;
  color: #ffffff;
}
.page.logo-page.dark .lp-sidebar p { color: rgba(255,255,255,0.7); }

/* Optical sizes grid */
.page.logo-optical-sizes .opt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: stretch;
  height: 760px;
}
.page.logo-optical-sizes .opt-cell {
  background: #F2ECE4;
  display: grid;
  place-items: center;
  border-radius: 0;
  padding: 48px;
}
.page.logo-optical-sizes .opt-cell img { max-width: 90%; max-height: 90%; }
.page.logo-optical-sizes .opt-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.page.logo-optical-sizes .opt-head h4 { font-size: 13px; font-weight: 700; margin: 0 0 8px 0; }
.page.logo-optical-sizes .opt-head p  { font-size: 13px; line-height: 1.5; color: var(--pkg-muted); margin: 0; max-width: 40ch; }

/* Favicon + social avatar */
.page.logo-favicon-social .fs-grid {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding-top: 48px;
}
.page.logo-favicon-social .fs-big {
  display: grid;
  place-items: center;
  height: 560px;
}
.page.logo-favicon-social .fs-big .chip-rect {
  width: 360px; height: 360px; background: #000; border-radius: 48px; display: grid; place-items: center;
}
.page.logo-favicon-social .fs-big .chip-circle {
  width: 360px; height: 360px; background: #000; border-radius: 50%; display: grid; place-items: center;
}
.page.logo-favicon-social .fs-big img { width: 65%; }
.page.logo-favicon-social .fs-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding: 0 48px;
}
.page.logo-favicon-social .fs-strip .mini {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 20%;
}
.page.logo-favicon-social .fs-strip .mini img { width: 60%; }

/* Logo color usage */
.page.logo-color-usage .lcu-grid {
  display: grid;
  grid-template-columns: 320px 1fr 1fr;
  gap: 32px;
  padding-top: 24px;
}
.page.logo-color-usage .lcu-sidebar p {
  font-size: 13px; line-height: 1.5; color: var(--pkg-muted); margin: 0 0 12px 0;
}
.page.logo-color-usage .lcu-rows {
  grid-column: 2 / span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 24px;
  height: 820px;
}
.page.logo-color-usage .lcu-cell {
  display: grid; place-items: center;
}
.page.logo-color-usage .lcu-cell img { width: 55%; }

/* ----------------------------------------------------------------------------
 * COLOR PAGES
 * -------------------------------------------------------------------------- */
.page.color-palette .cp-hero {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  height: 820px;
}
.page.color-palette .cp-cell {
  position: relative;
  display: grid;
  align-content: end;
  padding: 32px;
}
.page.color-palette .cp-cell .cp-name {
  font-family: var(--pkg-font-display);
  font-size: 28px;
}
.page.color-palette .cp-cell .cp-hex  { font-size: 14px; opacity: 0.8; }
.page.color-palette .cp-cell .cp-use  { font-size: 12px; opacity: 0.7; margin-top: 8px; }

.page.color-swatches .sw-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  height: 820px;
}
.page.color-swatches .sw-cell {
  position: relative;
  display: grid;
  align-content: end;
  padding: 20px;
  font-size: 12px;
}
.page.color-swatches .sw-cell .sw-name { font-weight: 600; font-size: 14px; }
.page.color-swatches .sw-cell .sw-hex  { opacity: 0.75; margin-top: 4px; }

.page.color-usage .cu-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 96px;
  padding-top: 48px;
}
.page.color-usage .cu-pairs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.page.color-usage .pair {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
}
.page.color-usage .pair .pair-bg {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  font-family: var(--pkg-font-display); font-size: 96px; font-weight: 600;
}
.page.color-usage .pair .pair-label { font-size: 12px; color: var(--pkg-muted); }

/* ----------------------------------------------------------------------------
 * TYPOGRAPHY PAGES
 * -------------------------------------------------------------------------- */
.page.typography-display .td-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 72px;
  align-items: stretch;
  height: 820px;
}
.page.typography-display .td-specimen {
  display: grid; place-items: start;
  font-family: var(--pkg-font-display);
  font-size: 240px; line-height: 0.95; letter-spacing: -0.02em;
}
.page.typography-display .td-card {
  padding: 24px 0; border-top: 1px solid var(--pkg-border);
}
.page.typography-display .td-card .td-role  { font-size: 12px; color: var(--pkg-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.page.typography-display .td-card .td-family{ font-size: 28px; font-weight: 700; margin-top: 4px; }
.page.typography-display .td-card .td-sample{ margin-top: 12px; font-size: 16px; color: var(--pkg-muted); }

.page.typography-hierarchy .th-list {
  display: grid;
  gap: 28px;
  padding-top: 24px;
}
.page.typography-hierarchy .type-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: baseline;
  border-bottom: 1px solid var(--pkg-border);
  padding-bottom: 20px;
}
.page.typography-hierarchy .type-meta {
  font-family: var(--pkg-font-mono);
  font-size: 12px;
  color: var(--pkg-muted);
}

.page.typography-usage .tu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  padding-top: 48px;
}
.page.typography-usage h4 { font-size: 13px; font-weight: 700; margin: 0 0 16px 0; text-transform: uppercase; letter-spacing: 0.08em; }
.page.typography-usage ul { padding-left: 18px; margin: 0; }
.page.typography-usage li { font-size: 15px; line-height: 1.55; margin-bottom: 8px; }

/* ----------------------------------------------------------------------------
 * APPLICATION PAGE
 * -------------------------------------------------------------------------- */
.page.application-preview .ap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding-top: 32px;
  height: 840px;
}
.page.application-preview .surface {
  display: grid;
  place-items: center;
  background: #f4f4f4;
  padding: 32px;
}
.page.application-preview .surface.nav {
  grid-template-columns: auto 1fr;
  gap: 24px;
  background: #fafafa;
  border-radius: 999px;
  padding: 16px 32px;
  place-items: center start;
}
.page.application-preview .surface.nav img { height: 28px; }
.page.application-preview .surface.nav .nav-links { color: #64748b; font-size: 14px; }
.page.application-preview .surface.card {
  flex-direction: column;
  text-align: center;
  padding: 48px;
}
.page.application-preview .surface.card img { height: 56px; margin-bottom: 32px; }
.page.application-preview .surface.card .card-name { font-family: var(--pkg-font-display); font-size: 24px; }
.page.application-preview .surface.card .card-role { font-size: 12px; color: var(--pkg-muted); }
.page.application-preview .surface.card .card-email{ font-family: var(--pkg-font-mono); font-size: 11px; margin-top: 16px; color: var(--pkg-muted); }
.page.application-preview .surface.slide {
  flex-direction: column;
  align-items: flex-start;
  padding: 48px;
}
.page.application-preview .surface.slide img { height: 72px; }
.page.application-preview .surface.slide .slide-body { margin-top: 48px; color: var(--pkg-muted); font-size: 16px; }
.page.application-preview .surface.avatar {
  background: transparent;
}
.page.application-preview .surface.avatar .circle {
  width: 360px; height: 360px; border-radius: 50%;
  display: grid; place-items: center;
}
.page.application-preview .surface.avatar .circle img { width: 60%; }

/* ----------------------------------------------------------------------------
 * BRAND RULES PAGE
 * -------------------------------------------------------------------------- */
.page.brand-rules .br-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  padding-top: 48px;
}
.page.brand-rules h4 { font-size: 13px; font-weight: 700; margin: 0 0 16px 0; text-transform: uppercase; letter-spacing: 0.1em; }
.page.brand-rules ul.do   li::marker { color: #16a34a; content: "✓  "; }
.page.brand-rules ul.dont li::marker { color: #dc2626; content: "✗  "; }
.page.brand-rules ul { padding-left: 0; margin: 0; list-style-position: inside; }
.page.brand-rules li { font-size: 15px; line-height: 1.55; margin-bottom: 10px; }
.page.brand-rules .misuses {
  grid-column: 1 / span 2;
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.page.brand-rules .misuses .m-cell {
  background: #f4f4f4;
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  position: relative;
}
.page.brand-rules .misuses .m-cell img { width: 60%; }
.page.brand-rules .misuses .m-cell.m-stretched img { transform: scaleX(1.6); }
.page.brand-rules .misuses .m-cell.m-rotated   img { transform: rotate(20deg); }
.page.brand-rules .misuses .m-cell.m-outlined  img { filter: drop-shadow(0 0 0 #000) drop-shadow(0 0 0 #000); }
.page.brand-rules .misuses .m-cell.m-low-contrast { background: #cfcfcf; }
.page.brand-rules .misuses .m-cell.m-off-color img { filter: hue-rotate(120deg) saturate(2.5); }
.page.brand-rules .misuses .m-label {
  position: absolute; bottom: 8px; left: 12px; font-size: 11px; color: var(--pkg-muted);
}

/* ----------------------------------------------------------------------------
 * CLOSING PAGE
 * -------------------------------------------------------------------------- */
.page.closing {
  background: #000;
  color: #fff;
  grid-template-rows: 1fr auto;
  align-content: center;
  justify-items: center;
}
.page.closing .closing-headline {
  font-family: var(--pkg-font-display);
  font-size: 240px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.page.closing .closing-body {
  margin-top: 24px;
  font-size: 24px;
  opacity: 0.75;
  max-width: 40ch;
  text-align: center;
}
.page.closing .closing-contact {
  margin-top: 24px;
  font-family: var(--pkg-font-mono);
  font-size: 14px;
  opacity: 0.75;
}

/* ----------------------------------------------------------------------------
 * HELPERS
 * -------------------------------------------------------------------------- */
.small-caps {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.muted { color: var(--pkg-muted); }
.mono  { font-family: var(--pkg-font-mono); }
