@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-cyrillic.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  color-scheme: light;
  --paper: #f8f8f3;
  --ink: #24271f;
  --muted: #595d52;
  --olive: #454e39;
  --olive-hover: #343d2a;
  --rule: #dadcd1;
  --panel: #edeee6;
  --field-rule: #b4b9aa;
  --body-font: "Inter", system-ui, sans-serif;
  --display-font: "Cormorant Garamond", Georgia, serif;
  --gutter: clamp(20px, 4.45vw, 72px);
  --column-gap: clamp(20px, 1.95vw, 32px);
  --header-height: 70px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 22px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem / 1.55 var(--body-font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}

.frame {
  width: min(calc(100% - var(--gutter) * 2), 1440px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.header-inner,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-inner {
  min-height: calc(var(--header-height) - 1px);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: 1;
}

.brand-mark {
  position: relative;
  width: 21px;
  height: 23px;
  color: var(--olive);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  left: 1px;
  width: 19px;
  height: 4px;
  background: currentColor;
  content: "";
  transform: skewY(-17deg);
}

.brand-mark::before {
  top: 7px;
}

.brand-mark::after {
  top: 14px;
}

.main-nav {
  display: flex;
  gap: clamp(20px, 2.75vw, 44px);
}

.main-nav a,
.calculate-link,
.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 500;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.main-nav a:hover,
.calculate-link:hover,
.back-link:hover,
.copy-button:hover {
  text-decoration: underline;
}

.nav-estimate,
.calculate-link,
.back-link {
  color: var(--olive);
}

.arrow {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  transform: rotate(45deg);
}

.arrow::before {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 10px;
  height: 1px;
  background: currentColor;
  content: "";
}

.arrow::after {
  position: absolute;
  top: 2px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.arrow-up {
  transform: rotate(-90deg);
}

.intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: var(--column-gap);
  padding-block: clamp(64px, 5.6vw, 94px) clamp(62px, 5.3vw, 90px);
}

.intro h1,
.estimate h2 {
  font-family: var(--display-font);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .89;
}

.intro h1 {
  grid-column: span 2;
  font-size: clamp(3.9rem, 7.05vw, 7.4rem);
}

.intro p {
  max-width: 29ch;
  margin-block-end: 3px;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}

.catalog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-block-end: 22px;
}

.catalog-bar h2 {
  font-size: clamp(1.625rem, 2.38vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.1;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: transparent;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
}

.filter:hover {
  border-color: var(--olive);
}

.filter[aria-pressed="true"] {
  border-color: var(--olive);
  background: var(--olive);
  color: var(--paper);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px var(--column-gap);
}

.collection-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--panel);
  object-fit: cover;
}

.collection-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block-start: 15px;
}

.collection-type,
.collection-materials {
  color: var(--muted);
  font-size: .8125rem;
}

.collection-info h3 {
  margin-block: 3px 4px;
  font-size: clamp(1.1875rem, 1.65vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.calculate-link {
  flex-shrink: 0;
  font-size: .8125rem;
}

.estimate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(40px, 6vw, 95px);
  margin-block-start: clamp(76px, 8.1vw, 124px);
  padding: clamp(32px, 5.5vw, 80px);
  background: var(--panel);
}

.estimate h2 {
  font-size: clamp(3.3rem, 6.35vw, 6.125rem);
}

.estimate-intro p {
  max-width: 34ch;
  margin-block-start: 22px;
  color: var(--muted);
}

.estimate-workspace {
  width: min(100%, 490px);
  padding-block-start: 4px;
}

.estimate-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: .875rem;
  font-weight: 500;
}

.select-field,
.width-field {
  position: relative;
}

.field input,
.field select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 42px 10px 14px;
  border: 1px solid var(--field-rule);
  border-radius: 0;
  background: var(--paper);
  font-size: 1rem;
}

.field input::placeholder,
.field select:invalid,
.width-field span {
  color: var(--muted);
}

.field select {
  appearance: none;
  cursor: pointer;
}

.field select option {
  color: var(--ink);
}

.select-field::after {
  position: absolute;
  top: calc(50% - 5px);
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--olive);
  border-bottom: 1px solid var(--olive);
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
}

.width-field span {
  position: absolute;
  top: 50%;
  right: 15px;
  font-size: .875rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.primary-button {
  min-height: 50px;
  justify-self: start;
  margin-block-start: 5px;
  padding: 11px 20px;
  border: 1px solid var(--olive);
  border-radius: 0;
  background: var(--olive);
  color: var(--paper);
  font-size: .875rem;
  font-weight: 500;
}

.primary-button:hover {
  border-color: var(--olive-hover);
  background: var(--olive-hover);
}

.draft {
  margin-block-start: 24px;
  scroll-margin-block-end: 16px;
  padding: 19px 20px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.draft h3 {
  font-size: 1rem;
  font-weight: 600;
}

.draft p {
  margin-block-start: 8px;
  overflow-wrap: anywhere;
  font-size: .9375rem;
  white-space: pre-line;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-block-start: 5px;
}

.copy-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive);
  font-size: .875rem;
  font-weight: 500;
  text-underline-offset: 4px;
}

#copy-status {
  color: var(--muted);
  font-size: .8125rem;
}

.site-footer {
  min-height: 90px;
  margin-block-start: 50px;
  border-top: 1px solid var(--rule);
}

.site-footer .brand {
  font-size: 1.375rem;
}

@media (max-width: 1099px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .intro {
    display: block;
  }

  .intro p {
    max-width: 40ch;
    margin-block-start: 24px;
  }
}

@media (max-width: 699px) {
  :root {
    --header-height: 60px;
  }

  .header-inner {
    gap: 12px;
  }

  .brand {
    gap: 7px;
    font-size: 1.4375rem;
  }

  .main-nav {
    gap: 16px;
  }

  .main-nav a {
    gap: 5px;
    font-size: .8125rem;
  }

  .intro {
    padding-block: 47px 44px;
  }

  .intro h1 {
    font-size: clamp(2.05rem, 11.9vw, 4.5rem);
    line-height: .94;
  }

  .intro p {
    margin-block-start: 20px;
    font-size: .9375rem;
  }

  .catalog-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-block-end: 16px;
  }

  .filter {
    padding-inline: 13px;
    font-size: .8125rem;
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
  }

  .collection-info {
    padding-block-start: 12px;
  }

  .estimate {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 28px 22px;
  }

  .estimate-intro p {
    margin-block-start: 15px;
    font-size: .9375rem;
  }

  .primary-button {
    justify-self: stretch;
  }

  .site-footer {
    min-height: 72px;
    margin-block-start: 36px;
  }
}

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