/* Pipe.am — one idea: the page is a pipe run. The name is drawn as a manifold the flow passes through;
   the sections hang off one riser; the run ends at the contact address. Everything else stays quiet. */

@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geologica-latin-shrp-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geologica-latin-ext-shrp-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geologica-cyrillic-shrp-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/geologica-cyrillic-ext-shrp-normal.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Noto Sans Armenian";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/noto-sans-armenian-armenian-wght-normal.woff2) format("woff2");
  unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
}

:root {
  --paper: #EEF0EC;
  --ink: #0F1B2D;
  --ink-2: #46525F;
  --rule: #C9CFCC;
  --flow: #E4521B;
  --flow-ink: #B23A0C;
  --focus: #E4521B;

  --font: "Geologica", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --indent: clamp(44px, 6vw, 96px);

  /* the riser's pipe, in CSS pixels */
  --tube: 22px;
  --bore: 12px;
  --flowline: 6px;

  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1826;
    --ink: #E6EBE8;
    --ink-2: #A5B0B8;
    --rule: #26364B;
    --flow: #FF6A2B;
    --flow-ink: #FF8A55;
    --focus: #FF6A2B;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1826;
  --ink: #E6EBE8;
  --ink-2: #A5B0B8;
  --rule: #26364B;
  --flow: #FF6A2B;
  --flow-ink: #FF8A55;
  --focus: #FF6A2B;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(17px, 0.35vw + 15.6px, 19px);
  line-height: 1.6;
  font-weight: 360;
  font-variation-settings: "SHRP" 0;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.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: var(--gutter); top: -100px; padding: 10px 16px; background: var(--ink); color: var(--paper); z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }

/* ── bar ─────────────────────────────────────────────── */
.bar {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 8px 20px;
  padding-block: 18px;
  font-size: 15px;
  line-height: 1.2;
}
.bar a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.bar__name { font-weight: 560; letter-spacing: -0.01em; margin-right: auto; gap: 10px; }
.bar__mark { width: 20px; height: 20px; flex: none; }
.bar__mark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bar__mark .w { stroke: var(--ink); stroke-width: 34; }
.bar__mark .b { stroke: var(--paper); stroke-width: 16; }
.bar__mark .f { stroke: var(--flow); stroke-width: 8; }
.bar__nav { display: flex; gap: 2px; }
.bar__nav a {
  position: relative;
  justify-content: center;
  min-width: 44px;
  padding-inline: 8px;
  color: var(--ink-2);
}
.bar__nav a[aria-current="true"] { color: var(--ink); font-weight: 560; }
.bar__nav a[aria-current="true"]::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 32px;
  translate: 0 -50%;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}
.bar__nav a:hover { color: var(--ink); }
.bar__contact { font-weight: 560; padding-inline: 4px; }
.bar__contact:hover, .bar__name:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── hero: the name as a pipe run ────────────────────── */
.hero { padding-top: clamp(28px, 7vh, 88px); }
.hero__mark {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.mark { display: block; width: 100%; height: auto; overflow: visible; }
.mark use, .mark circle { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mark .wall use { stroke: var(--ink); stroke-width: 30; }
.mark .wall circle { fill: var(--ink); }
.mark .bore use { stroke: var(--paper); stroke-width: 16; }
.mark .bore circle { fill: var(--paper); }
.mark .flow use {
  stroke: var(--flow);
  stroke-width: 8;
  stroke-dasharray: 1 1.2;
  stroke-dashoffset: 0;
}
.mark .flow .node { fill: var(--flow); }
.mark .pulse use { fill: none; stroke: #FFF6EC; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.12 3; stroke-dashoffset: 0.12; opacity: 0; }
.hero__mark.pulse .mark .pulse use { animation: packet calc(var(--t) * 0.9ms) cubic-bezier(.45, 0, .55, 1) calc(var(--d) * 0.75ms) forwards; }
@keyframes packet { from { opacity: 1; stroke-dashoffset: 0.12; } 99% { opacity: 1; } to { opacity: 0; stroke-dashoffset: -1; } }
.hero__mark { cursor: default; -webkit-tap-highlight-color: transparent; }

@media (prefers-reduced-motion: no-preference) {
  .js .mark .flow use {
    stroke-dashoffset: 1.1;
    animation: pour calc(var(--t) * 1ms) cubic-bezier(.45, .05, .55, .95) calc(var(--d) * 1ms + 250ms) forwards;
  }
  .js .mark .flow .node {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(.2);
    animation: valve 420ms cubic-bezier(.2, .9, .3, 1.3) calc(var(--d) * 1ms + 250ms) forwards;
  }
}
@keyframes pour { to { stroke-dashoffset: 0; } }
@keyframes valve { to { opacity: 1; transform: none; } }

.hero__text {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 28px;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(64px, 9vw, 128px);
  align-items: end;
}
.hero__title {
  grid-column: 1 / span 8;
  font-size: clamp(38px, 5.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: 620;
  font-variation-settings: "SHRP" 100;
  text-wrap: balance;
  max-width: 14ch;
}
.hero__lede {
  grid-column: 9 / -1;
  color: var(--ink-2);
  max-width: 34ch;
  text-wrap: pretty;
}
:lang(hy) .hero__title { max-width: 18ch; font-size: clamp(32px, 4.6vw, 70px); letter-spacing: -0.01em; line-height: 1.1; }
:lang(ru) .hero__title { max-width: 16ch; }

/* ── the line: sections hang off one riser (drawn by main.js) ── */
.line { position: relative; padding-left: var(--indent); }
.riser { position: absolute; inset: 0 auto 0 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.riser path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.riser .r-wall { stroke: var(--ink); stroke-width: var(--tube); }
.riser .r-bore { stroke: var(--paper); stroke-width: var(--bore); }
.riser .r-flow { stroke: var(--flow); stroke-width: var(--flowline); }
.riser circle.r-wall { fill: var(--ink); stroke: none; }
.riser circle.r-bore { fill: var(--paper); stroke: none; }
.riser circle.r-flow { fill: var(--flow); stroke: none; }
.riser .r-valve { opacity: 0; transform-box: fill-box; transform-origin: center; scale: .3; transition: opacity 240ms ease, scale 360ms cubic-bezier(.2, .9, .3, 1.3); }
.riser .r-valve.on { opacity: 1; scale: 1; }
.js .outlet__title { border-top: 0; padding-top: 0; }
.js .line--row .outlet { padding-top: 44px; }

.station {
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  font-variation-settings: "SHRP" 100;
  text-wrap: balance;
}
:lang(hy) .station { letter-spacing: 0; }

section + section { margin-top: clamp(88px, 10vw, 148px); }

/* work */
.work__outlets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(36px, 4.5vw, 64px);
}
.outlet { max-width: 36ch; }
.outlet__title {
  font-size: clamp(19px, 1.35vw, 22px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.outlet p { color: var(--ink-2); text-wrap: pretty; }

/* company: a nameplate */
.company__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(28px, 3.5vw, 48px);
  align-items: start;
}
.company__text { color: var(--ink-2); max-width: 34ch; text-wrap: pretty; }
.plate { border-top: 2px solid var(--ink); }
.plate__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}
.plate dt { color: var(--ink-2); font-size: 0.9em; padding-top: 0.08em; }
.plate dd { font-weight: 480; overflow-wrap: anywhere; }
.plate__sub { display: block; font-weight: 360; color: var(--ink-2); font-size: 0.9em; }
.pending { color: var(--ink-2); font-weight: 360; font-style: normal; }
.todo { background: repeating-linear-gradient(-45deg, transparent 0 6px, color-mix(in srgb, var(--flow) 18%, transparent) 6px 12px); outline: 1.5px dashed var(--flow-ink); outline-offset: 2px; font-weight: 500; color: var(--ink); padding-inline: 4px; }

/* contact: where the run ends */
.contact { padding-bottom: clamp(56px, 8vw, 112px); }
.contact__text { color: var(--ink-2); max-width: 46ch; margin-top: 18px; }
.contact__mail {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(36px, 7.2vw, 112px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 640;
  font-variation-settings: "SHRP" 100;
  overflow-wrap: anywhere;
}
.contact__mail a {
  display: inline-block;
  padding-block: max(0px, calc((44px - 1em) / 2)) 0.04em; /* a 44 px target on a phone */
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: max(2px, 0.035em);
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: auto;
  transition: text-decoration-color 200ms ease;
}
.contact__mail a:hover, .contact__mail a:focus-visible { text-decoration-color: var(--flow); }
.copy {
  margin-top: 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  cursor: pointer;
  display: none;
}
.js .copy { display: inline-block; }
.copy:hover { background: var(--ink); color: var(--paper); }
.copy[data-state="done"] { background: var(--flow); border-color: var(--flow); color: #fff; }

/* footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-block: 28px 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 14px;
}

/* ── narrow screens ─────────────────────────────────── */
@media (max-width: 900px) {
  .hero__title, .hero__lede { grid-column: 1 / -1; }
  .work__outlets { grid-template-columns: 1fr; gap: 36px; }
  .company__body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --tube: 16px; --bore: 8px; --flowline: 4px; --indent: 40px; }
  .bar { font-size: 14px; gap: 4px 10px; }
  .bar__nav a { padding-inline: 8px; }
  .plate__row { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Noto Sans Armenian reads lighter than Geologica at the same weight: match the colour of the page */
:lang(hy) body, body:lang(hy) { font-weight: 400; }
:lang(hy) .hero__title { font-weight: 700; }
:lang(hy) .station { font-weight: 680; }
:lang(hy) .outlet__title { font-weight: 680; }

/* ── 404: the pipe ends in a cap ───────────────────── */
.nf__main { min-height: 100svh; display: grid; align-content: center; gap: clamp(32px, 6vw, 72px); padding-block: 48px; }
.nf__pipe { display: block; width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; height: auto; overflow: visible; }
.nf__pipe path { fill: none; stroke-linecap: butt; }
.nf__pipe .w { stroke: var(--ink); stroke-width: 30; }
.nf__pipe .b { stroke: var(--paper); stroke-width: 16; }
.nf__pipe .f { stroke: var(--flow); stroke-width: 8; }
.nf__pipe .cap { fill: var(--ink); }
.nf__text { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.nf__text h1, .nf__text h2 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; font-variation-settings: "SHRP" 100; }
.nf__text p { color: var(--ink-2); margin-top: 10px; max-width: 30ch; }
.nf__text a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-weight: 560; text-underline-offset: 4px; text-decoration-color: var(--flow); text-decoration-thickness: 2px; }
:lang(hy) .nf__text h2 { font-weight: 680; letter-spacing: 0; }
@media (max-width: 760px) { .nf__text { grid-template-columns: 1fr; } }

/* generated: the wordmark's timings */
.mark .k0{--d:0;--t:520}
.mark .k1{--d:520;--t:1500}
.mark .k2{--d:2020;--t:700}
.mark .k3{--d:520;--t:620}
.mark .k4{--d:520;--t:260}
.mark .k5{--d:780;--t:300}
.mark .k6{--d:875;--t:620}
.mark .k7{--d:875;--t:260}
.mark .k8{--d:1215;--t:640}
.mark .k9{--d:1550;--t:640}
.mark .k10{--d:1630;--t:300}
.mark .k11{--d:1730;--t:460}
.mark .k12{--d:2060;--t:380}
.mark .k13{--d:1050}
.mark .k14{--d:1380}
