:root {
  --ink: #2B1D14;
  --muted: #6B5544;
  --paper: #FBF6EE;
  --kraft: #EFE3D0;
  --line: #DCC8AC;
  --line-soft: #EFE3D2;
  --wood: #2A1A10;
  --wood-foot: #241610;
  --cream: #F3E4CF;
  --cream-muted: #C9AE8E;
  --accent: #9A4419;
  --accent-dark: #7A3A14;
  --radius: 14px;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--kraft); }
img, svg { max-width: 100%; }
a { color: var(--accent-dark); }
a:hover { color: #4A2410; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0; }
p { margin: 0; }
table { border-collapse: collapse; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Текстуры */
.wood {
  background-color: var(--wood);
  background-image: radial-gradient(ellipse at 88% 130%, rgba(214, 110, 40, .30), rgba(214, 110, 40, 0) 60%), url(rings.svg);
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right -180px center;
  background-size: auto, 780px;
  color: var(--cream);
}
.wood-foot {
  background-color: var(--wood-foot);
  background-image: url(rings.svg);
  background-repeat: no-repeat;
  background-position: left -260px top -120px;
  background-size: 720px;
  color: var(--cream);
}
.kraft { background-color: var(--kraft); background-image: url(grain.svg); background-size: 480px 160px; }

/* Шапка */
.site-header { border-bottom: 1px solid rgba(243, 228, 207, .14); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--cream); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.logo:hover { color: #fff; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a, .header-phone { color: var(--cream); text-decoration: none; }
.nav a:hover, .header-phone:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.header-phone { font-weight: 600; white-space: nowrap; }
.lang { display: flex; gap: 2px; font-size: 13px; font-weight: 600; }
.lang > * { padding: 6px 10px; border-radius: 6px; }
.lang-current { background: rgba(243, 228, 207, .16); }
.lang a { color: var(--cream-muted); text-decoration: none; }
.lang a:hover { color: var(--cream); }
.icon-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--cream); background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: rgba(243, 228, 207, .1); color: #fff; }

/* Первый экран */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 14px; color: var(--cream-muted); letter-spacing: .04em; }
.hero h1 { font-weight: 500; font-size: 36px; }
.lead { font-size: 17px; color: #E3CDB0; max-width: 580px; }
.hero-art { flex: 1 1 300px; min-width: 0; max-width: 380px; height: auto; opacity: .92; }
.hero-404 { padding-top: 72px; padding-bottom: 96px; }
.link-light { color: var(--cream); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.link-light:hover { color: #fff; }

/* Секции */
.section { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.section-tight { padding-top: 16px; padding-bottom: 32px; }
.section-narrow { max-width: 860px; gap: 0; padding-bottom: 72px; }
.section-narrow h2 { margin-bottom: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.section-head h2 { font-weight: 600; font-size: 28px; }
.section-head p { font-size: 14px; color: var(--muted); }
#delivery .section-head h2, #faq h2 { font-size: 24px; font-weight: 600; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }

/* Таблицы */
.table-card { overflow-x: auto; }
.rtable { width: 100%; font-variant-numeric: tabular-nums; }
.rtable caption { text-align: left; padding: 18px 24px 10px; font-family: var(--serif); font-weight: 600; font-size: 19px; }
.rtable caption span { font-family: var(--sans); font-weight: 500; font-size: 14px; color: var(--muted); }
.rtable thead tr { border-bottom: 1px solid #E6D6BF; }
.rtable thead th { padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; }
.rtable thead th:first-child, .rtable tbody th { padding-left: 24px; }
.rtable tbody tr { border-top: 1px solid var(--line-soft); }
.rtable tbody th { text-align: left; font-weight: 600; padding: 14px 16px 14px 24px; }
.rtable td { padding: 14px 16px; }
.rtable .num { text-align: right; white-space: nowrap; }
.rtable .empty, .rtable .muted { color: #8C7560; }
.price-table .num { width: 110px; }
.price-table .unit { display: none; }
.price-table .act { width: 120px; padding: 6px 24px 6px 8px; text-align: right; }
.price-table tr.is-out th, .price-table tr.is-out td { opacity: .6; }
.delivery-table td:last-child { padding-right: 24px; }
.product { display: flex; align-items: center; gap: 16px; }
.thumb { width: 64px; height: 48px; flex-shrink: 0; border-radius: 10px; background: #F1E4D1; display: inline-flex; align-items: center; justify-content: center; }
.product-name { display: flex; flex-direction: column; gap: 2px; }
.pack { font-weight: 400; font-size: 14px; color: var(--muted); }
.badge { padding: 3px 9px; border-radius: 999px; background: #F6E0CC; color: var(--accent-dark); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-out { background: #E4DACB; color: #4F4135; }
.order-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* Инфо-карточки */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 8px; }
.info { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.info-icon { color: var(--accent-dark); display: inline-flex; }
.info h3 { font-size: 18px; font-weight: 600; }
.info p { color: var(--muted); }

/* Форма */
.order { padding: 28px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 24px; }
.order h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.order-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.order-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.f-name, .f-phone { flex: 1 1 180px; }
.f-product { flex: 2 1 260px; }
.f-tons { flex: 0 1 110px; }
/* 16px: меньше — iOS Safari увеличивает страницу при фокусе на поле */
.order input, .order select, .order textarea { height: 46px; padding: 0 12px; border: 1px solid #CDB89A; border-radius: 8px; background: #FFFDF9; font: inherit; font-size: 16px; color: var(--ink); width: 100%; }
.order input:focus, .order select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.order input[aria-invalid="true"] { border-color: #B42318; }
.btn { height: 46px; padding: 0 24px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .7; cursor: progress; }
.form-status:empty { display: none; }
.form-status { font-size: 15px; }
.form-status.ok { color: #2F5D2E; font-weight: 600; }
.form-status.err { color: #B42318; }

/* FAQ */
details { border-bottom: 1px solid #D8C3A5; padding: 6px 0; }
summary { cursor: pointer; list-style: none; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; box-sizing: border-box; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent-dark); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { margin: 0 0 10px; color: var(--muted); }

/* Подвал */
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 56px; padding-bottom: 32px; }
.footer-contacts { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.footer-contacts > div { display: flex; flex-direction: column; }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.label { font-size: 13px; color: var(--cream-muted); }
.footer-phone { color: var(--cream); font-size: 20px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }
.map-link { flex: 1 1 460px; min-height: 220px; border-radius: var(--radius); background: rgba(243, 228, 207, .06); border: 1px dashed rgba(243, 228, 207, .3); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--cream-muted); }
.map-link:hover { color: var(--cream); background: rgba(243, 228, 207, .1); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(243, 228, 207, .12); font-size: 13px; color: var(--cream-muted); }
.footer-bottom { align-items: center; }
.footer-bottom a { color: var(--cream); display: inline-flex; align-items: center; min-height: 44px; }

/* Планшет: меню в бургер */
@media (max-width: 960px) {
  .header-row { flex-wrap: nowrap; }
  .nav { display: none; }
  .header-phone { display: none; }
  .icon-btn { display: inline-flex; }
  .header-tools { gap: 4px; }
  .site-header.nav-open .header-row { flex-wrap: wrap; }
  .site-header.nav-open .nav { display: flex; flex-direction: column; gap: 0; order: 3; width: 100%; padding: 8px 0; }
  .site-header.nav-open .nav a { padding: 12px 0; border-top: 1px solid rgba(243, 228, 207, .1); }
}

/* Телефон: таблицы превращаются в карточки */
@media (max-width: 760px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .logo { font-size: 17px; }
  .lang > * { padding: 12px 8px; min-height: 44px; box-sizing: border-box; }
  .logo span { white-space: nowrap; }
  .wood { background-position: 0 0, right -260px top -60px; background-size: auto, 520px; }
  .hero { padding-top: 28px; padding-bottom: 24px; gap: 12px; }
  .hero h1 { font-size: 26px; }
  .lead { font-size: 15px; }
  .hero-art { max-width: 240px; margin: 8px auto 0; }
  .section { padding-top: 32px; padding-bottom: 20px; gap: 14px; }
  .section-head h2 { font-size: 24px; }

  .table-card { overflow: visible; background: transparent; border: 0; }
  .rtable, .rtable tbody, .rtable tr, .rtable th, .rtable td, .rtable caption { display: block; width: auto; }
  .rtable thead { display: none; }
  .rtable caption { padding: 4px 0 10px; font-size: 18px; }
  .rtable tbody tr { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
  .rtable tbody th { padding: 0 0 6px; }
  .rtable td { padding: 7px 0; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 12px; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
  .rtable .num { width: auto; font-weight: 600; }
  .rtable td.empty { display: none; }
  .price-table .unit { display: inline; font-weight: 400; font-size: 13px; color: var(--muted); }
  .price-table .act { width: auto; padding: 4px 0 0; border-top: 0; justify-content: flex-end; }
  .price-table .act::before { content: none; }
  .price-table .act:empty { display: none; }
  .product { flex-wrap: wrap; gap: 12px; }
  .thumb { width: 56px; height: 44px; }
  .product-name { flex: 1 1 calc(100% - 68px); min-width: 0; }
  .product .badge { margin-left: 68px; }

  .info-grid { gap: 10px; }
  .info { padding: 16px; }
  .order { padding: 18px; }
  .f-name, .f-phone, .f-product { flex: 1 1 100%; }
  .f-tons { flex: 1 1 0; }
  .btn { flex: 1 1 0; }
  .footer-grid { padding-top: 32px; gap: 20px; }
  .map-link { min-height: 140px; flex-basis: 100%; }
}
