/* Точило — мастерская заточки */

:root {
  --primary-100: #f6ead8;
  --primary-300: #ddb56a;
  --primary-400: #c9953f;
  --primary-500: #a8742a;
  --primary-600: #8f6122;
  --primary-700: #744d1a;
  --primary-800: #5a3b14;
  --primary-900: #3f2a0e;

  --background-50: #faf7f2;
  --background-100: #f2ece3;
  --background-200: #e5ddd1;
  --background-300: #cfc4b4;

  --foreground-400: #9a9084;
  --foreground-500: #81786d;
  --foreground-600: #676057;
  --foreground-700: #4f4941;
  --foreground-800: #3a3530;
  --foreground-900: #26221e;

  --accent-800: #2a221b;
  --accent-950: #12100d;

  --secondary-100: #e8ddd0;
  --secondary-800: #5c4a38;

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --fs-h1: 3.75rem;
  --fs-h2: 3rem;
  --fs-h3: 1.5rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--foreground-900);
  background: var(--background-50);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul, ol { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header scrolled */
header.is-scrolled {
  background: rgba(18, 16, 13, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(250, 247, 242, 0.08);
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  padding-top: 4.5rem;
  background: rgba(18, 16, 13, 0.97);
  backdrop-filter: blur(10px);
}

.mobile-nav.is-open { display: block; }

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(250, 247, 242, 0.9);
}

.mobile-nav a:hover { background: rgba(250, 247, 242, 0.1); }

.mobile-nav .mobile-nav-cta {
  margin: 1rem;
  text-align: center;
  background: var(--primary-500);
  color: var(--background-50);
  font-weight: 600;
}

.mobile-nav .mobile-nav-cta:hover { background: var(--primary-600); }

/* FAQ */
.faq-panel > div { min-height: 0; }

.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-item:not(.is-open) .faq-panel {
  grid-template-rows: 0fr;
  opacity: 0;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  background: var(--primary-500);
  color: var(--background-50);
}

.faq-item:not(.is-open) .faq-icon {
  background: var(--background-100);
  color: var(--primary-700);
}

/* Form success */
.form-success {
  padding: 1rem;
  border-radius: 0.375rem;
  background: var(--primary-100);
  color: var(--primary-800);
  font-size: 0.875rem;
  text-align: center;
}

/* Layout */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.left-4 { left: 1rem; }
.bottom-2 { bottom: 0.5rem; }
.top-2 { top: 0.5rem; }
.-bottom-5 { bottom: -1.25rem; }
.-top-3 { top: -0.75rem; }
.left-1\/2 { left: 50%; }
.left-\[27px\] { left: 27px; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.block { display: block; }
.hidden { display: none; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-px { gap: 1px; }
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-10 { gap: 2.5rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-3 { row-gap: 0.75rem; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-rows-\[0fr\] { grid-template-rows: 0fr; }
.grid-rows-\[1fr\] { grid-template-rows: 1fr; }

.w-full { width: 100%; }
.w-px { width: 1px; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-12 { width: 3rem; }
.h-px { height: 1px; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-full { height: 100%; }
.h-\[440px\] { height: 440px; }
.min-h-\[640px\] { min-height: 640px; }

.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mt-9 { margin-top: 2.25rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.p-6 { padding: 1.5rem; }
.p-7 { padding: 1.75rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }

.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }
.object-center { object-position: center; }
.resize-none { resize: none; }
.whitespace-nowrap { white-space: nowrap; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }

.border-background-200 { border-color: var(--background-200); }
.border-background-300 { border-color: var(--background-300); }
.border-primary-300 { border-color: var(--primary-300); }
.border-background-50\/10 { border-color: rgba(250, 247, 242, 0.1); }
.border-background-50\/15 { border-color: rgba(250, 247, 242, 0.15); }
.border-background-50\/25 { border-color: rgba(250, 247, 242, 0.25); }
.border-background-50\/30 { border-color: rgba(250, 247, 242, 0.3); }

.bg-transparent { background-color: transparent; }
.bg-accent-800 { background-color: var(--accent-800); }
.bg-accent-950 { background-color: var(--accent-950); }
.bg-background-50 { background-color: var(--background-50); }
.bg-background-100 { background-color: var(--background-100); }
.bg-background-200 { background-color: var(--background-200); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-900 { background-color: var(--primary-900); }
.bg-secondary-100 { background-color: var(--secondary-100); }
.bg-background-50\/5 { background-color: rgba(250, 247, 242, 0.05); }
.bg-background-50\/10 { background-color: rgba(250, 247, 242, 0.1); }
.bg-background-50\/15 { background-color: rgba(250, 247, 242, 0.15); }
.bg-background-50\/95 { background-color: rgba(250, 247, 242, 0.95); }
.bg-primary-500\/25 { background-color: rgba(168, 116, 42, 0.25); }

.bg-gradient-to-b {
  background-image: linear-gradient(to bottom, var(--tw-gradient-from), var(--tw-gradient-via, transparent), var(--tw-gradient-to));
}
.from-accent-950\/80 { --tw-gradient-from: rgba(18, 16, 13, 0.8); }
.via-accent-950\/60 { --tw-gradient-via: rgba(18, 16, 13, 0.6); }
.to-accent-950\/85 { --tw-gradient-to: rgba(18, 16, 13, 0.85); }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-heading { font-family: var(--font-heading); }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-balance { text-wrap: balance; }

.text-background-50 { color: var(--background-50); }
.text-primary-400 { color: var(--primary-400); }
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }
.text-primary-900 { color: var(--primary-900); }
.text-foreground-400 { color: var(--foreground-400); }
.text-foreground-500 { color: var(--foreground-500); }
.text-foreground-600 { color: var(--foreground-600); }
.text-foreground-700 { color: var(--foreground-700); }
.text-foreground-800 { color: var(--foreground-800); }
.text-foreground-900 { color: var(--foreground-900); }
.text-secondary-800 { color: var(--secondary-800); }

.text-background-50\/55 { color: rgba(250, 247, 242, 0.55); }
.text-background-50\/60 { color: rgba(250, 247, 242, 0.6); }
.text-background-50\/65 { color: rgba(250, 247, 242, 0.65); }
.text-background-50\/70 { color: rgba(250, 247, 242, 0.7); }
.text-background-50\/75 { color: rgba(250, 247, 242, 0.75); }
.text-background-50\/80 { color: rgba(250, 247, 242, 0.8); }
.text-background-50\/90 { color: rgba(250, 247, 242, 0.9); }

.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }

.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

.rotate-180 { transform: rotate(180deg); }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }

.group:hover .group-hover\:bg-primary-500 { background-color: var(--primary-500); }
.group:hover .group-hover\:text-background-50 { color: var(--background-50); }

.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:bg-background-100:hover { background-color: var(--background-100); }
.hover\:bg-background-50\/10:hover { background-color: rgba(250, 247, 242, 0.1); }
.hover\:bg-background-50\/20:hover { background-color: rgba(250, 247, 242, 0.2); }
.hover\:bg-primary-500:hover { background-color: var(--primary-500); }
.hover\:bg-primary-600:hover { background-color: var(--primary-600); }
.hover\:border-primary-500\/40:hover { border-color: rgba(168, 116, 42, 0.4); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.hover\:text-background-50:hover { color: var(--background-50); }
.hover\:text-primary-400:hover { color: var(--primary-400); }
.hover\:text-primary-700:hover { color: var(--primary-700); }
.hover\:text-primary-800:hover { color: var(--primary-800); }

.focus\:border-primary-400:focus { border-color: var(--primary-400); }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(201, 149, 63, 0.35); }
.focus\:ring-primary-300\/40:focus { box-shadow: 0 0 0 2px rgba(221, 181, 106, 0.4); }

.placeholder\:text-foreground-400::placeholder { color: var(--foreground-400); }

/* About photo gallery — always 2 rows, columns = ceil(n / 2) */
.about-gallery-inner {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .about-gallery-inner {
    gap: 1rem;
  }
}

.about-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--background-200);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(38, 34, 30, 0.35);
}

.about-gallery-item:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 2px;
}

.about-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Gallery lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 13, 0.88);
}

.gallery-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: 88vh;
}

.gallery-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 0.5rem;
  object-fit: contain;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(250, 247, 242, 0.12);
  color: var(--background-50);
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
  background: rgba(250, 247, 242, 0.22);
}

.gallery-lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.gallery-lightbox-prev {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.75rem;
}

.gallery-lightbox-next {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.75rem;
}

@media (max-width: 640px) {
  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    display: none;
  }
}

button:disabled, .disabled\:opacity-60:disabled { opacity: 0.6; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--background-300);
  background: var(--background-50);
  border-radius: 0.375rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:w-auto { width: auto; }
}

@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:items-end { align-items: flex-end; }
  .md\:justify-between { justify-content: space-between; }
  .md\:left-6 { left: 1.5rem; }
  .md\:left-8 { left: 2rem; }
  .md\:min-h-\[780px\] { min-height: 780px; }
  .md\:mt-20 { margin-top: 5rem; }
  .md\:p-8 { padding: 2rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .md\:h-14 { height: 3.5rem; }
  .md\:w-14 { width: 3.5rem; }
  .md\:h-\[560px\] { height: 560px; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1.1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1.1; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-right { text-align: right; }
}

@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:gap-14 { gap: 3.5rem; }
  .lg\:-my-3 { margin-top: -0.75rem; margin-bottom: -0.75rem; }
  .lg\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
}
