﻿:root {
  --paper: #f8f2e8;
  --paper-deep: #efe3d2;
  --ink: #352a24;
  --ink-soft: #5a4a43;
  --ribbon: #b24747;
  --ribbon-soft: #d9847f;
  --line: #ceb79f;
  --accent: #8b6b4e;
  --ok: #1f6f43;
  --warn: #7d2e2e;
  --shadow: 0 12px 30px rgba(53, 42, 36, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, #fff7ea 0, transparent 45%),
    radial-gradient(circle at 80% 0%, #f7ebe2 0, transparent 35%),
    repeating-linear-gradient(0deg, rgba(206, 183, 159, 0.15), rgba(206, 183, 159, 0.15) 1px, transparent 1px, transparent 28px),
    var(--paper);
  line-height: 1.65;
}

img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

a {
  color: #6d1f1f;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
  color: #8e2a2a;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  color: #111;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 1500;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(5px);
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(360px, 2fr);
  align-items: center;
  gap: 14px 24px;
  padding: 14px 0;
}

h1 {
  margin: 0;
  font-size: clamp(0.98rem, 1.6vw, 1.38rem);
  line-height: 1.2;
}

.brand-home {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

.current-page {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  margin: 0;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  justify-self: end;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

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

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

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.anchor-nav a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 99px;
  background: #fff;
  transition: all 0.25s ease;
}

.anchor-nav a.active,
.anchor-nav a:hover,
.anchor-nav a:focus-visible {
  background: var(--ribbon);
  border-color: var(--ribbon);
  color: #fff;
}

.ribbon-line {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--ribbon), var(--ribbon) 24px, var(--ribbon-soft) 24px, var(--ribbon-soft) 36px);
}

.hero {
  padding: 28px 0 10px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 20px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.section {
  padding: 30px 0;
}

.section,
.hero,
section[id] {
  scroll-margin-top: 110px;
}

.section h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  margin-bottom: 10px;
  position: relative;
}

.section h2::after {
  content: "";
  display: block;
  width: 94px;
  height: 2px;
  background: var(--ribbon);
  margin-top: 8px;
}

.tool-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.tool-card,
.contact-info,
.contact-form,
.legal,
.faq-item {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.tool-card {
  grid-column: span 4;
}

.contact-info,
.contact-form {
  grid-column: span 6;
}

.contact-info img {
  width: min(100%, 260px);
  max-height: 170px;
  object-fit: cover;
  margin-bottom: 10px;
}

label,
input,
textarea,
button {
  font-family: inherit;
  font-size: 1rem;
}

input,
textarea,
button {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #b99a7f;
  background: #fffdf9;
}

button {
  cursor: pointer;
  background: #a13d3d;
  color: #fff;
  border-color: #a13d3d;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.95;
}

.ghost-btn {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.form-feedback {
  min-height: 1.4rem;
  margin-top: 4px;
  font-weight: 700;
}

.form-feedback.ok { color: var(--ok); }
.form-feedback.err { color: var(--warn); }

.hp-wrap {
  position: absolute;
  left: -9999px;
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.plain-list li {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.72);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.result-box {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 52px;
  background: rgba(255,255,255,0.76);
}

.faq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.faq-toggle {
  text-align: left;
  width: 100%;
  margin: 0;
}

.faq-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding-top 0.3s ease;
  padding-top: 0;
}

.faq-content.open {
  opacity: 1;
  padding-top: 8px;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: auto;
  padding: 10px 12px;
  border-radius: 999px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  background: rgba(239, 227, 210, 0.75);
}

.footer-grid {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 0;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  border-top: 1px solid var(--line);
  background: rgba(248, 242, 232, 0.98);
  box-shadow: 0 -8px 20px rgba(0,0,0,0.08);
}

.cookie-inner {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 10px 0;
  display: block;
}

.cookie-copy p {
  margin: 0 0 8px;
  max-width: 82ch;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-actions button {
  width: auto;
  min-width: 130px;
}

.cookie-panel {
  position: fixed;
  inset: 0;
  background: rgba(53, 42, 36, 0.38);
  display: grid;
  place-items: center;
  z-index: 1400;
}

.cookie-banner[hidden],
.cookie-panel[hidden] {
  display: none !important;
}

.cookie-panel-card {
  width: min(520px, 92vw);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.65);
}

.cookie-option input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

figure {
  margin: 14px 0 0;
}

figure img {
  width: min(100%, 380px);
  max-height: 260px;
  display: block;
  object-fit: cover;
}

.with-media {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 12px 22px;
  align-items: start;
}

.with-media > *:not(figure) {
  grid-column: 1;
}

.with-media > figure {
  grid-column: 2;
  grid-row: 1 / span 30;
  margin-top: 4px;
}

@media (max-width: 920px) {
  .header-grid {
    grid-template-columns: 1fr auto;
    gap: 8px;
    position: relative;
  }

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

  .menu-toggle {
    display: inline-block;
  }

  .anchor-nav {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
  }

  .site-header.menu-open .anchor-nav {
    max-height: 560px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding: 10px;
    border-color: var(--line);
    background: #fff;
    box-shadow: 0 8px 18px rgba(53, 42, 36, 0.12);
  }

  .anchor-nav a {
    white-space: normal;
    width: 100%;
    text-align: left;
  }

  .anchor-nav {
    grid-column: 1 / -1;
  }

  .tool-card,
  .contact-info,
  .contact-form {
    grid-column: span 12;
  }

  .cookie-inner {
    padding: 10px 0 12px;
  }

  .cookie-actions button {
    flex: 1 1 140px;
  }

  .with-media {
    grid-template-columns: 1fr;
  }

  .with-media > figure {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 320px);
    margin: 10px 0 0;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.58;
  }

  .header-grid {
    padding: 10px 0;
  }

  .section {
    padding: 22px 0;
  }

  .hero {
    padding: 18px 0 6px;
  }

  .hero-card,
  .tool-card,
  .contact-info,
  .contact-form,
  .legal,
  .faq-item {
    padding: 12px;
  }

  .contact-info img {
    width: min(100%, 220px);
    max-height: 145px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cookie-actions button {
    min-width: 0;
    width: 100%;
  }
}

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

  * {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
