/* pipetallybooks.com: original stylesheet. Design tokens match the 2018 site (see _reference/design-tokens.md in the original capture and CLAUDE.md). */

:root {
  --teal: #006b69;
  --teal-dark: #004f4d;
  --heading: #333332;
  --text: #666; /* #777 on the old site, darkened slightly for contrast */
  --muted: #767676; /* #b3b3b1 on the old site, darkened for contrast */
  --surface: #eee;
  --surface-2: #f7f7f7;
  --white: #fff;
  --footer: #252525;
  --footer-bar: #1f1f1f;
  --on-dark: #f7f7f7;
  --rule: #e5e5e5;
  /* The old site asked for Open Sans and Montserrat but neither loaded, so visitors saw Helvetica / Arial. */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; height: auto; }
picture { display: block; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; }
iframe { border: 0; display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .filter-bar :focus-visible { outline-color: #fff; }

.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;
}
.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--teal); color: #fff; padding: 8px 16px;
}
.skip-link:focus { top: 8px; }

.container { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  border: 2px solid var(--teal);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 28px;
  text-align: center;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); text-decoration: none; }
.btn--outline { background: transparent; border-color: #fff; }
.btn--outline:hover { background: rgba(255, 255, 255, .15); border-color: #fff; }
.btn--dark { background: var(--footer); border-color: var(--footer); }

/* Header: sits over the hero photo or the dark page header band */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto;
  padding: 14px var(--gutter);
}
.site-header__logo img { height: 52px; width: auto; }
.site-nav__list { list-style: none; padding: 0; margin: 0; display: flex; }
.site-nav__list a {
  display: block; padding: 10px 14px; font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: #fff;
}
.site-nav__list li:last-child a { padding-right: 0; }
.site-nav__list a:hover, .site-nav__list a[aria-current] { color: #fff; text-decoration: none; opacity: .75; }

.nav-toggle { display: none; -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {
  .js .nav-toggle {
    display: block; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer; color: #fff;
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto;
    position: relative; transition: transform .2s;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav { flex-basis: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; background: rgba(0, 0, 0, .85); margin: 10px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 10px; }
  .site-nav__list { flex-direction: column; }
  .site-nav__list a, .site-nav__list li:last-child a { padding: 12px 0; font-size: 13px; }
}

/* Home hero */
.hero { position: relative; background: var(--footer); color: #fff; text-align: center; overflow: hidden; }
.hero__bg, .page-header__bg { position: absolute; inset: 0; }
.hero__bg img, .page-header__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after, .page-header--photo::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .73); }
.hero__inner {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto; padding: 260px var(--gutter) 160px;
}
.hero__kicker {
  font-size: 15px; line-height: 25.5px; letter-spacing: 7px; text-transform: uppercase;
  margin: 0 auto 4px; max-width: 920px;
}
.hero__title {
  color: #fff; font-size: 60px; line-height: 72px; font-weight: 700; text-transform: uppercase; margin-bottom: 24px;
}
.hero__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0; }
@media (max-width: 768px) {
  .hero__inner { padding: 140px var(--gutter) 80px; }
  .hero__kicker { font-size: 13px; letter-spacing: 3px; line-height: 1.6; }
  .hero__title { font-size: 38px; line-height: 1.15; }
}

/* Inner page title band */
.page-header { position: relative; background: var(--footer); color: #fff; text-align: center; overflow: hidden; }
.page-header__inner { position: relative; z-index: 1; padding: 150px var(--gutter) 60px; }
.page-header__title {
  color: #fff; font-size: 58px; line-height: 1; font-weight: 700; letter-spacing: -1px; text-transform: uppercase;
  margin: 0;
}
.page-header__title::after { content: ""; display: block; width: 236px; height: 1px; background: rgba(255, 255, 255, .6); margin: 18px auto 0; }
.page-header--bare { height: 80px; }
@media (max-width: 768px) {
  .page-header__inner { padding: 110px var(--gutter) 40px; }
  .page-header__title { font-size: 36px; }
  .page-header__title::after { width: 140px; }
}

/* Sections */
.section { padding-top: 30px; padding-bottom: 30px; }
.home-section { padding-top: 26px; }
.section-title {
  font-size: 30px; line-height: 1.7; font-weight: 300; text-transform: uppercase; margin: 10px 0 14px;
}

/* Product cards */
.cards { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 30px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); gap: 36px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #f2f2f2; }
.card__link { display: block; height: 100%; color: inherit; }
.card__link:hover { text-decoration: none; }
.card__link:hover .card__title { color: var(--teal); }
.card__img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 20px 20px 0; }
.card__img picture, .card__img img { width: 100%; height: 100%; object-fit: contain; }
.cards--2 .card__img { aspect-ratio: 3 / 2; }
.card__body { padding: 10px 46px 30px; }
.cards--4 .card__body { padding: 10px 34px 30px; }
.card__title { font-size: 17px; font-weight: 600; padding-top: 14px; }
.card__title::after { content: ""; display: block; width: 60px; height: 1px; background: #ccc; margin: 10px 0 12px; }
.card__subtitle { font-size: 12px; margin: 0; }
@media (max-width: 1000px) {
  .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards--2, .cards--3, .cards--4 { grid-template-columns: 1fr; }
}

/* Home blog teasers */
.teasers { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0 50px; }
.teaser__title { font-size: 17px; font-weight: 400; line-height: 1.5; margin-bottom: 10px; }
.teaser__title a { color: var(--heading); }
.teaser p { font-size: 12px; margin-bottom: 14px; }
.read-more {
  display: inline-block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  border-bottom: 1px solid var(--teal); padding-bottom: 2px;
}
@media (max-width: 600px) { .teasers { grid-template-columns: 1fr; gap: 30px; } }

/* Project cards (grid and carousel) */
.project { text-align: center; background: var(--white); }
.project__img { background: var(--surface); aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; padding: 16px; }
.project__img picture, .project__img img { width: 100%; height: 100%; object-fit: contain; }
.project__title { font-size: 15px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; margin: 16px 0 0; }
.project__title::after { content: ""; display: block; width: 32px; height: 2px; background: var(--teal); margin: 10px auto 8px; }
.project__category { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0; padding-bottom: 16px; }

.carousel { padding-top: 40px; padding-bottom: 40px; }
.carousel__title { font-size: 13px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; text-align: center; margin-bottom: 20px; }
.carousel__viewport { position: relative; }
.carousel__track {
  list-style: none; padding: 0; margin: 0; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 12px) / 3); gap: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > li { scroll-snap-align: start; }
.carousel__btn {
  position: absolute; top: calc(33% - 20px); width: 32px; height: 52px; border: 0; cursor: pointer;
  background: rgba(37, 37, 37, .85); color: #fff;
}
.carousel__btn:disabled { opacity: .3; cursor: default; }
.carousel__btn::before { content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border: solid #fff; border-width: 0 2px 2px 0; }
.carousel__btn--prev { left: 0; }
.carousel__btn--prev::before { transform: translateX(2px) rotate(135deg); }
.carousel__btn--next { right: 0; }
.carousel__btn--next::before { transform: translateX(-2px) rotate(-45deg); }
.carousel__more { text-align: center; margin: 20px 0 0; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
@media (max-width: 768px) { .carousel__track { grid-auto-columns: calc((100% - 6px) / 2); } }
@media (max-width: 480px) { .carousel__track { grid-auto-columns: 85%; } }

/* Home "More About" */
.about__title { font-size: 25px; font-weight: 300; margin: 0 0 14px; }
.about__band { background: var(--surface-2); padding: 46px 0 40px; font-size: 12px; line-height: 1.8; }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .about__cols { grid-template-columns: 1fr; gap: 0; } }

/* Inner page content: gray band, white card, sidebar */
.content-band { background: var(--surface-2); padding: 50px 0 60px; }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 36px; align-items: start; }
.content-card { background: var(--white); padding: 40px 30px; }
.post-list { display: grid; gap: 30px; }
@media (max-width: 1000px) { .with-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .content-card { padding: 28px 20px; } .content-band { padding: 24px 0 40px; } }

.sidebar__heading { font-size: 13px; font-weight: 700; text-transform: uppercase; margin: 6px 0 14px; }
.sidebar__list { list-style: none; padding: 0; margin: 0 0 30px; }
.sidebar__list li { border-bottom: 1px solid var(--rule); padding: 8px 0; font-size: 12px; line-height: 1.6; }
.sidebar__list a { color: var(--text); }
.sidebar__list a:hover { color: var(--teal); text-decoration: none; }

.breadcrumb { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--muted); }

.product { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.product__images { display: grid; gap: 16px; justify-items: center; }
.product__images picture { max-width: 330px; }
@media (max-width: 768px) { .product { grid-template-columns: 1fr; } }

.prose { font-size: 13px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 4px; }
.prose h2 { font-size: 16px; font-weight: 400; margin: 1.4em 0 .7em; }
.prose li > h2 { margin-top: 1em; }
.prose strong { color: inherit; }

/* Blog posts */
.post__meta { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.post__title { font-size: 32px; font-weight: 700; line-height: 1.1; margin-bottom: 30px; }
.post__title a { color: var(--heading); }
.post-list .post__title { font-size: 28px; }
.post__image { margin: 0 auto 30px; max-width: 400px; }
.post__tags { margin: 30px 0 0; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.post__tags-title { color: var(--heading); margin-right: 8px; }
.tag { display: inline-block; background: #f0f7f7; color: var(--teal); padding: 1px 6px; margin: 0 4px 6px 0; }
.related { margin-top: 40px; text-align: center; }
.related__title { font-size: 13px; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; }
.related__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.related__list a { display: block; height: 100%; background: var(--surface-2); padding: 24px 12px; font-size: 14px; line-height: 1.4; color: var(--heading); }
@media (max-width: 600px) { .related__list { grid-template-columns: 1fr; } .post__title { font-size: 26px; } }

.pager ul { list-style: none; padding: 0; display: flex; justify-content: center; gap: 6px; }
.pager a { display: block; min-width: 28px; padding: 4px 8px; background: var(--white); color: var(--text); text-align: center; font-size: 11px; }
.pager a[aria-current] { background: var(--teal); color: #fff; }

/* Projects page */
.filter-bar { background: var(--footer-bar); }
.filter-bar__list { list-style: none; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.filter-bar button {
  background: none; border: 0; padding: 4px 0; cursor: pointer; color: #fff; font: inherit;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; border-bottom: 2px solid transparent;
}
.filter-bar button[aria-pressed="true"] { border-color: var(--teal); }
.projects { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.projects .project__img { background: var(--white); aspect-ratio: 4 / 3; }
@media (max-width: 768px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .projects { grid-template-columns: 1fr; } }

/* Contact */
.zoho-form { width: 100%; height: 780px; }
.zoho-form--page { height: 800px; }
.map { width: 100%; height: 200px; margin-bottom: 30px; }
.contact-list { font-size: 12px; margin: 0; }
.contact-list dt { color: var(--heading); font-weight: 700; margin-top: 10px; }
.contact-list dd { margin: 0; }

.sitemap-list ul ul { margin-top: 4px; }

/* Order band above the footer */
.cta { text-align: center; padding: 50px var(--gutter); }
.cta__phone { font-size: 25px; font-weight: 300; margin: 0; }
.cta__phone a { color: var(--heading); }
.cta__text { margin-bottom: 14px; }

/* Footer */
.site-footer { background: var(--footer); color: var(--on-dark); font-size: 13px; }
.site-footer a { color: var(--on-dark); }
.site-footer__inner {
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 50px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 50px;
}
.site-footer__info { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; align-content: start; }
.site-footer__heading { color: #fff; font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 18px; }
.site-footer__nav { list-style: none; padding: 0; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer__bar { background: var(--footer-bar); }
.site-footer__bar p {
  max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 22px var(--gutter);
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
}
@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .site-footer__info { grid-template-columns: 1fr; }
}

.page-404 { text-align: center; }
.page-404 .btn { margin: 0 4px 8px; }
