/* Shared page frame, fixed nav, and trial CTA for paisty.com. 2026-11-19. */
:root {
  --ink: #000;
  --paper: #fff;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --page-max: 1160px;
  --page-pad: clamp(20px, 4vw, 32px);
  --nav-height: 84px;
  --dock-height: 64px;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: pretty;
  padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
}
img, video, svg {
  max-width: 100%;
  height: auto;
}
img { border: 0; display: block; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Reading column on inner pages. Homepage main.pc-host stays full width. */
main:not(.pc-host) {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(48px, 8vh, 112px) clamp(64px, 10vh, 128px);
  padding-inline: var(--page-pad);
}

/* Fixed header so it stays visible even when a parent uses overflow-x. */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
  container-type: inline-size;
  container-name: site-nav;
}
.nav-bar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  min-height: var(--nav-height);
  padding-block: 6px;
  position: relative;
}
.mark {
  font-family: "Didot", "Bodoni 72", Georgia, serif;
  font-size: clamp(32px, 3.6vw, 42px);
  line-height: 1;
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  position: relative;
}
/* Lockup v2 (2026-11-20): the p is drawn in Didot font units (1000/em; viewBox spans
   x-height top -450 to descender +285), so it sits on the text baseline like a real letter:
   same x-height as "aisty", stem hangs to the same depth as the y. Inline SVG, currentColor. */
.mark-lockup {
  display: inline-block;
  color: inherit;
  padding-bottom: 0.14em; /* keep the p stem and y tail inside the hit area */
}
.mark-p {
  display: inline-block;
  height: 0.735em;
  vertical-align: -0.285em;
  overflow: visible;
}
.mark-p-glyph { font-style: italic; margin-right: 0.02em; }
.mark-text { letter-spacing: .01em; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.nav-burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: 12px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-burger-bars {
  display: block;
  width: 16px;
  height: 10px;
  margin-right: 8px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1.5px no-repeat;
}
.links {
  display: flex;
  align-items: center;
  gap: 4px 20px;
  min-width: 0;
  flex: 1;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.links a {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  flex-shrink: 0;
  white-space: nowrap;
}
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-cta:hover { opacity: .86; }

/* Desktop: full tab row. Compact / hamburger styles are below (media, class, or container). */
@media (min-width: 901px) {
  html:not(.nav-compact) .nav-burger,
  html:not(.nav-compact) .nav-toggle { display: none; }
  html:not(.nav-compact) .links {
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-end;
    margin-left: auto;
  }
  html:not(.nav-compact) .trial-dock { display: none !important; }
}

/* Compact header (~56px) + hamburger: real narrow screens, zoomed 1024, or JS/CQ. */
@media (max-width: 900px) {
  :root { --nav-height: 64px; }
}
html.nav-compact { --nav-height: 64px; }

@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .nav-cta { display: none; }
  .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex: none;
    padding: 8px var(--page-pad) 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }
  .nav:has(.nav-toggle:checked) .links,
  .nav.nav-open .links { display: flex; }
  .links a {
    width: 100%;
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
  .links a:last-child { border-bottom: 0; }
  .nav:has(.nav-toggle:checked) .nav-burger,
  .nav.nav-open .nav-burger { background: var(--ink); color: var(--paper); }
  .nav:has(.nav-toggle:checked) .nav-burger-bars,
  .nav.nav-open .nav-burger-bars {
    background:
      linear-gradient(var(--paper), var(--paper)) 0 0 / 100% 1.5px no-repeat,
      linear-gradient(var(--paper), var(--paper)) 0 50% / 100% 1.5px no-repeat,
      linear-gradient(var(--paper), var(--paper)) 0 100% / 100% 1.5px no-repeat;
  }
}

html.nav-compact .nav-burger { display: inline-flex; }
html.nav-compact .nav-cta { display: none; }
html.nav-compact .links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: none;
  padding: 8px var(--page-pad) 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}
html.nav-compact .nav:has(.nav-toggle:checked) .links,
html.nav-compact .nav.nav-open .links { display: flex; }
html.nav-compact .links a {
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
html.nav-compact .links a:last-child { border-bottom: 0; }
html.nav-compact .nav:has(.nav-toggle:checked) .nav-burger,
html.nav-compact .nav.nav-open .nav-burger { background: var(--ink); color: var(--paper); }
html.nav-compact .nav:has(.nav-toggle:checked) .nav-burger-bars,
html.nav-compact .nav.nav-open .nav-burger-bars {
  background:
    linear-gradient(var(--paper), var(--paper)) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 0 100% / 100% 1.5px no-repeat;
}

/* Keep in-page anchors clear of the fixed header (and the dock, on compact screens). */
#trial, #pricing, #how, #model, :target, h1, h2, h3, section[id] {
  scroll-margin-top: calc(var(--nav-height) + 12px + env(safe-area-inset-top, 0px));
}

/* Fixed bottom trial CTA. Solid bar; body padding keeps it off the end of the page. */
.trial-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px var(--page-pad) calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .08);
}
.trial-dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .trial-dock { display: block; }
  body {
    padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
  }
  #trial,
  .paisty-dl-form,
  footer {
    scroll-margin-bottom: calc(var(--dock-height) + 16px + env(safe-area-inset-bottom, 0px));
  }
}
html.nav-compact .trial-dock { display: block; }
html.nav-compact body {
  padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px));
}
.trial-dock.is-away,
body.has-hero-trial:not(.dock-show) .trial-dock {
  transform: translateY(110%);
  pointer-events: none;
  visibility: hidden;
}
@media (max-width: 900px) {
  .trial-dock { transition: transform .2s ease, visibility .2s ease; }
}

/* Directory badges in the site footer. Scaled in CSS; href/rel stay in the HTML. */
footer {
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
footer .studio {
  display: block;
  margin-top: 6px;
  max-width: 46ch;
  color: var(--muted);
}
.listed-on {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
  padding-top: 8px;
}
.listed-on-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.listed-on-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.listed-on-badges a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.listed-on-badges img,
.listed-on a img {
  height: 44px !important;
  width: auto !important;
  max-width: 100%;
  max-height: 44px !important;
  display: block;
  border: 0;
  outline: none;
}
@media (max-width: 600px) {
  .listed-on-badges img,
  .listed-on a img {
    max-width: 160px !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .mark { font-size: 30px; }
}

/* typography: never break mid-word or mid-number. 2026-11-19. */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}
p, li, dt, dd, blockquote, figcaption {
  text-wrap: pretty;
  overflow-wrap: normal;
  word-break: normal;
}
.price,
.plan .price,
.cta,
.nav-cta,
.hero-cta a,
button,
.btn,
input[type="submit"],
input[type="button"],
.trial-dock a,
.listed-on-label,
.kicker,
.tag,
.trial button,
.plan button,
.paisty-dl-form button,
.links a,
.mark,
.plan b {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
