:root {
  --ivory: #f5f0e8;
  --bg: #fbf8f2;
  --sand: #e5d6c5;
  --coffee: #98765d;
  --choc: #493529;
  --text: #6d5b4b;
  --paper: #fffaf3;
  --header-h: 64px;
  --pad-x: 20px;
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: Aptos, "Segoe UI", Calibri, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-width: 320px;
}

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

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

a {
  color: var(--choc);
  text-decoration: none;
}

h1,
h2,
h3,
.logo {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  color: var(--choc);
  letter-spacing: -0.02em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--choc);
  color: var(--ivory);
  padding: 8px 14px;
  z-index: 200;
}

.skip-link:focus {
  top: 12px;
}

.kicker {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--coffee);
}

.lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--choc);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn--solid {
  background: var(--choc);
  color: var(--ivory);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: #3a281f;
}

.btn--ghost {
  background: transparent;
  color: var(--choc);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--ivory);
}

.text-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 0;
  min-height: 44px;
  cursor: pointer;
  color: var(--choc);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  border-bottom: 1px solid var(--sand);
}

/* ——— Header: mobile composition ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad-x);
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 214, 197, 0.7);
}

.logo {
  font-size: 20px;
  letter-spacing: 0.28em;
  line-height: 1;
}

.nav-bar {
  display: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: none;
  align-items: center;
  gap: 6px;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 2px;
  min-height: 44px;
  cursor: pointer;
  color: var(--coffee);
  letter-spacing: 0.12em;
  font-size: 12px;
}

.lang-btn.is-active {
  color: var(--choc);
}

.lang-sep {
  color: var(--sand);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--choc);
  transition: transform 0.3s var(--ease), width 0.3s var(--ease), opacity 0.3s;
}

.menu-toggle span:nth-child(1) {
  width: 22px;
}

.menu-toggle span:nth-child(2) {
  width: 16px;
}

.menu-toggle span:nth-child(3) {
  width: 22px;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 30;
  background: var(--ivory);
  padding: 28px var(--pad-x) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.25;
  padding: 10px 0;
  color: var(--choc);
  border-bottom: 1px solid var(--sand);
}

.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 28px;
}

.lang-switch--mobile {
  display: flex;
}

body.menu-open {
  overflow: hidden;
}

/* ——— Hero: mobile vertical sequence ——— */
.hero {
  padding: 36px var(--pad-x) 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.15;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.hero-actions .btn {
  width: 100%;
}

.hero-specs {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coffee);
}

.hero-visual {
  margin: 0;
  position: relative;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

.hero-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coffee);
}

/* ——— Catalog: single column ——— */
.catalog,
.examples,
.process,
.about,
.contact {
  padding: 56px var(--pad-x);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.catalog {
  background: var(--ivory);
}

.section-head {
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.catalog-card {
  background: var(--paper);
}

.card-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.card-body {
  padding: 22px 4px 8px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.card-body p {
  margin: 0 0 8px;
}

.card-meta,
.card-price {
  font-size: 13px;
  color: var(--coffee);
}

/* ——— Gallery: stacked editorial ——— */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.gallery-item {
  margin: 0;
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gallery-open img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.gallery-item--d img,
.gallery-item--e img {
  aspect-ratio: 5 / 4;
}

/* ——— Process: vertical steps ——— */
.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-list li {
  padding: 22px 0 22px 16px;
  border-left: 1px solid var(--sand);
}

.step-num {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--coffee);
  margin-bottom: 8px;
}

.process-list h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.process-list p {
  margin: 0;
  font-size: 15px;
}

/* ——— About: stacked ——— */
.about {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--ivory);
}

.about-visual {
  margin: 0;
}

.about-visual img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.about-copy h2 {
  margin: 0 0 18px;
  font-size: 32px;
}

.about-contacts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-contacts a {
  display: inline-block;
  margin-left: 8px;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 2px;
  word-break: break-word;
}

/* ——— Contact ——— */
.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact-form,
.modal-dialog form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label,
.modal-dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.modal-dialog input,
.modal-dialog textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--sand);
  background: transparent;
  padding: 12px 0;
  min-height: 48px;
  outline: none;
}

.contact-form textarea,
.modal-dialog textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.modal-dialog input:focus,
.modal-dialog textarea:focus {
  border-bottom-color: var(--choc);
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--coffee);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-aside .btn {
  width: 100%;
}

/* ——— Footer ——— */
.site-footer {
  padding: 40px var(--pad-x) 32px;
  border-top: 1px solid var(--sand);
  display: grid;
  gap: 24px;
}

.footer-brand p {
  margin: 8px 0 0;
  font-size: 14px;
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a,
.footer-contact a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-copy {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--coffee);
}

/* ——— Overlays ——— */
.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(73, 53, 41, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden],
.lightbox[hidden] {
  display: none;
}

.modal-dialog {
  width: min(520px, 100%);
  background: var(--bg);
  padding: 32px 24px;
  position: relative;
  max-height: 90vh;
  overflow: auto;
}

.modal-close,
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: var(--choc);
}

.order-type-label {
  margin: 0 0 8px;
  color: var(--coffee);
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 86vh;
  object-fit: contain;
}

/* =========================================================
   TABLET — 768px to 1023px
   Intermediate editorial layout, not a squeezed desktop.
   ========================================================= */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --pad-x: 40px;
    --header-h: 76px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-bar {
    display: flex;
    align-items: center;
    gap: 22px;
  }

  .nav-bar a {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    padding: 10px 0;
  }

  .header-tools .lang-switch {
    display: flex;
  }

  .hero {
    padding: 48px var(--pad-x) 64px;
    gap: 36px;
  }

  .hero h1 {
    font-size: 48px;
    max-width: 16ch;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: auto;
  }

  .hero-visual img {
    aspect-ratio: 16 / 10;
    object-position: center;
  }

  .catalog-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .catalog-card:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }

  .catalog-card:last-child .card-media img {
    height: 100%;
    aspect-ratio: auto;
  }

  .catalog-card:last-child .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 8px;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .gallery-item--d {
    grid-column: 1 / -1;
  }

  .gallery-item--d img {
    aspect-ratio: 16 / 8;
  }

  .process-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 32px;
  }

  .process-list li:last-child {
    grid-column: 1 / -1;
  }

  .about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
  }

  .contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
  }

  .site-footer {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   DESKTOP — 1024px and above
   Wide editorial magazine composition.
   ========================================================= */
@media (min-width: 1024px) {
  :root {
    --pad-x: 72px;
    --header-h: 88px;
  }

  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }

  .site-header {
    padding: 0 var(--pad-x);
  }

  .logo {
    font-size: 22px;
    letter-spacing: 0.34em;
  }

  .nav-bar {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-left: auto;
    margin-right: 36px;
  }

  .nav-bar a {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    position: relative;
    padding: 8px 0;
  }

  .nav-bar a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 1px;
    background: var(--choc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }

  .nav-bar a:hover::after,
  .nav-bar a:focus-visible::after {
    transform: scaleX(1);
  }

  .header-tools .lang-switch {
    display: flex;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
    grid-template-areas:
      "kicker visual"
      "title visual"
      "lead visual"
      "actions visual"
      "specs visual";
    column-gap: 72px;
    row-gap: 0;
    align-content: center;
    min-height: calc(100vh - var(--header-h));
    padding: 48px var(--pad-x) 72px;
    max-width: none;
  }

  .hero-kicker {
    grid-area: kicker;
    margin-bottom: 18px;
  }

  .hero h1 {
    grid-area: title;
    font-size: 64px;
    line-height: 1.08;
    max-width: 11ch;
    margin-bottom: 24px;
  }

  .hero-lead {
    grid-area: lead;
    max-width: 38ch;
    font-size: 18px;
  }

  .hero-visual {
    grid-area: visual;
  }

  .hero-actions {
    grid-area: actions;
  }

  .hero-specs {
    grid-area: specs;
  }

  .hero-actions {
    flex-direction: row;
    margin-top: 36px;
  }

  .hero-actions .btn {
    width: auto;
  }

  .hero-specs {
    margin-top: 28px;
    font-size: 12px;
  }

  .hero-visual {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-visual img {
    aspect-ratio: 4 / 5;
    max-height: 78vh;
    width: 100%;
    object-fit: cover;
  }

  .catalog,
  .examples,
  .process,
  .about,
  .contact {
    padding: 96px var(--pad-x);
  }

  .section-head {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: baseline;
    margin-bottom: 56px;
    max-width: var(--max);
  }

  .section-head .kicker {
    margin: 0;
    padding-top: 10px;
  }

  .section-head h2 {
    font-size: 48px;
  }

  .section-head .lead {
    grid-column: 2;
    max-width: 48ch;
    margin-top: 8px;
  }

  .catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    max-width: var(--max);
  }

  .card-body {
    padding: 28px 8px 4px;
  }

  .card-body h3 {
    font-size: 32px;
  }

  .gallery {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    grid-template-rows: 280px 280px 360px;
    gap: 18px;
    max-width: none;
  }

  .gallery-item {
    min-height: 0;
  }

  .gallery-open,
  .gallery-open img {
    height: 100%;
  }

  .gallery-open img {
    aspect-ratio: auto;
    height: 100%;
    object-fit: cover;
  }

  .gallery-item--a {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .gallery-item--b {
    grid-column: 2;
    grid-row: 1;
  }

  .gallery-item--c {
    grid-column: 3;
    grid-row: 1;
  }

  .gallery-item--d {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .gallery-item--e {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .gallery-item--f {
    grid-column: 3;
    grid-row: 3;
  }

  .process-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-top: 1px solid var(--sand);
  }

  .process-list li {
    padding: 36px 28px 8px 0;
    border-left: 0;
    border-right: 1px solid var(--sand);
  }

  .process-list li:last-child {
    border-right: 0;
  }

  .process-list h3 {
    font-size: 22px;
    max-width: 12ch;
  }

  .about {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 80px;
    align-items: center;
  }

  .about-visual img {
    aspect-ratio: 4 / 5;
    max-height: 720px;
    width: 100%;
  }

  .about-copy h2 {
    font-size: 48px;
    max-width: 10ch;
  }

  .about-copy .lead {
    font-size: 18px;
    max-width: 38ch;
  }

  .contact-layout {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 80px;
    max-width: var(--max);
    align-items: start;
  }

  .contact-aside .btn {
    width: auto;
    align-self: flex-start;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1fr;
    gap: 40px;
    padding: 64px var(--pad-x) 40px;
    align-items: start;
  }

  .footer-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 28px;
  }

  .footer-nav a,
  .footer-contact a {
    min-height: auto;
  }

  .footer-copy {
    grid-column: 1 / -1;
    margin-top: 24px;
  }
}

@media (min-width: 1440px) {
  :root {
    --pad-x: 96px;
  }

  .hero h1 {
    font-size: 76px;
  }
}
