@font-face {
  font-family: "Shower Serif";
  src: url("media/serif.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Shower Sans";
  src: url("media/sans.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Shower Sans";
  src: url("media/sans-semibold.woff") format("woff");
  font-weight: 600 800;
  font-display: swap;
}

:root {
  --ink: #17273e;
  --navy: #14243e;
  --muted: #46556a;
  --paper: #faf8f2;
  --white: #fffefa;
  --blue: #1645ab;
  --amber: #f6c77d;
  --rule: #cfced0;
  --gutter: clamp(1.1rem, 4.8vw, 4rem);
  --content: 77rem;
  --serif: "Shower Serif", Georgia, serif;
  --sans: "Shower Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.68 var(--sans);
}
img { display: block; max-width: 100%; }
figure, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .23em; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #1764cd;
  outline-offset: 4px;
}
::selection { background: #f4d5a7; color: var(--ink); }
.skip {
  position: fixed;
  z-index: 10;
  inset: .65rem auto auto .65rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  background: var(--white);
}
.skip:focus { transform: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shell { width: min(calc(100% - 2 * var(--gutter)), var(--content)); margin-inline: auto; }
.section { padding-block: clamp(3.75rem, 7.2vw, 7rem); }
.section-heading { margin-bottom: clamp(1.5rem, 3.5vw, 2.35rem); }
h1, h2, h3 {
  margin: 0;
  line-height: 1.06;
  font-weight: 400;
  font-family: var(--serif);
}
h2 { font-size: clamp(2.25rem, 4.85vw, 4.15rem); letter-spacing: -.035em; }
.section-heading p { max-width: 38rem; margin-top: .85rem; color: var(--muted); }
.caption { color: var(--muted); font-size: .84rem; line-height: 1.65; }
.caption a { white-space: normal; }

.masthead {
  background: var(--paper);
  border-bottom: 1px solid #ebe5db;
}
.masthead-inner {
  width: min(calc(100% - 2 * var(--gutter)), 87rem);
  min-height: 4.55rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.27rem;
  font-weight: 400;
  line-height: 1.15;
  text-decoration: none;
}
.wordmark img { flex: 0 0 2rem; }
.masthead nav { display: flex; align-items: center; gap: clamp(.8rem, 2.65vw, 2.4rem); }
.masthead nav a {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  padding-block: .54rem;
}
.masthead nav a:hover { text-decoration: underline; }
.masthead nav .nav-guide {
  background: var(--navy);
  color: var(--white);
  padding: .6rem .95rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .45fr) minmax(0, .55fr);
  min-height: clamp(31rem, 42.5vw, 43rem);
  isolation: isolate;
  background: var(--navy);
  color: var(--white);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2.65rem, 5.2vw, 5rem) clamp(1.45rem, 3vw, 3.15rem)
    clamp(2.65rem, 5.2vw, 5rem) max(var(--gutter), calc((100vw - var(--content)) / 2));
}
.hero-note { color: #fbce8b; font-weight: 650; font-size: .91rem; letter-spacing: .035em; }
.hero h1 {
  margin-top: 1.05rem;
  font-size: clamp(2.95rem, 5.42vw, 6.35rem);
  letter-spacing: -.043em;
  line-height: .96;
}
.hero-intro { margin: 1.65rem 0 1.85rem; color: #e3eaf4; font-size: clamp(1rem, 1.4vw, 1.27rem); max-width: 27rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.03rem 1.4rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
  min-height: 2.82rem;
  padding: .63rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .91rem;
  font-weight: 700;
  line-height: 1.35;
}
.button-amber { background: var(--amber); color: #17243a; }
.button-amber:hover { background: #ffdaa1; }
.hero-link { color: var(--white); font-size: .91rem; font-weight: 650; }
.hero-link:hover { color: var(--amber); }
.byline { margin-top: 2.15rem; color: #bac8dc; font-size: .88rem; }
.hero-image { position: relative; min-width: 0; align-self: stretch; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; }
.hero-image figcaption {
  position: absolute;
  right: 1.2rem;
  bottom: 1rem;
  padding: .3rem .65rem;
  background: rgba(16, 32, 55, .9);
  color: #fff;
  font-size: .83rem;
}

.design-section { padding-bottom: clamp(3.4rem, 6vw, 5.35rem); }
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
  gap: .35rem;
  margin-bottom: 1.2rem;
}
.tabs button {
  appearance: none;
  display: grid;
  align-content: start;
  gap: .36rem;
  background: transparent;
  border: 0;
  border-bottom: .2rem solid transparent;
  margin-bottom: -1px;
  padding: 0 0 .65rem;
  min-height: 3.2rem;
  font-size: clamp(.86rem, 1.25vw, 1rem);
  font-weight: 650;
  cursor: pointer;
}
.tabs button img { width: 100%; height: auto; aspect-ratio: 2.35 / 1; object-fit: cover; object-position: 50% 57%; }
.tabs button span { padding-inline: .15rem; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); background: #edf1f8; }
.tabs button:hover { background: #ece9e1; }
.tabs button[aria-selected="true"]:hover { background: #e4ecf8; }

.design-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  margin-top: 1.2rem;
}
.design-visual { min-width: 0; }
.art-link { display: block; cursor: zoom-in; }
.design-image { width: 100%; height: 100%; object-fit: cover; min-width: 0; min-height: 24rem; }
.design-copy {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: clamp(1.3rem, 2.95vw, 2.8rem);
}
.design-copy h3 { font-size: clamp(2rem, 3.55vw, 3.25rem); letter-spacing: -.025em; }
.design-copy .design-subtitle { font-weight: 700; color: #283951; line-height: 1.35; }
.sand { background: #eee3cf; }
.blue { background: #dde8f5; }
.terra { background: #eee0d9; }
.green { background: #e1e9df; }
.design-spec { border-top: 1px solid #a5aeb733; margin-top: .35rem; }
.design-spec div { display: grid; grid-template-columns: minmax(4.1rem, .44fr) minmax(0, 1fr); gap: .55rem; padding-block: .45rem; border-bottom: 1px solid #a5aeb755; font-size: .93rem; }
.design-spec dt { font-weight: 700; }
.design-check { font-size: .92rem; line-height: 1.55; }
.palette { display: flex; gap: .45rem; padding: 0; list-style: none; margin: .35rem 0 0; }
.tone { display: block; width: 2.5rem; height: .85rem; border: 1px solid #17273e25; }
.sand-wall { background: #d4aa75; }
.sand-pan { background: #b8804c; }
.sand-bath { background: #e7cfa7; }
.blue-wall { background: #132d58; }
.blue-pan { background: #3265a8; }
.blue-bath { background: #6487b5; }
.terra-wall { background: #af573c; }
.terra-pan { background: #964329; }
.terra-bath { background: #e8d2b5; }
.green-wall { background: #526a54; }
.green-pan { background: #455d4d; }
.green-bath { background: #82917a; }
.design-section > .caption { margin-top: .85rem; }

.detail-section { background: #f1eee6; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.1rem, 2.3vw, 2rem); }
.detail-grid img { aspect-ratio: 3 / 2; width: 100%; height: auto; object-fit: cover; }
.detail-grid h3 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); margin: 1rem 0 .5rem; }
.detail-grid p { color: var(--muted); max-width: 31rem; }
.traction-note { max-width: 67rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

.gallery-layout, .gallery-grid {
  display: grid;
  align-items: start;
  gap: clamp(1.3rem, 2.65vw, 2.5rem);
}
.gallery-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); }
.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-layout img { width: 100%; height: auto; object-fit: cover; }
.gallery-cover img { aspect-ratio: 2 / 3; }
.gallery-grid img { aspect-ratio: 3 / 2; }
.gallery-section figcaption { margin-top: .72rem; }
.gallery-section figcaption h3 { font-size: clamp(1.35rem, 2.15vw, 1.94rem); letter-spacing: -.015em; }
.gallery-section figcaption p { margin-top: .4rem; color: var(--muted); font-size: .93rem; }
.art-viewer {
  width: min(calc(100% - 1.5rem), 68rem);
  max-height: 94dvh;
  padding: clamp(.72rem, 2.3vw, 1.5rem);
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.art-viewer::backdrop { background: #0d1729d9; }
.art-viewer-header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.art-viewer h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
.art-viewer img { width: 100%; max-height: 74dvh; object-fit: contain; background: #17273e; }
body:has(.art-viewer[open]) { overflow: hidden; }

.section-dark { background: var(--navy); color: var(--white); }
.section-dark .section-heading p, .section-dark .caption { color: #c4d3e7; }
.section-figure {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.7vw, 2.4rem);
  align-items: start;
}
.section-drawing { padding: .4rem .7rem .85rem; background: #192d49; border: 1px solid #45607d; }
.section-drawing svg { display: block; width: 100%; height: auto; }
.section-label { fill: #e3edf8; font: 600 19px var(--sans); }
.flow-label { fill: #9dd0ff; font: 600 15px var(--sans); }
.water-line { stroke: #79bdff; stroke-width: 5; fill: none; }
.finish-line { stroke: #f6c77d; stroke-width: 3; fill: none; }
.drawing-marker path { fill: none; stroke: #a5bed7; stroke-width: 1.6; }
.drawing-marker circle { fill: #31567d; stroke: #a5bed7; stroke-width: 1.15; }
.drawing-marker text { fill: var(--white); font: 700 14px var(--sans); text-anchor: middle; }
.drawing-marker.active circle { fill: var(--amber); stroke: var(--amber); }
.drawing-marker.active text { fill: var(--navy); }
.diagram-caption {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.15rem;
  padding-inline: .55rem;
  color: #cfe0f3;
  font-size: .81rem;
  line-height: 1.5;
}
.diagram-caption i { display: inline-block; width: 1rem; height: .2rem; margin-right: .38rem; vertical-align: .24em; }
.key-water { background: #79bdff; }
.key-finish { background: #f6c77d; }
.diagram-details details { border-bottom: 1px solid #45607d; }
.diagram-details details:first-child { border-top: 1px solid #45607d; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.diagram-details summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 3.2rem;
  padding-block: .5rem;
  font-weight: 650;
}
.diagram-details summary::after { content: "+"; margin-left: auto; padding-inline: .3rem; }
.diagram-details [open] summary::after { content: "−"; }
.diagram-details summary span {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #7291b1;
  border-radius: 50%;
  font-size: .88rem;
}
.diagram-details [open] summary span { background: var(--amber); border-color: var(--amber); color: var(--navy); }
.diagram-details p { margin: 0 .9rem .85rem 2.25rem; color: #d5e1ee; font-size: .94rem; }
.section-dark summary:focus-visible, .section-dark a:focus-visible, .hero a:focus-visible { outline-color: var(--amber); }
.section-dark a { color: #c3deff; }
.diagram-note { margin-top: 1rem; }

.assembly-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  margin-bottom: 1.8rem;
  background: #dde1e3;
}
.assembly-note > div { padding: clamp(1.1rem, 2.85vw, 2.1rem); background: #e9eef5; }
.assembly-note > div + div { background: #eee5d7; }
.assembly-note h3 { margin-bottom: .7rem; font-size: clamp(1.4rem, 2.55vw, 2.1rem); }
.assembly-note p { line-height: 1.65; }
.guide-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .85rem; }
.button-outline { color: var(--blue); border-color: #aab8ce; background: transparent; }
.button-outline:hover { background: #e5edf8; }
.steps { border-top: 1px solid var(--rule); }
.step { border-bottom: 1px solid var(--rule); }
.step summary {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) 1.5rem;
  align-items: center;
  min-height: 4.3rem;
  gap: .75rem;
  padding: .78rem .1rem .78rem 0;
  font-size: clamp(1.02rem, 1.7vw, 1.25rem);
  font-weight: 700;
  line-height: 1.4;
}
.step summary:hover { background: #f0eee7; }
.step summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; text-align: center; }
.step[open] summary::after { content: "−"; }
.step-count { color: var(--blue); font-size: .93rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.step[open] .step-count { text-decoration: underline; text-underline-offset: .33em; }
.step-body { max-width: 61rem; padding: 0 1.5rem 1.45rem 3.85rem; }
.step-body ol { padding: 0 0 0 1.25rem; margin: 0; }
.step-body li { padding-left: .18rem; }
.step-body li + li { margin-top: .59rem; }
.checkpoint {
  margin: 1.05rem 0 0;
  padding: .73rem 1rem;
  border-left: 3px solid #5276b9;
  background: #e9eef5;
  font-size: .93rem;
}

.budget-section { background: #e8eef6; }
.budget-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(1.7rem, 6vw, 5rem); align-items: start; }
.budget-copy h2 { font-size: clamp(2.15rem, 4.2vw, 3.65rem); }
.budget-value {
  font: 400 clamp(3.5rem, 7.8vw, 6.3rem)/1 var(--serif);
  letter-spacing: -.06em;
  color: #163c86;
  margin: .6rem 0 1.15rem;
}
.budget-copy p + p:not(.budget-value) { margin-top: .75rem; }
.budget-table {
  width: 100%;
  border-collapse: collapse;
  background: #fbfcfe;
  font-size: .96rem;
  font-variant-numeric: tabular-nums;
}
.budget-table :is(th, td) { text-align: left; padding: .7rem .95rem; border-bottom: 1px solid #d1d9e3; }
.budget-table tr > :last-child { text-align: right; white-space: nowrap; }
.budget-table th[scope="row"] { font-weight: 400; }
.budget-table thead, .budget-table tfoot { background: var(--navy); color: var(--white); }
.budget-table tfoot th[scope="row"], .budget-table tfoot td { font-weight: 700; }

.source-section { padding-block: clamp(2.6rem, 5vw, 4.4rem); }
.source-section h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); }
.source-links {
  padding-left: 1rem;
  margin: 1.1rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .36rem 2.8rem;
  font-size: .94rem;
}
footer { background: var(--navy); color: var(--white); padding-block: 1.6rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .6rem 1.5rem; }
footer p { font: 400 1.32rem/1.4 var(--serif); }
footer p span { display: block; margin-top: .35rem; color: #c5d0e0; font: .9rem/1.4 var(--sans); }
footer a { color: #dce8f7; font-size: .9rem; }
footer a:focus-visible { outline-color: var(--amber); }

@media (max-width: 970px) {
  .hero-copy { padding-right: 1.4rem; }
  .hero h1 { font-size: clamp(2.75rem, 5.4vw, 4.8rem); }
  .section-figure { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}

@media (max-width: 750px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 2.7rem var(--gutter) 2.25rem; }
  .hero h1 { font-size: clamp(3.15rem, 9.35vw, 5.3rem); }
  .hero-intro { margin: 1.12rem 0 1.35rem; }
  .byline { margin-top: 1.4rem; }
  .hero-image { min-height: 15rem; aspect-ratio: 3 / 2; }
  .design-panel, .section-figure, .budget-layout { grid-template-columns: minmax(0, 1fr); }
  .design-image { min-height: 0; height: auto; aspect-ratio: 3 / 2; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assembly-note { grid-template-columns: minmax(0, 1fr); }
  .gallery-layout { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .gallery-cover { max-width: 25rem; }
}

@media (max-width: 475px) {
  .masthead-inner { flex-direction: column; align-items: stretch; gap: .5rem; padding: .8rem 0 .45rem; }
  .masthead nav { justify-content: space-between; gap: .4rem; }
  .masthead nav a { padding-block: .5rem; }
  .masthead nav .nav-guide { padding: .5rem .72rem; }
  .tabs { gap: .18rem; }
  .tabs button { font-size: .83rem; }
  .tabs button img { aspect-ratio: 3 / 2; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .hero-image figcaption { right: .6rem; bottom: .55rem; }
  .step summary { grid-template-columns: 1.9rem minmax(0, 1fr) 1.1rem; gap: .55rem; }
  .step-body { padding: 0 .15rem 1.12rem 2.45rem; }
  .budget-table :is(th, td) { padding: .62rem .61rem; }
  .source-links { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 335px) {
  .hero h1 { font-size: 2.75rem; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  :root { --paper: #fff; --ink: #101c2a; }
  .masthead, .skip, footer, .guide-actions, .art-viewer, main > section:not(.guide-section):not(.source-section) { display: none !important; }
  .shell { width: 100%; }
  .section { padding: .5rem 0 1rem; }
  .guide-section::before { content: "The Seamless Shower · By Joseph Donavan Henson"; font-size: .9rem; }
  .section-heading { margin-top: .5rem; margin-bottom: 1rem; }
  .section-heading h2 { font-size: 2.2rem; }
  .assembly-note { margin-bottom: .8rem; }
  .assembly-note h3 { font-size: 1.22rem; }
  .assembly-note > div { padding: .7rem; }
  .step { break-inside: avoid-page; }
  .step summary { min-height: 2.4rem; padding-block: .45rem; }
  .step summary::after { content: none; }
  .step-body { padding-bottom: .8rem; }
}
