/* Друлеги — публичный сайт. Концепция «Вечерний стол». */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/static/fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("/static/fonts/golos-text-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("/static/fonts/golos-text-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F4EFE6;
  --surface: #EBE4D7;
  --ink: #1F1B16;
  --muted: #5E564B;
  --line: #CFC6B6;
  --accent: #9C3F27;
  --accent-2: #3B4B40;
  --on-accent: #FBF8F2;
  --wash: rgba(31, 27, 22, .06);
  --tex-opacity: .06;
  --img-filter: none;
  --pad: clamp(20px, 5vw, 64px);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130F;
    --surface: #1F1B16;
    --ink: #EDE6D8;
    --muted: #A59B8B;
    --line: #3A342B;
    --accent: #D9825F;
    --accent-2: #9DB3A2;
    --on-accent: #16130F;
    --wash: rgba(237, 230, 216, .05);
    --tex-opacity: .04;
    --img-filter: brightness(.88) contrast(1.02);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/static/img/texture-paper.webp") repeat 0 0 / 512px 512px;
  opacity: var(--tex-opacity);
  pointer-events: none;
}

img { display: block; max-width: 100%; height: auto; filter: var(--img-filter); }
figure { margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; hyphens: manual; }
ol, ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; letter-spacing: -.01em; }
h3 { font-size: 1.75rem; line-height: 1.2; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--accent-2); color: var(--bg); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.muted { color: var(--muted); }
.small { font-size: .9375rem; line-height: 1.5; }
.lead { font-size: 1.3125rem; line-height: 1.5; max-width: 56ch; }

.label {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--green { color: var(--accent-2); }

.skip {
  position: absolute;
  left: 8px;
  top: -64px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  z-index: 10;
}
.skip:focus { top: 8px; }

/* Шапка */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { border-radius: 2px; }
.brand__word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  letter-spacing: .01em;
  line-height: 1;
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
}
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: .9375rem;
  text-decoration: none;
}
.site-nav__cta:hover { border-color: var(--accent); }

/* Кнопки и ссылки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.08); }
.link-under {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Hero */
.hero { padding: 64px 0 96px; }
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: center;
}
.hero__copy {
  grid-column: 1 / 7;
  grid-row: 1;
  padding-block: 32px;
  animation: fade-in .4s ease both;
}
.hero__copy .lead { margin-top: 24px; }
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 32px 0 24px;
}
.hero__micro { margin-bottom: .25em; }
.hero__pic {
  grid-column: 7 / 13;
  grid-row: 1;
  margin-right: calc(-1 * var(--pad));
}
.hero__pic img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 80vh;
  object-fit: cover;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Секции: слева полевая колонка с меткой */
.sec { padding: 128px 0 0; }
.sec__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: calc(1200px - 2 * var(--pad));
  width: calc(100% - 2 * var(--pad));
  padding-inline: 0;
}
.sec__label { grid-column: 1 / 4; margin: 12px 0 0; }
.sec__body { grid-column: 4 / 13; min-width: 0; }
.sec__body > h2 { margin-bottom: 64px; }

/* Что внутри */
.inside {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  column-gap: 24px;
  align-items: start;
}
.inside__main > h2 { margin-bottom: 48px; }
.item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.item:last-child { border-bottom: 1px solid var(--line); }
.item__num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  font-variant-numeric: oldstyle-nums;
  color: var(--muted);
  transition: color .2s, transform .2s;
}
.item:hover .item__num { color: var(--accent); transform: translateX(4px); }
.item h3 { margin-bottom: 8px; }
.item p { margin: 0; max-width: 68ch; }
.inside__pic { position: sticky; top: 96px; }
.inside__pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Почему свой сервер */
.server {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}
.server__text { grid-column: 1 / 6; }
.server__text > h2 { margin-bottom: 32px; }
.server__pic { grid-column: 6 / 10; position: sticky; top: 32px; }
.server__pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.bignum {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: .9;
  letter-spacing: -.02em;
  font-variant-numeric: oldstyle-nums;
}
.server__cap { margin-top: 8px; }
.quote {
  margin: 32px 0 48px;
  padding: 32px;
  background: var(--surface) url("/static/img/texture-paper.webp") repeat 0 0 / 512px 512px;
  border-left: 1px solid var(--accent-2);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
}
.thesis { padding: 24px 0; border-top: 1px solid var(--line); }
.thesis h3 { margin-bottom: 8px; }
.thesis p:last-child { margin-bottom: 0; max-width: 68ch; }
.thesis .label { margin-bottom: 4px; }

/* Как начать */
.how__pic { margin-bottom: 48px; }
.how__pic img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.step { padding: 0 24px; border-left: 1px solid var(--line); }
.step:first-child { padding-left: 0; border-left: 0; }
.step__num {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 5rem;
  line-height: 1;
  font-variant-numeric: oldstyle-nums;
  color: var(--muted);
  margin-bottom: 16px;
}
.step p { margin: 0; max-width: 34ch; }
.how__cta { margin: 48px 0 0; }

/* Для кого */
.scene { padding: 24px 0; border-top: 1px solid var(--line); max-width: 68ch; }
.scene:last-child { border-bottom: 1px solid var(--line); }
.scene h3 { margin-bottom: 8px; }
.scene p { margin: 0; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); max-width: 68ch; }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 20px 48px 20px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--ink);
}
.faq summary::after { transform: rotate(90deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(0); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0; padding: 0 0 24px; max-width: 62ch; }
.faq details[open] > p { animation: fade-in .25s ease both; }

/* Подвал */
.site-footer { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--line); }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  column-gap: 24px;
  row-gap: 32px;
}
.footer__about .small { margin: 16px 0 0; max-width: 40ch; }
.footer__col a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
}
.footer__copy { margin: 32px 0 0; }

/* Юридическая страница */
.legal { padding-top: 64px; }
.legal__col { max-width: 66ch; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 32px; }
.legal__text { line-height: 1.7; }
.legal__text h2 {
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 2rem;
}
.legal__text h3 { margin: 32px 0 12px; font-size: 1.5rem; }
.legal__text p { margin-bottom: 16px; }
.legal__text a { color: var(--accent); }
.legal__text ul { margin: 0 0 16px; }
.legal__text ul li { position: relative; padding-left: 24px; margin-bottom: 8px; }
.legal__text ul li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.legal__text ol { margin: 0 0 16px 24px; list-style: decimal; }
.legal__text ol li { margin-bottom: 8px; padding-left: 8px; }
.legal__text table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: .9375rem; }
.legal__text th, .legal__text td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.legal__text th { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.legal__nav { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal__nav ul li { margin-bottom: 4px; }
.legal__nav a { display: inline-flex; align-items: center; min-height: 44px; }
.legal-page .site-footer { margin-top: 64px; }

/* Планшет */
@media (max-width: 960px) {
  .sec__label { grid-column: 1 / 13; margin: 0 0 24px; }
  .sec__body { grid-column: 1 / 13; }
  .inside { grid-template-columns: 1fr; }
  .inside__pic { display: none; }
  .server { grid-template-columns: 1fr; }
  .server__text, .server__pic { grid-column: 1; }
  .server__pic { position: static; margin-top: 48px; }
  .server__pic img { aspect-ratio: 3 / 2; }
}

/* Мобильные */
@media (max-width: 720px) {
  .hero { padding: 0 0 72px; }
  .hero__grid { display: flex; flex-direction: column; }
  .hero__pic { order: -1; margin: 0 calc(-1 * var(--pad)); width: calc(100% + 2 * var(--pad)); }
  .hero__pic img { aspect-ratio: auto; height: 56vh; max-height: none; }
  .hero__copy { padding-top: 32px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero__actions .btn { width: 100%; }
  .hero__actions .link-under { justify-content: center; }
  .sec { padding-top: 72px; }
  .sec__body > h2 { margin-bottom: 40px; }
  .inside__main > h2 { margin-bottom: 32px; }
  .item { grid-template-columns: 1fr; }
  .item__num { margin-bottom: 4px; }
  .bignum { font-size: 5rem; }
  .how__pic { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; padding-top: 0; }
  .step__num { font-size: 3.5rem; }
  .how__cta .btn { width: 100%; }
  .site-footer { margin-top: 72px; }
  .footer__grid { grid-template-columns: 1fr; }
  .brand__word { font-size: 1.5rem; }
  .site-nav { gap: 12px; }
}

@media (min-resolution: 2dppx) {
  .site-header, .sec__grid, .item, .thesis, .scene, .faq details, .site-footer { border-width: .5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, .site-header, .site-footer, .legal__nav, .skip { display: none; }
  a { color: #000; }
  .legal__text a[href]::after { content: " (" attr(href) ")"; }
}

/* Пометка о черновике юридического документа */
.legal__draft {
  margin: 24px 0 8px;
  padding: 16px 20px;
  border-left: 2px solid var(--clay);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  max-width: 68ch;
}
