/* Piranha marketing site. One variable family (Archivo: width and weight axes)
   for display and text, IBM Plex Mono for dimensions, as on the drawings. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f2f5f1;
  --paper-raised: #fafbf8;
  --ink: #0d3237;
  --ink-soft: #4a6366;
  --rule: rgba(13, 50, 55, 0.18);
  --rule-faint: rgba(13, 50, 55, 0.08);
  --teal: #147e87;
  --teal-deep: #07535b;
  --pale: #bde8e4;
  --weld: #c8382a;

  --sans: "Archivo", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --measure: 38rem;

  color-scheme: light;
  font-family: var(--sans);
  font-size: 100%;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
table { border-collapse: collapse; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 1rem; top: -4rem; padding: .6rem 1rem; background: var(--ink); color: var(--paper); z-index: 10; }
.skip:focus { top: 1rem; }

/* Masthead */
.masthead {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 820; font-stretch: 125%; font-size: 1.35rem; letter-spacing: -.035em; color: var(--ink); }
/* The mark, shared with the app icon (editor/desktop/assets/icon.svg): a fish
   drawn as one pipe run with couplings at the joints. One colour, any background. */
.mark { width: 3.6rem; height: auto; }
.masthead nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: .95rem; }
.masthead nav a { text-decoration: none; color: var(--ink-soft); }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .75rem 1.4rem;
  background: var(--teal-deep); color: #f4fbf9;
  font: 650 1rem/1.1 var(--sans); font-stretch: 108%;
  text-decoration: none; border-radius: 3px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22);
  transition: background-color .15s ease;
}
.button:hover { background: #0a6670; }
.button:active { box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25); }
.button-small { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9rem; white-space: nowrap; }
.button-ghost { background: transparent; color: var(--teal-deep); box-shadow: inset 0 0 0 2px var(--teal-deep); }
.button-ghost:hover { background: rgba(10, 102, 112, .08); }
.button-ghost:active { box-shadow: inset 0 0 0 2px var(--teal-deep), inset 0 2px 0 rgba(0, 0, 0, .12); }


/* Hero */
.hero { padding: clamp(2rem, 4.5vw, 3.6rem) var(--gutter) clamp(3rem, 6vw, 5rem); }
.hero-copy {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: 1.8rem clamp(2rem, 5vw, 5rem); align-items: end;
}
h1 {
  font-weight: 820; font-stretch: 125%;
  font-size: clamp(2.3rem, 6.2vw, 6.4rem);
  line-height: .95; letter-spacing: -.035em;
}
.h-line { display: block; }
.keep { white-space: nowrap; }
/* The subhead is the promise in plain words: lighter, narrower, half size. */
.h-line-2 { margin-top: .32em; max-width: 30ch; font-size: .5em; line-height: 1.08; font-weight: 340; font-stretch: 96%; letter-spacing: -.02em; color: var(--ink-soft); }
.lede { max-width: var(--measure); font-size: clamp(1.02rem, 1.3vw, 1.14rem); color: var(--ink-soft); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: 1.4rem; }
.cta-note { color: var(--ink-soft); font-size: .88rem; max-width: 15rem; line-height: 1.4; }

/* The drawing sheet: double border frame with zone numbers, like a D-size sheet */
.sheet {
  position: relative;
  margin-top: clamp(2rem, 3.5vw, 3rem);
  padding: 1.6rem 10px 10px;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
}
.sheet-zones {
  position: absolute; inset: 0 10px auto; height: 1.6rem;
  display: grid; grid-template-columns: repeat(6, 1fr);
  font: 500 .7rem/1.6rem var(--mono); color: var(--ink-soft); text-align: center;
}
.sheet-zones span + span { border-left: 1px solid var(--rule); }
.sheet-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr) minmax(15rem, 19rem);
  border: 1px solid var(--ink);
  min-height: 34rem;
}
.sheet-caption { margin-top: 1rem; max-width: 62rem; font-size: .85rem; color: var(--ink-soft); }

.route-panel { padding: 1.2rem 1.2rem 1.4rem; border-right: 1px solid var(--ink); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-head h2 { font-size: 1.15rem; font-weight: 750; font-stretch: 115%; }
.panel-sub { margin-top: .3rem; font-size: .85rem; color: var(--ink-soft); }

.units { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.units button {
  border: 0; background: transparent; color: var(--ink-soft);
  font: 500 .84rem var(--mono); padding: .35rem .6rem; cursor: pointer; min-height: 2rem;
}
.units button[aria-checked="true"] { background: var(--ink); color: var(--paper); }

.route-table { width: 100%; margin-top: 1rem; font-size: .9rem; }
.route-table th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--ink-soft); padding: .3rem .25rem; border-bottom: 1px solid var(--ink); }
.route-table td { padding: .28rem .25rem; border-bottom: 1px solid var(--rule-faint); vertical-align: middle; }
.route-table tr.fitting td { padding: .1rem .25rem .1rem 1.9rem; font-size: .76rem; color: var(--ink-soft); border-bottom-color: transparent; }
.route-table .run-no { font: 500 .85rem var(--mono); color: var(--teal-deep); width: 2.2rem; }
.route-table tr.invalid td { background: rgba(200, 56, 42, .07); }
.route-table select, .route-table input {
  font: 500 .88rem var(--mono); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: .35rem .4rem; min-height: 2.2rem; width: 100%;
}
.route-table input { width: 6.6rem; }
.route-table input[aria-invalid="true"] { border-color: var(--weld); box-shadow: 0 0 0 1px var(--weld); }
.remove-run {
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  width: 2.2rem; height: 2.2rem; border-radius: 3px; font-size: 1.1rem; line-height: 1;
}
.remove-run:hover { background: rgba(200, 56, 42, .1); color: var(--weld); }
.remove-run:disabled { visibility: hidden; }

.add-run { margin-top: 1.1rem; }
.add-label { display: block; font-size: .8rem; color: var(--ink-soft); margin-bottom: .45rem; }
.dir-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dir-pad button {
  min-height: 2.6rem; border: 1px solid var(--ink); background: var(--paper);
  font: 500 .82rem var(--mono); color: var(--ink); border-radius: 3px; cursor: pointer;
}
.dir-pad button:hover:not(:disabled) { background: var(--pale); }
.dir-pad button:disabled { border-color: var(--rule); color: rgba(13, 50, 55, .35); cursor: not-allowed; }
.route-message { min-height: 2.6em; margin-top: .9rem; font-size: .84rem; color: var(--ink-soft); }
.route-message.is-error { color: var(--weld); }

.drawing-panel {
  position: relative; min-width: 0; min-height: 26rem;
  background-image:
    radial-gradient(circle, rgba(13, 50, 55, .11) .9px, transparent 1.2px);
  background-size: 24px 24px;
}
.iso { position: absolute; inset: 0; width: 100%; height: 100%; }
.noscript { padding: 2rem; color: var(--ink-soft); }

.bom-panel { border-left: 1px solid var(--ink); display: flex; flex-direction: column; font-size: .8rem; }
.bom-panel caption {
  text-align: left; font-weight: 700; font-stretch: 112%; font-size: .85rem;
  padding: .7rem .8rem .45rem;
}
.bom, .cuts { width: 100%; }
.bom th, .cuts th { text-align: left; font-weight: 600; color: var(--ink-soft); font-size: .72rem; padding: .25rem .8rem; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.bom td, .cuts td { padding: .35rem .8rem; border-bottom: 1px solid var(--rule-faint); vertical-align: top; }
.bom td:first-child, .bom td:nth-child(2), .cuts td { font-family: var(--mono); white-space: nowrap; }
.bom td:first-child { color: var(--teal-deep); }
.cuts { border-top: 1px solid var(--ink); }
.cuts td:first-child { color: var(--teal-deep); }
.title-block {
  margin-top: auto; display: grid; grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--ink);
}
.title-block div { padding: .45rem .8rem; border-bottom: 1px solid var(--rule); }
.title-block div:nth-child(odd) { border-right: 1px solid var(--rule); }
.title-block dt { font-size: .68rem; color: var(--ink-soft); }
.title-block dd { font: 500 .9rem var(--mono); }

/* Iso drawing marks (SVG) */
.iso .body { fill: none; stroke: var(--pale); stroke-width: 13; stroke-linecap: butt; stroke-linejoin: round; opacity: .85; }
.iso .pipe { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: square; stroke-linejoin: round; }
.iso .pipe-elbow { fill: none; stroke: var(--ink); stroke-width: 3.2; }
.iso .flange { stroke: var(--ink); stroke-width: 3.2; fill: none; stroke-linecap: square; }
.iso .weld { fill: var(--weld); }
.iso .weld-tag { font: 500 11px var(--mono); fill: var(--weld); }
.iso .weld-leader { stroke: var(--weld); stroke-width: .8; fill: none; }
.iso .dim, .iso .ext { stroke: var(--teal); stroke-width: .9; fill: none; }
.iso .ext { stroke-dasharray: none; opacity: .75; }
.iso .dim-text { font: 500 12.5px var(--mono); fill: var(--teal-deep); paint-order: stroke; stroke: var(--paper-raised); stroke-width: 4px; stroke-linejoin: round; }
.iso .mark { font: 500 12px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--paper-raised); stroke-width: 4px; }
.iso .mark-leader { stroke: var(--ink-soft); stroke-width: .8; fill: none; }
.iso .north path { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.iso .north text { font: 600 12px var(--sans); fill: var(--ink); }
.iso .pipe.changed { stroke: var(--teal); transition: none; }

@media (prefers-reduced-motion: no-preference) {
  .iso .pipe { transition: stroke 1.2s ease; }
}

/* Sections below the hero */
.section-title {
  font-weight: 780; font-stretch: 118%;
  font-size: clamp(1.8rem, 4.2vw, 3.3rem); line-height: 1.02; letter-spacing: -.03em;
  max-width: 22ch;
}
.flow, .standards, .details, .download { padding: clamp(3.5rem, 8vw, 7rem) var(--gutter); border-top: 1px solid var(--rule); }

.flow-steps {
  list-style: none; padding: 0; margin-top: 2.6rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  counter-reset: step;
}
.flow-steps li { counter-increment: step; padding: 1.4rem 1.6rem 0 0; border-top: 2px solid var(--ink); position: relative; }
.flow-steps li + li { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
.flow-steps li::before { content: counter(step); font: 500 .85rem var(--mono); color: var(--teal-deep); }
.flow-steps h3 { margin-top: .4rem; font-size: 1.4rem; font-weight: 750; font-stretch: 112%; }
.flow-steps p { margin-top: .5rem; color: var(--ink-soft); max-width: 30rem; }

.drawing-set { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 3.5rem; border: 1px solid var(--ink); background: var(--paper-raised); }
.set-item { padding: 1.4rem 1.3rem 1.6rem; }
.set-item + .set-item { border-left: 1px solid var(--rule); }
.set-item svg { display: block; width: 100%; max-width: 11rem; height: auto; margin-bottom: 1.1rem; overflow: visible; }
.set-item svg path, .set-item svg rect, .set-item svg ellipse { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.set-item svg .thin { stroke: var(--teal); stroke-width: 1.1; }
.set-item svg .fill { fill: var(--teal); stroke: none; }
.set-item svg circle { fill: var(--weld); }
.set-item svg .balloon { fill: none; stroke: var(--teal); stroke-width: 1.1; }
.set-item svg text { font: 600 8.5px var(--mono); fill: var(--teal-deep); text-anchor: middle; }
.set-item h3 { font-size: 1.05rem; font-weight: 720; font-stretch: 110%; }
.set-item p { margin-top: .35rem; font-size: .92rem; color: var(--ink-soft); }

.standards { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.standards-head p { margin-top: 1.2rem; max-width: 30rem; color: var(--ink-soft); font-size: 1.05rem; }
.refusal { margin-top: 2rem; max-width: 26rem; border: 1px solid var(--weld); background: var(--paper-raised); padding: .9rem 1rem 1rem; }
.refusal-row { display: flex; gap: .5rem; }
.refusal-field { font: 500 .85rem var(--mono); padding: .3rem .6rem; border: 1px solid var(--rule); background: var(--paper); border-radius: 3px; }
.refusal p { margin-top: .7rem; font-size: .9rem; }
.refusal strong { color: var(--weld); }
.ledger { width: 100%; border-top: 2px solid var(--ink); }
.ledger thead th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--ink-soft); padding: .55rem .6rem .55rem 0; border-bottom: 1px solid var(--ink); }
.ledger tbody th { text-align: left; font: 500 .9rem var(--mono); color: var(--teal-deep); padding: .85rem 1.2rem .85rem 0; white-space: nowrap; vertical-align: top; }
.ledger td { padding: .85rem 0; color: var(--ink); vertical-align: top; }
.ledger tbody tr { border-bottom: 1px solid var(--rule); }

.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 4rem; margin-top: 2.6rem; max-width: 70rem; }
.detail-list dt { font-weight: 720; font-stretch: 110%; font-size: 1.15rem; }
.detail-list dd { margin-top: .4rem; color: var(--ink-soft); max-width: 30rem; }

.download { background: var(--ink); color: #e6f1ef; border-top: 0; }
.download .section-title { color: #f4fbf9; }
.download-head p { margin-top: 1rem; color: #a9c3c1; max-width: 34rem; }
.download-head .web-option { margin-top: .6rem; color: #e6f1ef; }
.web-option a { color: #f4fbf9; text-underline-offset: .2em; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.6rem; border-top: 1px solid rgba(230, 241, 239, .3); }
.platform { padding: 1.6rem 1.6rem 1.8rem 0; }
.platform + .platform { padding-left: 1.6rem; border-left: 1px solid rgba(230, 241, 239, .18); }
.platform.is-current h3::after { content: "Your system"; margin-left: .7rem; font: 500 .72rem var(--mono); color: var(--pale); vertical-align: middle; }
.platform h3 { font-size: 1.5rem; font-weight: 760; font-stretch: 115%; }
.platform-req { font-size: .88rem; color: #a9c3c1; margin-top: .2rem; }
.platform ul { list-style: none; padding: 0; margin-top: 1.1rem; display: grid; gap: .45rem; }
.platform a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem .9rem; border: 1px solid rgba(230, 241, 239, .28); border-radius: 3px;
  text-decoration: none; color: #f4fbf9; font-weight: 560;
}
.platform a span { font: 500 .78rem var(--mono); color: var(--pale); }
.platform a:hover { background: rgba(189, 232, 228, .1); border-color: var(--pale); }
.platform.is-current li:first-child a { background: var(--pale); color: var(--ink); border-color: var(--pale); }
.platform.is-current li:first-child a span { color: var(--teal-deep); }
.platform-note { margin-top: 1rem; font-size: .84rem; color: #a9c3c1; }
.platform code { font-family: var(--mono); font-size: .82rem; color: #e6f1ef; }
.download :focus-visible { outline-color: var(--pale); }

.footer { padding: 2.4rem var(--gutter) 2.6rem; background: var(--ink); color: #a9c3c1; font-size: .85rem; border-top: 1px solid rgba(230, 241, 239, .14); display: grid; gap: .4rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; color: #f4fbf9; font-weight: 820; font-stretch: 125%; font-size: 1.25rem; letter-spacing: -.03em; }
.footer-brand .mark { width: 3rem; }
.footer p { max-width: 60rem; }

/* Narrower sheets: the BOM moves under the drawing, then everything stacks. */
@media (max-width: 1180px) {
  .hero-copy { grid-template-columns: minmax(0, 1fr); }
  .sheet-grid { grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr); }
  .bom-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
  .bom-panel .cuts { border-top: 0; border-left: 1px solid var(--rule); }
  .title-block { margin-top: 0; border-top: 0; border-left: 2px solid var(--ink); align-self: stretch; }
  .drawing-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-item:nth-child(2n + 3) { border-left: 0; }
  .set-item:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .set-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .masthead nav { display: none; }
  .masthead .button-small { margin-left: auto; }
  .sheet { padding: 1.6rem 6px 6px; }
  .sheet-zones { inset: 0 6px auto; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr); }
  /* The route table leads on phones; the drawing follows the table it answers. */
  .drawing-panel { border-top: 1px solid var(--ink); min-height: min(80vw, 22rem); }
  .route-panel { border-right: 0; }
  .bom-panel { grid-template-columns: minmax(0, 1fr); }
  .bom-panel .cuts { border-left: 0; border-top: 1px solid var(--ink); }
  .title-block { border-left: 0; border-top: 2px solid var(--ink); }
  .flow-steps, .standards, .detail-list, .platforms { grid-template-columns: minmax(0, 1fr); }
  .flow-steps li + li { padding-left: 0; border-left: 0; margin-top: 1.6rem; }
  .platform + .platform { padding-left: 0; border-left: 0; border-top: 1px solid rgba(230, 241, 239, .18); }
  .drawing-set { grid-template-columns: minmax(0, 1fr); }
  .set-item + .set-item { border-left: 0; border-top: 1px solid var(--rule); }
  .ledger tbody th { white-space: normal; }
}
