:root {
  --ink: #16201d;
  --ink-soft: #53615c;
  --forest: #173d33;
  --forest-light: #276957;
  --lime: #dfff68;
  --cream: #f4f2ea;
  --paper: #fffefa;
  --line: #d9ddd5;
  --sand: #e8dcc4;
  --blue: #cbdde4;
  --section-blue: #174b73;
  --radius: 3px;
  --shadow: 0 20px 60px rgba(24, 46, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(223, 255, 104, 0.8);
  outline-offset: 3px;
}

.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;
}

.app-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 24px auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.site-header {
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: var(--lime);
  font-family: "Prata", serif;
  font-size: 20px;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.15em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-self: stretch;
  gap: 42px;
}

[hidden] { display: none !important; }

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: transparent;
}

.main-nav a.active {
  color: var(--ink);
}

.main-nav a.active::after {
  background: var(--forest);
}

.header-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #61a856;
  box-shadow: 0 0 0 4px #e7f2e3;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: 1.6fr 0.7fr;
  align-items: end;
  gap: 80px;
  overflow: hidden;
  padding: 72px 70px 64px;
  background: var(--forest);
  color: white;
}

.home-hero {
  min-height: 190px;
  align-items: center;
  gap: 40px;
  padding: 32px 70px;
  background: var(--section-blue);
}

.hero.home-hero::after {
  border-color: #aad9f5;
}

.hero.home-hero h1 {
  max-width: 700px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -280px;
  right: 8%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.02);
}

.hero::after {
  content: "";
  position: absolute;
  top: 44px;
  right: 54px;
  width: 44px;
  height: 44px;
  border-top: 1px solid var(--lime);
  border-right: 1px solid var(--lime);
}

.hero-copy,
.hero-meta,
.certificate-stamp {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--forest-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--lime);
}

.hero h1 {
  max-width: 790px;
  margin: 0;
  font-family: "Prata", serif;
  font-size: clamp(44px, 6.2vw, 88px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--lime);
  font-weight: inherit;
}

.hero-description {
  max-width: 610px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  line-height: 1.75;
}

.hero-meta {
  padding: 24px 0 0 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.home-hero .hero-meta {
  padding-top: 0;
}

.hero-meta > span,
.hero-meta > strong {
  display: block;
}

.hero-meta > span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-meta > strong {
  margin-top: 5px;
  font-family: "Prata", serif;
  font-size: 22px;
  font-weight: 400;
}

.refresh-button {
  margin-top: 28px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(223, 255, 104, 0.5);
  background: transparent;
  color: var(--lime);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 2.2;
}

.refresh-button span {
  display: inline-block;
  margin-right: 7px;
  font-size: 15px;
  transition: transform 0.4s ease;
}

.refresh-button:hover span,
.refresh-button.loading span {
  transform: rotate(180deg);
}

.home-hero .refresh-button {
  margin-top: 16px;
  border-color: rgba(170, 217, 245, 0.5);
  color: #aad9f5;
}

.registry-section,
.certificates-section {
  padding: 78px 70px 92px;
}

.registry-section {
  padding-top: 42px;
}

.contacts-section {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr);
  gap: 56px;
  padding: 68px 70px 76px;
  background: var(--section-blue);
  color: white;
}
.contacts-heading .eyebrow { color: #aad9f5; }
.contacts-heading h2 { margin: 16px 0 0; font-family: "Prata", serif; font-size: clamp(34px, 4vw, 50px); font-weight: 400; }
.contacts-heading > p:last-child:not(.eyebrow) { max-width: 390px; margin: 18px 0 0; color: #d3e5f3; font-size: 12px; line-height: 1.65; white-space: pre-line; }
.contacts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.contact-item { min-width: 0; border-top: 1px solid rgba(255,255,255,.26); padding-top: 16px; }
.contact-item > span { display: block; margin-bottom: 10px; color: #b9d9ee; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.contact-item a, .contact-item p { margin: 0; color: white; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.contact-item a { text-decoration: underline; text-underline-offset: 4px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Prata", serif;
  font-size: clamp(33px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.section-heading > p {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 11px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px;
  gap: 12px;
  margin-top: 38px;
}

.toolbar.no-search {
  grid-template-columns: 190px;
}

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

.search-field input,
.select-field select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  font-size: 12px;
}

.search-field input {
  padding: 0 18px 0 46px;
}

.search-field input::placeholder {
  color: #88948f;
}

.select-field select {
  padding: 0 36px 0 16px;
  cursor: pointer;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 17px;
  left: 18px;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--forest);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.5px;
  right: -5px;
  bottom: -2px;
  background: var(--forest);
  transform: rotate(45deg);
}

.registry-table-wrap {
  margin-top: 20px;
  border: 1px solid var(--line);
  background: white;
  overflow-x: auto;
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.registry-table th {
  padding: 17px 16px;
  border-bottom: 1px solid var(--line);
  color: #77827e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.registry-table th:first-child,
.registry-table td:first-child {
  padding-left: 24px;
}

.registry-table td {
  padding: 22px 16px;
  border-bottom: 1px solid #ebede8;
  color: var(--ink-soft);
  font-size: 12px;
  vertical-align: middle;
}

.registry-table tr:last-child td {
  border-bottom: 0;
}

.registry-table tbody tr {
  transition: background 0.2s ease;
}

.registry-table tbody tr:hover {
  background: #f8f9f4;
}

.product-name {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.product-meta {
  display: block;
  margin-top: 4px;
  color: #82908a;
  font-size: 10px;
}

.amount-badge,
.vat-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 800;
}

.amount-badge {
  background: #eef2e9;
  color: var(--forest);
}

.vat-badge {
  background: #e3eedf;
  color: #397047;
}

.vat-badge.no-vat {
  background: #f0eee8;
  color: #77736a;
}

.mobile-product-list {
  display: none;
}

.data-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
}

.data-state[hidden] {
  display: none;
}

.data-state p {
  max-width: 420px;
  margin: 8px 20px 0;
  font-size: 12px;
  line-height: 1.6;
}

.data-state h3 {
  margin: 18px 0 0;
  font-family: "Prata", serif;
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
}

.loader {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.state-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: "Prata", serif;
  color: var(--forest);
}

.dark-button {
  margin-top: 22px;
  padding: 12px 20px;
  border: 0;
  border-radius: 2px;
  background: var(--forest);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.compact-state {
  min-height: 230px;
  margin: 0;
  border: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.certificates-hero {
  grid-template-columns: 1fr auto;
}

.certificate-stamp {
  width: 190px;
  height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(223, 255, 104, 0.65);
  border-radius: 50%;
  color: var(--lime);
  transform: rotate(-8deg);
}

.certificate-stamp::before,
.certificate-stamp::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(223, 255, 104, 0.35);
  border-radius: 50%;
}

.certificate-stamp::after {
  inset: 28px;
  border-style: solid;
}

.certificate-stamp span,
.certificate-stamp small {
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.certificate-stamp strong {
  z-index: 1;
  margin: 5px 0;
  font-family: "Prata", serif;
  font-size: 42px;
  font-weight: 400;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 42px;
}

.certificate-card {
  border: 1px solid var(--line);
  background: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.document-preview {
  position: relative;
  min-height: 390px;
  margin: 12px;
  padding: 25px;
  overflow: hidden;
}

.document-preview::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -80px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.17;
  box-shadow: 0 0 0 28px currentColor, 0 0 0 56px rgba(255, 255, 255, 0.45);
}

.preview-green { background: #d5e6d8; color: #245143; }
.preview-sand { background: var(--sand); color: #715b3e; }
.preview-blue { background: var(--blue); color: #2d5262; }

.document-brand {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.document-seal {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 58px auto 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "Prata", serif;
  font-size: 27px;
}

.document-preview strong {
  display: block;
  font-family: "Prata", serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
}

.document-lines {
  position: absolute;
  left: 25px;
  bottom: 27px;
  width: 84px;
  height: 22px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.35;
}

.certificate-info {
  padding: 14px 20px 24px;
}

.certificate-info span {
  color: var(--ink);
  font-family: "Prata", serif;
  font-size: 17px;
}

.certificate-info p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.certificate-download {
  display: inline-block;
  margin-top: 16px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
}

.certificate-status { margin-top: 28px; color: var(--ink-soft); }
.certificate-status:empty { display: none; }

.documents-note {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 50px;
  padding: 34px 38px;
  background: var(--forest);
  color: white;
}

.note-number {
  color: var(--lime);
  font-family: "Prata", serif;
  font-size: 66px;
  text-align: center;
}

.documents-note div {
  padding-left: 36px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.documents-note h3 {
  margin: 0;
  font-family: "Prata", serif;
  font-size: 23px;
  font-weight: 400;
}

.documents-note p {
  max-width: 720px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 27px 44px;
  border-top: 1px solid var(--line);
  color: #85908c;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(100% - 24px, 1480px);
    margin: 12px auto;
  }

  .site-header {
    padding: 0 26px;
  }

  .hero {
    padding: 64px 42px 52px;
    gap: 40px;
  }

  .home-hero {
    padding: 28px 42px;
  }

  .registry-section,
  .certificates-section {
    padding: 62px 42px 72px;
  }

  .registry-section { padding-top: 36px; }

  .contacts-section { grid-template-columns: 1fr; gap: 34px; padding: 58px 42px 66px; }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .certificate-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .certificate-card:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: 100%;
    margin: 0;
  }

  .site-header {
    position: relative;
    min-height: 76px;
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }

  .header-status {
    display: none;
  }

  .menu-button {
    width: 42px;
    height: 42px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span:not(.sr-only) {
    display: block;
    height: 1px;
    background: var(--ink);
    transition: transform 0.2s ease;
  }

  .main-nav {
    position: absolute;
    z-index: 10;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    min-height: 48px;
    border-bottom: 1px solid #ebede8;
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    min-height: 500px;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 36px;
    padding: 60px 24px 42px;
  }

  .home-hero {
    min-height: 0;
    gap: 24px;
    padding: 28px 24px 30px;
  }

  .hero.home-hero h1 { font-size: clamp(27px, 7vw, 36px); }

  .hero h1 {
    font-size: clamp(43px, 14vw, 66px);
  }

  .hero-description {
    font-size: 13px;
  }

  .hero-meta {
    padding-top: 18px;
  }

  .registry-section,
  .certificates-section {
    padding: 54px 20px 64px;
  }

  .registry-section { padding-top: 30px; }

  .contacts-section { padding: 50px 20px 58px; }
  .contacts-grid { grid-template-columns: 1fr; gap: 22px; }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .section-heading > p {
    margin: 0;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .registry-table {
    display: none;
  }

  .registry-table-wrap {
    border: 0;
    background: transparent;
  }

  .mobile-product-list {
    display: grid;
    gap: 10px;
  }

  .mobile-product-card {
    padding: 20px;
    border: 1px solid var(--line);
    background: white;
  }

  .mobile-product-card header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ebede8;
  }

  .mobile-product-card header strong {
    font-size: 13px;
  }

  .mobile-product-card header span {
    color: var(--forest);
    font-family: "Prata", serif;
    font-size: 17px;
    white-space: nowrap;
  }

  .mobile-product-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 17px 0 0;
  }

  .mobile-product-card dt {
    color: #8b9692;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .mobile-product-card dd {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 11px;
  }

  .certificates-hero {
    min-height: 610px;
  }

  .certificate-stamp {
    width: 145px;
    height: 145px;
    justify-self: center;
  }

  .certificate-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card:last-child {
    grid-column: auto;
    display: block;
  }

  .document-preview {
    min-height: 360px;
  }

  .documents-note {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 24px;
  }

  .note-number {
    text-align: left;
  }

  .documents-note div {
    padding: 20px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
    padding: 24px 20px;
  }
}

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