/* LLC Modeler — paper, ink, oxidized copper. */

:root {
  --ink: #1c1915;
  --ink-soft: #4a453c;
  --paper: #f3eee4;
  --sheet: #e7e0d2;
  --rule: #d2c9b8;
  --copper: #3e6a56;
  --copper-deep: #2c4e40;
  --oxblood: #6e3a32;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", Times, serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  --measure: 40rem;
}

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

html[lang="uk"] .t-en {
  display: none !important;
}

html[lang="en"] .t-uk {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
.pull,
.brand-name,
.email-line {
  font-family: var(--serif);
  font-weight: 600;
}

h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 18ch;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
}

h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

p,
ul,
ol,
dl,
figure,
address {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--copper);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--copper-deep);
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--copper-deep);
  outline-offset: 3px;
}

::selection {
  background: #d5e3db;
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0;
  transform: translateY(-150%);
  z-index: 20;
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 0.7rem 1rem;
}

.skip:focus {
  transform: translateY(0.75rem);
}

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  padding-top: 0.85rem;
}

.mast-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

.mast-place {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper-deep);
  font-weight: 600;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex: none;
}

.lang-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.35rem;
  cursor: pointer;
}

.lang-btn:hover {
  color: var(--ink);
}

html[lang="uk"] .lang-btn[data-set-lang="uk"],
html[lang="en"] .lang-btn[data-set-lang="en"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.lang-sep {
  color: var(--rule);
  user-select: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0 0.9rem;
  max-width: 100%;
}

.brand img {
  width: 48px;
  height: 48px;
  flex: none;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-line {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.brand:hover .brand-name {
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.site-nav {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.nav-list a[aria-current="page"] {
  text-decoration-color: var(--copper);
}

.page-intro {
  padding: 3.25rem 0 1.25rem;
}

.kicker {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-deep);
}

.lede {
  margin: 1.2rem 0 0;
  max-width: 38rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--copper-deep);
  border-color: var(--copper-deep);
  color: var(--paper);
  text-decoration: none;
}

.text-link {
  font-weight: 600;
}

.plate {
  margin: 0.25rem 0 2.75rem;
}

.plate img,
.diagram img {
  width: 100%;
  height: auto;
  background: var(--sheet);
}

.plate figcaption,
.diagram figcaption {
  margin-top: 0.65rem;
  max-width: var(--measure);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.chapter {
  display: grid;
  gap: 0.85rem 2.5rem;
  border-top: 1px solid var(--rule);
  padding: 2.6rem 0;
}

.chapter-label {
  margin: 0;
  padding-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
}

.chapter-body > p,
.prose > p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.chapter-body > p:last-child,
.prose > p:last-child {
  margin-bottom: 0;
}

.steps {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  counter-reset: step;
  max-width: 44rem;
}

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  column-gap: 0.85rem;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 1.3rem;
}

.steps > li:last-child {
  border-bottom: 1px solid var(--rule);
}

.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--copper-deep);
}

.steps h3 {
  margin: 0;
}

.steps p {
  margin: 0.35rem 0 0;
  grid-column: 2;
}

.plain-list {
  margin: 0.35rem 0 1rem;
  padding-left: 1.15rem;
  max-width: var(--measure);
}

.plain-list li {
  margin: 0.35rem 0;
  padding-left: 0.2rem;
}

.plain-list li::marker {
  color: var(--copper-deep);
}

.callout {
  margin: 1.15rem 0 0;
  padding-left: 0.95rem;
  border-left: 3px solid var(--copper);
  max-width: var(--measure);
}

.pull {
  margin: 1.6rem 0 0.4rem;
  max-width: 16em;
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.values {
  margin: 0.2rem 0 0;
  max-width: var(--measure);
}

.values dt {
  margin-top: 1.35rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.values dt:first-child {
  margin-top: 0;
}

.values dd {
  margin: 0.3rem 0 0;
}

.diagram {
  margin: 1.5rem 0 0;
  max-width: 28rem;
}

.contact-grid {
  display: grid;
  gap: 2.75rem;
  padding: 0.5rem 0 3.5rem;
}

.contact-grid > * {
  min-width: 0;
}

.addr {
  margin: 0 0 0.75rem;
  max-width: 28rem;
  overflow-wrap: break-word;
}

.addr-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
}

.email-line {
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.email-line a,
.footer-email a {
  text-decoration-thickness: 1px;
}

.footer-email {
  margin: 0;
  overflow-wrap: anywhere;
}

.form-note,
.req-note {
  margin: 0 0 1.15rem;
  max-width: 38rem;
  color: var(--ink);
}

.req-note {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.field {
  margin: 0 0 1.15rem;
}

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.98rem;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.55rem 0.1rem;
  min-height: 48px;
}

textarea {
  min-height: 9.5rem;
  border: 1px solid var(--ink);
  padding: 0.75rem;
  resize: vertical;
  line-height: 1.5;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--oxblood);
}

input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--paper) inset;
}

.form-error {
  margin: 0 0 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--oxblood);
  color: var(--oxblood);
  max-width: 38rem;
}

.form-error[hidden] {
  display: none !important;
}

.form-error .when-empty,
.form-error .when-email {
  display: none;
}

.form-error[data-error="empty"] .when-empty,
.form-error[data-error="email"] .when-email {
  display: block;
}

.form-actions {
  margin-top: 0.4rem;
}

.after-form {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.site-footer {
  background: var(--sheet);
  border-top: 1px solid var(--ink);
  padding: 2.4rem 0 2.8rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.footer-mark img {
  width: 36px;
  height: 36px;
  flex: none;
}

.footer-mark:hover {
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 0.16em;
}

.footer-nav ul {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.footer-nav a[aria-current="page"] {
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
}

.site-footer address {
  font-style: normal;
}

.legal {
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 420px) {
  .wrap {
    width: min(72rem, calc(100% - 1.75rem));
  }

  body {
    font-size: 1.0625rem;
  }
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(12rem, 0.8fr);
    gap: 2rem 2.5rem;
    align-items: start;
  }
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    gap: 4rem;
    align-items: start;
    padding-bottom: 4.5rem;
  }
}

@media (min-width: 700px) {
  .mast-place {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }
}

@media (min-width: 900px) {
  .page-intro {
    padding: 5rem 0 1.5rem;
  }

  .nav-list {
    justify-content: space-between;
  }

  .chapter {
    grid-template-columns: 11rem minmax(0, 1fr);
    padding: 4rem 0;
  }

  .plate {
    margin-bottom: 3.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media print {
  .skip,
  .lang-switch,
  .actions,
  .footer-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-footer {
    background: #fff;
  }

  a {
    text-decoration: underline;
  }
}
