/* Homepage: forest and sand bands, tree-ring hero, and the contact widget. Shares chrome.css. */
html { scroll-behavior: smooth; background: var(--pe-deep); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.pe-home-page { margin: 0; background: var(--pe-deep); }
.pe-home-page *, .pe-home-page *::before, .pe-home-page *::after { box-sizing: border-box; }

.pe-home {
  position: relative;
  background: var(--pe-deep);
  color: var(--pe-forest);
  font-family: var(--pe-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.pe-home a { color: var(--pe-forest); }
.pe-home a:hover { color: var(--pe-deep); }
.pe-home h1, .pe-home h2, .pe-home h3, .pe-home p, .pe-home dl, .pe-home dd, .pe-home ol { margin: 0; }
.pe-home :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.pe-home em { font-family: var(--pe-serif); font-style: italic; font-weight: 400; }

#main-content:focus { outline: none; }

.pe-label, .pe-kicker {
  font-family: var(--pe-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pe-label);
}

/* Hero band */
.pe-hero-band { background: var(--pe-forest); color: var(--pe-cream); overflow: hidden; }
.pe-hero-band a { color: var(--pe-cream); }
/* Hero */
.pe-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px 56px; padding: 72px 0 64px; }
.pe-hero-copy { flex: 1.3 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.pe-hero-band .pe-kicker { color: var(--pe-label-dark); }
.pe-hero h1 {
  font-size: clamp(44px, 5.7vw, 84px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance;
}
.pe-hero h1 em { letter-spacing: -0.015em; color: var(--pe-accent); }
.pe-hero-lede { max-width: 560px; font-size: 19px; line-height: 1.55; color: var(--pe-on-dark); text-wrap: pretty; }
.pe-herocta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.pe-textlink { display: flex; align-items: center; min-height: 44px; font-size: 16px; text-underline-offset: 5px; }
.pe-hero-art { flex: 1 1 380px; min-width: 0; max-width: 560px; }
.pe-hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.pe-treelabels, .pe-treelabels-m { paint-order: stroke; }
.pe-treelabels-m, .pe-phone-only { display: none; }
.pe-art-caption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--pe-label-dark); text-align: center; }
.pe-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px 40px;
  padding: 24px 0 32px; border-top: 1px solid var(--pe-line-dark);
}
.pe-facts div { display: flex; flex-direction: column; gap: 6px; }
.pe-facts dt { font-family: var(--pe-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pe-label-dark); }
.pe-facts dd { font-size: 15px; line-height: 1.45; }

/* Buttons */
.pe-btn {
  display: inline-flex; align-items: center; gap: 14px; height: 54px; padding: 0 26px;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 27px; cursor: pointer;
}
.pe-home .pe-btn-light, .pe-home .pe-btn-light:hover { background: var(--pe-cream); color: var(--pe-forest); border: 1px solid var(--pe-cream); }
.pe-go svg { transition: transform 0.2s ease; }
.pe-go:hover svg { transform: translateX(5px); }

/* Section shells */
.pe-band-sand { background: var(--pe-sand); }
.pe-band-paper { background: var(--pe-paper); }
.pe-band-forest { background: var(--pe-forest); color: var(--pe-cream); }
.pe-band-forest .pe-label { color: var(--pe-label-dark); }
.pe-sec { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 56px; }
.pe-sec-work { padding-top: 96px; padding-bottom: 96px; gap: 48px; }
.pe-sec-process { padding-bottom: 96px; }
.pe-sec-engage { padding-top: 96px; }
.pe-sechead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 48px; }
.pe-sechead > .pe-label { flex: 0 0 104px; }
.pe-sechead > h2, .pe-sechead > div { flex: 1 1 320px; min-width: 0; }
.pe-sechead > div { display: flex; flex-direction: column; gap: 14px; }
.pe-sechead h2 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
.pe-sechead p:not(.pe-label) { max-width: 620px; color: var(--pe-on-dark); text-wrap: pretty; }

/* Services */
.pe-home .pe-allsvc { flex: 1 1 100%; font-size: 15px; font-weight: 600; text-underline-offset: 5px; }
.pe-rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--pe-line); }
.pe-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 48px; padding: 32px 0; border-top: 1px solid var(--pe-line); }
.pe-rownum {
  flex: 0 0 104px; display: flex; align-items: center; gap: 14px;
  font-family: var(--pe-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--pe-label);
}
.pe-row h3 {
  flex: 1 1 260px; font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -0.025em;
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1);
}
.pe-row:hover h3 { transform: translateX(10px); }
.pe-glyph { transition: transform 0.6s cubic-bezier(.2, .7, .2, 1); }
.pe-row:hover .pe-glyph { transform: scale(1.18); }
.pe-acc-btn {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
}
.pe-acc-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.pe-chev { display: none; flex: 0 0 auto; transition: transform 0.25s ease; }
.pe-acc-body { flex: 1.5 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pe-svc { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; min-height: 44px; text-decoration: none; }
.pe-svc > span { display: flex; flex-direction: column; gap: 4px; }
.pe-svc strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pe-svc > span > span { color: var(--pe-muted); }
.pe-svc svg { flex: 0 0 22px; margin-top: 4px; }
.pe-svc-more { padding-top: 20px; border-top: 1px dashed rgba(18, 53, 38, 0.3); }

/* Work */
.pe-work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; }
.pe-card { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--pe-sand); color: var(--pe-forest); border-radius: 2px; }
.pe-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pe-card-head h3 { font-size: 30px; line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
.pe-card-head svg { flex: 0 0 96px; }
.pe-card-text { max-width: 46ch; min-height: 72px; font-size: 16px; line-height: 1.5; color: var(--pe-muted); text-wrap: pretty; }
.pe-card-foot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-top: auto; padding-top: 20px;
  border-top: 1px solid rgba(18, 53, 38, 0.2);
}
.pe-card-foot dl { display: grid; grid-template-columns: 124px auto; align-items: baseline; gap: 4px 16px; font-size: 15px; }
.pe-card-foot dt { font-family: var(--pe-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pe-muted); }
.pe-home .pe-cardcta, .pe-home .pe-cardcta:hover {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 230px; max-width: 100%; height: 46px; padding: 0 20px;
  background: var(--pe-forest); color: var(--pe-cream); border-radius: 23px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.pe-halo { animation: pe-halo 4.5s ease-in-out infinite; }
/* A slot held for work that isn't ready to show yet: the same card, drawn as an outline on the band. Its rule lines up
   with the card beside it, so the foot follows the text instead of sitting at the bottom. */
.pe-card-soon { padding: 31px; background: transparent; color: var(--pe-cream); border: 1px dashed rgba(239, 231, 214, 0.4); }
.pe-card-soon .pe-card-text { color: var(--pe-on-dark); }
.pe-card-soon .pe-card-foot { margin-top: 0; border-top: 1px dashed rgba(239, 231, 214, 0.3); }
.pe-card-soon .pe-card-foot dt { color: var(--pe-label-dark); }

/* Process */
.pe-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px 48px; }
.pe-steps li { display: flex; flex-direction: column; gap: 12px; }
.pe-step-mark { display: flex; align-items: center; gap: 16px; padding-bottom: 8px; }
.pe-step-mark span {
  flex: 0 0 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--pe-forest); border-radius: 50%; font-size: 18px; font-weight: 600;
}
.pe-step-mark span.is-final { background: var(--pe-forest); color: var(--pe-cream); }
.pe-step-mark i { flex: 1 1 0; height: 1px; background: rgba(18, 53, 38, 0.4); }
.pe-steps h3, .pe-swipe h3 { font-size: 26px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.pe-steps p, .pe-swipe p { color: var(--pe-muted); }

/* Engagements */
.pe-swipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px 48px; }
.pe-swipe article { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 2px solid var(--pe-forest); }
.pe-letter { font-family: var(--pe-serif); font-style: italic; font-size: 72px; line-height: 0.9; }

/* Contact band */
.pe-contact { position: relative; overflow: hidden; }
.pe-contact:focus { outline: none; }
.pe-contact-rings {
  position: absolute; right: -240px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%); opacity: 0.22; pointer-events: none;
}
.pe-contact-inner {
  position: relative; padding-top: 120px; padding-bottom: 120px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px 56px;
}
.pe-contact-copy { flex: 1.6 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pe-contact-copy h2 { font-size: clamp(38px, 4.8vw, 68px); line-height: 1.04; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.pe-contact-action { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.pe-contact-action p { color: var(--pe-on-dark); }

/* Back to top with a ring per quarter of the page */
.pe-progress {
  position: fixed; left: 24px; bottom: 24px; z-index: 20; width: 52px; height: 52px; display: none; align-items: center; justify-content: center;
  background: var(--pe-cream); border: 1px solid var(--pe-forest); border-radius: 50%; box-shadow: 0 10px 30px rgba(8, 24, 17, 0.3);
}
.pe-progress svg { transform: rotate(-90deg); }
.pe-pr { stroke-dasharray: 1; }
/* Leave the cookie card its corner while it is open. */
body:has(#pe-cc:not([hidden])) .pe-progress { display: none !important; }

/* Motion */
@keyframes pe-spin { to { transform: rotate(360deg); } }
@keyframes pe-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pe-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pe-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pe-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes pe-ripple { 0% { transform: scale(.03); opacity: 0; } 10% { opacity: .5; } 70% { opacity: .12; } 100% { transform: scale(1); opacity: 0; } }
@keyframes pe-grow { from { transform: scale(.88); } to { transform: scale(1); } }
@keyframes pe-halo { 0%, 100% { opacity: .04; } 50% { opacity: .22; } }
@keyframes pe-reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pe-grow { transform-origin: 290px 306px; animation: pe-grow 3s cubic-bezier(.16, .8, .2, 1) both; }
.pe-slow { animation-duration: 2.4s; }
.pe-spin { transform-origin: 300px 300px; animation: pe-fade 1.4s ease 1.9s both, pe-spin 120s linear infinite; }
.pe-ring { stroke-dasharray: 1; animation: pe-draw 1.6s cubic-bezier(.45, .05, .2, 1) both; }
.pe-rise { animation: pe-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.pe-fadein { animation: pe-fade .9s ease both; }
.pe-pop { transform-box: fill-box; transform-origin: center; animation: pe-pop .5s cubic-bezier(.3, 1.5, .5, 1) both; }
.pe-ripple { transform-origin: 280px 312px; opacity: 0; animation: pe-ripple 10s cubic-bezier(.2, .6, .3, 1) 4.2s infinite; }
.pe-d1 { animation-delay: .15s; } .pe-d2 { animation-delay: .3s; } .pe-d3 { animation-delay: .45s; } .pe-d4 { animation-delay: .6s; }
.pe-d5 { animation-delay: .75s; } .pe-d6 { animation-delay: .9s; } .pe-d7 { animation-delay: 1.05s; } .pe-d8 { animation-delay: 1.2s; }
.pe-d9 { animation-delay: 1.4s; } .pe-d10 { animation-delay: 1.6s; } .pe-d11 { animation-delay: 1.8s; } .pe-d12 { animation-delay: 2s; }
@supports (animation-timeline: view()) {
  .pe-reveal { animation: pe-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
}

/* Tablet */
@media (min-width: 761px) and (max-width: 1100px) {
  .pe-hero { flex-wrap: nowrap; gap: 36px; }
  .pe-hero-copy { flex: 1.35 1 0; }
  .pe-hero-art { flex: 1 1 0; max-width: 340px; }
  .pe-treelabels { display: none; }
  .pe-treelabels-m { display: inline; }
  .pe-phone-only { display: block; }
  .pe-row { gap: 12px 32px; }
  .pe-row h3 { flex-basis: 210px; font-size: 30px; }
  .pe-acc-body { flex-basis: 300px; }
  .pe-work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pe-steps, .pe-swipe { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}

/* Desktop: sticky services heading and the back-to-top rings */
@media (min-width: 1101px) {
  .pe-split { flex-direction: row; align-items: flex-start; gap: 72px; }
  .pe-split > .pe-sechead { flex: 0 0 300px; position: sticky; top: 48px; flex-direction: column; flex-wrap: nowrap; gap: 20px; }
  .pe-split > .pe-sechead > * { flex: 0 0 auto; }
  .pe-split h2 { font-size: 42px; }
  .pe-split > .pe-rows { flex: 1 1 0; min-width: 0; }
  .pe-split .pe-row { gap: 12px 28px; }
  .pe-split .pe-rownum { flex-basis: 76px; }
  .pe-split .pe-row h3 { flex-basis: 200px; font-size: 30px; }
  .pe-split .pe-acc-body { flex-basis: 300px; }
  .pe-progress { display: flex; }
}
@supports (animation-timeline: scroll()) {
  @media (min-width: 1101px) {
    .pe-pr { animation: pe-draw linear both; animation-timeline: scroll(root); }
    .pe-pr1 { animation-range: 0% 25%; } .pe-pr2 { animation-range: 25% 50%; }
    .pe-pr3 { animation-range: 50% 75%; } .pe-pr4 { animation-range: 75% 100%; }
  }
}

/* Phone */
@media (max-width: 760px) {
  .pe-phone-only { display: block; }
  .pe-treelabels { display: none; }
  .pe-treelabels-m { display: inline; }
  .pe-hero { padding-top: 44px; padding-bottom: 40px; }
  .pe-hero-copy { flex-basis: 100%; }
  .pe-herocta { flex-direction: column; align-items: stretch; }
  .pe-herocta .pe-btn { justify-content: space-between; }
  .pe-herocta .pe-textlink { justify-content: center; }
  .pe-sec, .pe-sec-work, .pe-sec-engage { padding-top: 72px; padding-bottom: 72px; }
  .pe-contact-inner { padding-top: 88px; padding-bottom: 88px; }
  .pe-contact-copy { flex-basis: 100%; }
  .pe-row { padding: 18px 0; gap: 6px 16px; align-items: center; }
  .pe-rownum { flex-basis: auto; }
  .pe-row h3 { flex-basis: 180px; font-size: 27px; }
  .pe-row:hover h3 { transform: none; }
  .pe-acc-btn { cursor: pointer; min-height: 52px; }
  .pe-chev { display: block; }
  .pe-acc-btn[aria-expanded="true"] .pe-chev { transform: rotate(180deg); }
  .pe-acc-body { display: none; padding: 8px 0 10px; }
  .pe-acc-body.is-open { display: flex; }
  .pe-swipe {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 calc(var(--pe-gutter) * -1); padding: 0 var(--pe-gutter) 8px; scrollbar-width: none;
  }
  .pe-swipe::-webkit-scrollbar { display: none; }
  .pe-swipe > * { flex: 0 0 80%; scroll-snap-align: center; }
  .pe-card { padding: 24px; }
  .pe-card-soon { padding: 23px; }
  .pe-card-head svg { flex-basis: 72px; width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .pe-grow, .pe-spin, .pe-ring, .pe-rise, .pe-fadein, .pe-pop, .pe-ripple, .pe-halo, .pe-reveal, .pe-pr { animation: none; }
  .pe-row h3, .pe-glyph, .pe-go svg { transition: none; }
}

/* Cream (light) theme: the forest bands turn light and the tree-ring art flips to forest ink. */
[data-theme="cream"], [data-theme="cream"] body.pe-home-page, [data-theme="cream"] .pe-home { background: var(--pe-paper); }
[data-theme="cream"] .pe-hero-band, [data-theme="cream"] .pe-band-forest { background: var(--pe-paper); color: var(--pe-forest); }
[data-theme="cream"] .pe-contact { background: var(--pe-cream); }
[data-theme="cream"] .pe-card-soon { color: var(--pe-forest); border-color: rgba(18, 53, 38, 0.4); }
[data-theme="cream"] .pe-card-soon .pe-card-text, [data-theme="cream"] .pe-card-soon .pe-card-foot dt { color: var(--pe-muted); }
[data-theme="cream"] .pe-card-soon .pe-card-foot { border-top-color: rgba(18, 53, 38, 0.3); }
[data-theme="cream"] .pe-hero-band a { color: var(--pe-forest); }
[data-theme="cream"] .pe-hero-band .pe-kicker, [data-theme="cream"] .pe-band-forest .pe-label,
[data-theme="cream"] .pe-facts dt, [data-theme="cream"] .pe-art-caption { color: var(--pe-label); }
[data-theme="cream"] .pe-hero h1 em { color: var(--pe-accent-ink); }
[data-theme="cream"] .pe-hero-lede, [data-theme="cream"] .pe-sechead p:not(.pe-label),
[data-theme="cream"] .pe-contact-action p { color: var(--pe-muted); }
[data-theme="cream"] .pe-facts { border-top-color: var(--pe-line); }
[data-theme="cream"] .pe-home .pe-btn-light, [data-theme="cream"] .pe-home .pe-btn-light:hover {
  background: var(--pe-forest); color: var(--pe-cream); border-color: var(--pe-forest);
}
[data-theme="cream"] .pe-hero-art [stroke="#EFE7D6"], [data-theme="cream"] .pe-contact-rings { stroke: var(--pe-forest); }
[data-theme="cream"] .pe-hero-art [fill="#EFE7D6"] { fill: var(--pe-forest); }
[data-theme="cream"] .pe-hero-art stop { stop-color: var(--pe-forest); }
[data-theme="cream"] .pe-hero-art [fill="#0D281C"] { fill: var(--pe-paper); }
[data-theme="cream"] .pe-hero-art [stroke="#123526"] { stroke: var(--pe-paper); }
[data-theme="cream"] .pe-hero-art [fill="#B9C4B4"] { fill: var(--pe-label); }
[data-theme="cream"] .pe-hero-art [fill="#A9CBA4"] { fill: var(--pe-accent-ink); }
[data-theme="cream"] .pe-hero-art [stroke="#A9CBA4"] { stroke: var(--pe-accent-ink); }

/* Work: the Website designs card shows three of the phones from /work/web-design/, fanned out. Wide screens put
   them beside the heading and text, so the card stays close to the Cultured card's height. */
.pe-card-phones { display: flex; justify-content: center; padding: 6px 0 10px; }
.pe-card-phones .wd-phone { flex: 0 0 104px; width: 104px; margin: 0 -9px; transition: transform 0.25s ease; }
.pe-card-phones .wd-phone:nth-child(1) { transform: rotate(-7deg) translateY(8px); }
.pe-card-phones .wd-phone:nth-child(2) { position: relative; z-index: 1; }
.pe-card-phones .wd-phone:nth-child(3) { transform: rotate(7deg) translateY(8px); }
.pe-card-web:hover .pe-card-phones .wd-phone:nth-child(1) { transform: rotate(-10deg) translate(-6px, 6px); }
.pe-card-web:hover .pe-card-phones .wd-phone:nth-child(3) { transform: rotate(10deg) translate(6px, 6px); }
@media (min-width: 1101px) {
  .pe-card-web { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; gap: 20px 24px; }
  .pe-card-web .pe-card-head, .pe-card-web .pe-card-text { grid-column: 1; }
  .pe-card-web .pe-card-phones { grid-column: 2; grid-row: 1 / 3; align-self: start; padding: 0 12px 0 0; margin-top: -4px; }
  .pe-card-web .pe-card-phones .wd-phone { flex-basis: 76px; width: 76px; }
  .pe-card-web .pe-card-foot { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .pe-card-phones .wd-phone { transition: none; }
  .pe-card-web:hover .pe-card-phones .wd-phone:nth-child(1) { transform: rotate(-7deg) translateY(8px); }
  .pe-card-web:hover .pe-card-phones .wd-phone:nth-child(3) { transform: rotate(7deg) translateY(8px); }
}
