@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f4f7f8;
  --sheet: #ffffff;
  --ink: #10242f;
  --muted: #4f6470;
  --line: #c9d7dd;
  --grid: #e2eaee;
  --grid-major: #d2dfe4;
  --teal: #0a7c78;
  --teal-dark: #075f5c;
  --teal-wash: #e4f1f0;
  --focus: #0a7c78;
  --radius: 4px;
  --wrap: 1200px;
  --gutter: 24px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 { margin: 0; color: var(--ink); }
h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.1rem);
  font-stretch: 116%;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-stretch: 112%;
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.2rem; font-weight: 650; line-height: 1.25; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}
.skip:focus { left: 12px; }

/* Drawing-sheet grid: 24px minor, 120px major — the page's paper. */
.sheet-grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--teal); border-radius: var(--radius);
  background: var(--teal); color: #fff;
  font: inherit; font-weight: 620; font-size: 1rem; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.button--small { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.button--quiet { background: transparent; border-color: transparent; color: var(--ink); padding: 0 12px; text-decoration: underline; text-underline-offset: 4px; }
.button--quiet:hover { background: transparent; border-color: transparent; color: var(--teal-dark); }
.button--outline { background: var(--sheet); color: var(--teal-dark); }
.button--outline:hover { background: var(--teal-wash); color: var(--teal-dark); }

.iconbutton {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--sheet); color: var(--ink); cursor: pointer;
}
.iconbutton:hover { border-color: var(--teal); color: var(--teal-dark); }
.iconbutton svg { width: 18px; height: 18px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 247, 248, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 28px; height: 28px; color: var(--teal); }
.brand__word { font-size: 1.25rem; font-weight: 720; font-stretch: 122%; letter-spacing: -.01em; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a:not(.button) { color: var(--ink); text-decoration: none; font-weight: 520; }
.topnav a:not(.button):hover { color: var(--teal-dark); }

/* Hero */
.hero { border-bottom: 1px solid var(--line); }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 80px;
}
.hero__copy { max-width: 34rem; }
.lede { margin-top: 22px; font-size: 1.2rem; line-height: 1.5; color: var(--muted); max-width: 31rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 22px; font-size: .92rem; font-stretch: 94%; color: var(--muted); max-width: 28rem; }

/* The drawing sheet: viewer + dimension lines + title block. */
.drawing { margin: 0; background: var(--sheet); border: 1.5px solid var(--ink); }
.drawing__stage { position: relative; aspect-ratio: 4 / 3; padding: 28px 64px 56px 28px; }
.viewer { width: 100%; height: 100%; display: block; --poster-color: transparent; background: transparent; }
.drawing__stage .viewer { position: absolute; inset: 28px 64px 56px 28px; width: auto; height: auto; }
.drawing__photo {
  position: absolute; inset: 28px 64px 56px 28px;
  width: calc(100% - 92px); height: calc(100% - 84px);
  object-fit: contain; background: var(--sheet);
  clip-path: inset(0 0 0 0);
}
.drawing__scan {
  position: absolute; top: 28px; bottom: 56px; left: 28px; width: 2px;
  background: var(--teal); opacity: 0; pointer-events: none;
}
.drawing.is-revealing .drawing__photo { animation: wipe 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
.drawing.is-revealing .drawing__scan { animation: scan 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
.drawing.is-revealed .drawing__photo { clip-path: inset(0 0 0 100%); visibility: hidden; }
@keyframes wipe { to { clip-path: inset(0 0 0 100%); } }
@keyframes scan {
  0% { opacity: 1; left: 28px; }
  90% { opacity: 1; }
  100% { opacity: 0; left: calc(100% - 64px); }
}
@media (prefers-reduced-motion: reduce) {
  .drawing.is-revealing .drawing__photo, .drawing.is-revealing .drawing__scan { animation: none; }
  .drawing.is-revealing .drawing__photo { visibility: hidden; }
}

.dim { position: absolute; overflow: visible; stroke: var(--teal); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
.dim line { vector-effect: non-scaling-stroke; }
.dim--width { left: 28px; right: 64px; bottom: 18px; height: 16px; width: calc(100% - 92px); }
.dim--height { top: 28px; bottom: 56px; right: 26px; width: 16px; height: calc(100% - 84px); }
.dim__label {
  position: absolute; padding: 0 8px; background: var(--sheet);
  color: var(--teal-dark); font-size: .85rem; font-weight: 600; font-stretch: 92%;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dim__label--width { left: calc(28px + (100% - 92px) / 2); bottom: 16px; transform: translateX(-50%); }
.dim__label--height {
  right: 6px; top: calc(28px + (100% - 84px) / 2);
  transform: translateY(-50%) rotate(-90deg); transform-origin: center;
  right: 0; width: 64px; text-align: center; background: transparent;
}

.titleblock { border-top: 1.5px solid var(--ink); display: flex; align-items: stretch; }
.titleblock dl, dl.titleblock { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1; }
.titleblock dl > div, dl.titleblock > div { padding: 10px 14px 12px; border-right: 1px solid var(--line); min-width: 0; }
.titleblock dt { font-size: .74rem; font-stretch: 90%; color: var(--muted); letter-spacing: .01em; }
.titleblock dd { margin: 2px 0 0; font-size: .95rem; font-weight: 600; font-stretch: 96%; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.titleblock__credit { grid-column: 1 / -1; border-top: 1px solid var(--line); }
dl.titleblock--modal { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
dl.titleblock--modal > div:nth-child(2) { border-right: 0; }
.titleblock__credit dd { font-weight: 450; font-size: .82rem; color: var(--muted); }
.titleblock__credit a { color: var(--muted); }
.titleblock__nav { display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.titleblock__count { min-width: 3.4em; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Section scaffolding */
.steps, .formats, .pricing, .faq { padding: 96px 0; border-bottom: 1px solid var(--line); }
.examples { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: end; margin-bottom: 40px; }
.section-head p { color: var(--muted); max-width: 36rem; }

/* How it works: a real sequence, joined by a construction line. */
.steps h2 { margin-bottom: 48px; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; position: relative; }
.steps__list::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; border-top: 1px dashed var(--line); }
.steps__list li { position: relative; padding-right: 40px; counter-increment: step; }
.steps__list li::before {
  content: counter(step); position: relative; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 24px;
  border: 1.5px solid var(--teal); border-radius: 50%; background: var(--paper);
  color: var(--teal-dark); font-weight: 700; font-stretch: 110%;
}
.steps__list p { margin-top: 10px; color: var(--muted); max-width: 22rem; }

/* Examples: cells of one drawing sheet, sharing edges. */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); background: var(--sheet);
}
.gallery li { border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.tile { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.tile__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sheet); border-bottom: 1px solid var(--line); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__media .tile__render { position: absolute; inset: 0; object-fit: contain; background: var(--sheet); opacity: 0; transition: opacity .2s ease; padding: 12px; }
.tile:hover .tile__render, .tile:focus-visible .tile__render { opacity: 1; }
.tile__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px 14px; }
.tile__title { font-weight: 620; }
.tile__size { font-size: .85rem; font-stretch: 92%; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile:focus-visible { outline-offset: -3px; }

/* Formats */
.formats__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.formats__table { width: 100%; margin-top: 36px; border-collapse: collapse; }
.formats__table th, .formats__table td { padding: 18px 0; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.formats__table tr:last-child th, .formats__table tr:last-child td { border-bottom: 1px solid var(--line); }
.formats__table th { width: 6.5rem; font-size: 1.05rem; font-weight: 700; font-stretch: 118%; color: var(--teal-dark); }
.formats__table td { color: var(--muted); }
.limits { background: var(--sheet); border: 1px solid var(--line); border-left: 3px solid var(--teal); padding: 26px 28px; margin-top: 8px; }
.limits ul { margin: 14px 0 0; padding-left: 1.1em; color: var(--muted); }
.limits li + li { margin-top: 10px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--sheet); }
.plan { padding: 32px 28px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); }
.plan:last-child { border-right: 0; }
.plan--featured { background: var(--teal-wash); }
.plan__price { color: var(--muted); }
.plan__price span { color: var(--ink); font-size: 2.4rem; font-weight: 700; font-stretch: 112%; letter-spacing: -.02em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.plan__limit { margin-bottom: 14px; }
.plan .button { margin-top: auto; align-self: flex-start; }
.packs { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 32px; align-items: start; margin-top: 40px; }
.packs ul { list-style: none; margin: 0; padding: 0; }
.packs li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.packs li span:last-child { font-weight: 650; }
.packs p { color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 620; font-size: 1.08rem;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq__list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__list details p { padding: 0 0 22px; color: var(--muted); max-width: 44rem; }

/* Closing + footer */
.closing { padding: 88px 0; border-bottom: 1px solid var(--line); }
.closing__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer { padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* Example dialog */
.modal {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 1.5px solid var(--ink); border-radius: 0; background: var(--sheet); color: var(--ink);
}
.modal::backdrop { background: rgba(16, 36, 47, .55); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px 14px 22px; border-bottom: 1.5px solid var(--ink); }
.modal__head h2 { font-size: 1.4rem; }
.modal__body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.modal__photo { width: 100%; height: 100%; max-height: 62vh; object-fit: contain; background: var(--paper); border-right: 1px solid var(--line); }
.modal__viewer { height: min(62vh, 520px); }

/* Legal pages */
.legal { padding: 64px 0 96px; }
.legal article { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.25rem; font-stretch: 105%; margin-top: 36px; margin-bottom: 8px; }
.legal p, .legal li { color: #2b3f4a; }
.legal p + p { margin-top: 12px; }
.legal .updated { color: var(--muted); margin-top: 8px; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; }

/* Responsive */
@media (max-width: 960px) {
  .hero__inner, .section-head, .formats__inner, .faq__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero__inner { padding-top: 48px; padding-bottom: 56px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .packs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .topnav a[href^="#"] { display: none; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .steps, .formats, .pricing, .faq, .examples { padding: 64px 0; }
  .steps__list { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps__list::before { left: 22px; right: auto; top: 22px; bottom: 22px; border-top: 0; border-left: 1px dashed var(--line); }
  .steps__list li { padding-right: 0; padding-left: 68px; }
  .steps__list li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { border-right: 0; border-bottom: 1px solid var(--line); }
  .plan:last-child { border-bottom: 0; }
  .drawing__stage { padding: 16px 44px 44px 16px; }
  .drawing__stage .viewer, .drawing__photo { inset: 16px 44px 44px 16px; }
  .drawing__photo { width: calc(100% - 60px); height: calc(100% - 60px); }
  .drawing__scan { top: 16px; bottom: 44px; left: 16px; }
  .dim--width { left: 16px; right: 44px; bottom: 10px; width: calc(100% - 60px); }
  .dim--height { top: 16px; bottom: 44px; right: 14px; height: calc(100% - 60px); }
  .dim__label--width { left: calc(16px + (100% - 60px) / 2); bottom: 8px; }
  .dim__label--height { top: calc(16px + (100% - 60px) / 2); width: 44px; }
  .titleblock { flex-direction: column; }
  .titleblock dl, dl.titleblock { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .titleblock dl > div:nth-child(2), dl.titleblock > div:nth-child(2) { border-right: 0; }
  .titleblock dl > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
  .titleblock__nav { justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); }
  .modal__body { grid-template-columns: minmax(0, 1fr); }
  .modal__photo { max-height: 28vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal__viewer { height: 42vh; }
  .topnav { gap: 14px; }
  .topnav__signin { display: none; }
  .closing__inner { flex-direction: column; align-items: flex-start; }
}
