/*
Theme Name: Подарок Оригинал
Theme URI: https://podarok-original.ru/
Description: Лёгкая редакционная дочерняя тема для GeneratePress. Локальные шрифты, асимметричная сетка, без конструктора страниц.
Author: Редакция «Подарок Оригинал»
Template: generatepress
Version: 1.0.0
Text Domain: podarok-original
*/

:root {
  --po-sand-50: oklch(0.95668 0.01472 98.28703);
  --po-sand-100: oklch(0.91488 0.01639 95.23738);
  --po-forest-900: oklch(0.2703 0.01502 174.92944);
  --po-forest-800: oklch(0.31399 0.02364 154.63237);
  --po-red-600: oklch(0.52701 0.1814 30.84039);
  --po-coral-400: oklch(0.71609 0.15683 33.68531);
  --po-night-950: oklch(0.21951 0.00974 173.2274);
  --po-night-50: oklch(0.93256 0.01481 98.2936);

  --surface: var(--po-sand-50);
  --surface-alt: var(--po-sand-100);
  --ink: var(--po-forest-900);
  --ink-strong: var(--po-forest-800);
  --accent: var(--po-red-600);
  --line: color-mix(in oklch, var(--ink) 24%, transparent);
  --font-editorial: "PT Serif", Georgia, "Times New Roman", serif;
  --content-wide: 1360px;
  --content-reading: 72ch;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
}

* { box-sizing: border-box; }
html { background: var(--surface); color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-editorial);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body, button, input, textarea, select { font-family: var(--font-editorial); }
a { color: var(--ink); text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
::selection { background: var(--accent); color: var(--surface); }
img { max-width: 100%; height: auto; }

.site, .site-content, .inside-header, .inside-navigation, .inside-site-info { max-width: 100%; }
.site-header, .main-navigation, .site-info { background: var(--surface); color: var(--ink); }
.inside-header {
  width: min(calc(100% - 64px), var(--content-wide));
  margin: 0 auto;
  padding: 28px 0 22px;
}
.site-branding .main-title {
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.site-description { display: none; }
.site-logo { display: none; }
.main-navigation {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.inside-navigation {
  width: min(calc(100% - 64px), var(--content-wide));
  margin: 0 auto;
  min-height: 56px;
  padding: 0;
}
.main-navigation .main-nav > ul > li > a {
  padding: 14px 22px 14px 0;
  margin-right: 26px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
.main-navigation .menu-toggle {
  min-width: 44px;
  min-height: 44px;
  color: var(--ink);
}
.main-navigation .menu-toggle .mobile-menu { font-size: 16px; }
.main-navigation a, .main-title a, .podarok-home a, .entry-title a, .site-info a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size 220ms cubic-bezier(0.25, 1, 0.5, 1), color 180ms ease-out;
}
.main-navigation a:hover, .main-title a:hover, .podarok-home a:hover, .entry-title a:hover, .site-info a:hover {
  background-size: 0 1px;
  color: var(--accent);
}
.main-navigation .current-menu-item > a { color: var(--accent); }

.site-content { padding: 0; }
.one-container .site-content, .separate-containers .site-content { background: transparent; }
.one-container .inside-article, .separate-containers .inside-article {
  padding: 0;
  background: transparent;
  border: 0;
}
.content-area, .site-main { margin: 0; }

/* Home */
.podarok-home { overflow: clip; }
.po-wrap { width: min(calc(100% - 64px), var(--content-wide)); margin: 0 auto; }
.po-hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  min-height: min(760px, calc(100dvh - 160px));
  padding: 56px 0 72px;
  align-items: center;
}
.po-hero::before {
  content: "";
  position: absolute;
  inset: 0 calc((100vw - 100%) / -2);
  pointer-events: none;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(8.3333% - 1px), color-mix(in oklch, var(--ink) 7%, transparent) calc(8.3333% - 1px), color-mix(in oklch, var(--ink) 7%, transparent) 8.3333%);
  opacity: 0.55;
}
.po-hero-copy { position: relative; grid-column: 1 / 9; z-index: 1; padding-top: 24px; }
.po-kicker { margin: 0 0 32px; color: var(--accent); font-size: 16px; }
.po-hero-title {
  margin: 0;
  font-size: clamp(68px, 9.6vw, 150px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.88;
}
.po-hero-title span { display: block; }
.po-hero-title span:last-child { margin-left: 0.44em; color: var(--accent); }
.po-hero-lead { max-width: 570px; margin: 42px 0 32px; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.45; }
.po-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink) !important;
  color: var(--surface) !important;
  font-size: 17px;
  line-height: 1.4;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}
.po-button:hover { background: var(--ink-strong) !important; color: var(--surface) !important; transform: translateY(-2px); }
.po-button:active { transform: translateY(0); }
.po-hero-visual { position: relative; grid-column: 9 / 13; margin: 0; z-index: 0; }
.po-hero-visual img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.po-hero-visual figcaption { margin-top: 10px; font-size: 13px; line-height: 1.45; }
.po-hero-placeholder {
  aspect-ratio: 4 / 5;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  text-align: center;
}
.po-section { padding: 80px 0; border-top: 1px solid var(--line); }
.po-section-heading {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
  margin-bottom: 48px;
}
.po-section-heading h2 { grid-column: 1 / 8; margin: 0; font-size: clamp(40px, 5vw, 72px); font-weight: 400; letter-spacing: -0.045em; line-height: 1.02; }
.po-section-heading p { grid-column: 9 / 13; margin: 0; font-size: 18px; }
.po-paths { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.po-path { grid-column: span 4; padding: 24px 0 32px; border-top: 2px solid var(--ink); }
.po-path:nth-child(2) { margin-top: 56px; }
.po-path h3 { margin: 0 0 16px; font-size: 32px; font-weight: 400; line-height: 1.2; }
.po-path p { margin: 0 0 22px; }
.po-text-link { color: var(--accent) !important; }
.po-articles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px 24px; }
.po-card { grid-column: span 4; min-width: 0; }
.po-card:first-child { grid-column: span 7; }
.po-card:nth-child(2) { grid-column: span 5; padding-top: 80px; }
.po-card-image { display: block; margin-bottom: 20px; overflow: hidden; background: var(--surface-alt); }
.po-card-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 260ms ease-out, opacity 260ms ease-out; }
.po-card:first-child .po-card-image img { aspect-ratio: 16 / 10; }
.po-card:hover .po-card-image img { transform: scale(1.025); }
.po-card-meta { margin: 0 0 8px; color: var(--accent); font-size: 14px; }
.po-card h3 { margin: 0; font-size: clamp(24px, 2.2vw, 34px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.18; }
.po-card-excerpt { margin: 14px 0 0; font-size: 16px; line-height: 1.6; }
.po-empty { grid-column: 1 / -1; max-width: 620px; margin: 0; font-size: 24px; }
.po-note { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.po-note h2 { grid-column: 1 / 6; margin: 0; font-size: clamp(38px, 4.2vw, 62px); font-weight: 400; line-height: 1.08; }
.po-note-body { grid-column: 7 / 13; font-size: 21px; }
.po-note-body p:first-child { margin-top: 0; }

/* Archives */
.archive .site-main, .blog .site-main, .search-results .site-main {
  width: min(calc(100% - 64px), var(--content-wide));
  margin: 0 auto;
  padding: 64px 0 96px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px;
}
.archive .page-header, .blog .page-header, .search-results .page-header { grid-column: 1 / 10; margin: 0 0 24px; padding: 0 0 32px; border-bottom: 1px solid var(--line); }
.archive .page-title, .blog .page-title, .search-results .page-title { margin: 0; font-size: clamp(44px, 6vw, 82px); font-weight: 400; letter-spacing: -0.05em; line-height: 1.02; }
.archive-description { max-width: 70ch; font-size: 20px; }
.archive .post, .blog .post, .search-results .post { grid-column: span 4; margin: 0; }
.archive .post:first-of-type, .blog .post:first-of-type, .search-results .post:first-of-type { grid-column: span 8; }
.archive .post .inside-article, .blog .post .inside-article, .search-results .post .inside-article { height: 100%; }
.archive .entry-header, .blog .entry-header, .search-results .entry-header { margin-bottom: 16px; }
.archive .entry-title, .blog .entry-title, .search-results .entry-title { font-size: 30px; font-weight: 400; line-height: 1.18; }
.archive .post-image, .blog .post-image, .search-results .post-image { margin: 0 0 20px; }
.post-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.entry-summary { font-size: 17px; }
.entry-meta { font-size: 14px; color: var(--ink); }
.nav-links { grid-column: 1 / -1; display: flex; gap: 16px; }
.nav-links a, .nav-links span { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); }

/* Articles and pages */
.single .site-main, .page .site-main, .error404 .site-main {
  width: min(calc(100% - 64px), 1120px);
  margin: 0 auto;
  padding: 64px 0 96px;
}
.single .entry-header, .page .entry-header { max-width: 960px; margin: 0 auto 40px; }
.single .entry-title, .page .entry-title, .error404 .page-title {
  margin: 0;
  font-size: clamp(42px, 5.6vw, 76px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.06;
}
.single .entry-meta { margin-top: 24px; }
.single .post-image { margin: 0 0 48px; }
.single .post-image img { aspect-ratio: 16 / 9; }
.entry-content { max-width: var(--content-reading); margin: 0 auto; font-size: 19px; line-height: 1.72; overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 1.35em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--ink); font-weight: 400; letter-spacing: -0.025em; }
.entry-content h2 { margin-top: 1.8em; margin-bottom: 0.65em; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.16; }
.entry-content h3 { margin-top: 1.55em; margin-bottom: 0.55em; font-size: 30px; line-height: 1.2; }
.entry-content h4 { font-size: 24px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.55em; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: 8px 0 8px 28px; border-left: 1px solid var(--accent); font-size: 23px; line-height: 1.5; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 17px; }
.entry-content th, .entry-content td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { margin-top: 8px; font-size: 14px; }
.page .entry-content { max-width: 76ch; }
.tag-links { display: none; }

/* Search */
.search-form { display: flex; gap: 8px; }
.search-field { min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); font-size: 17px; }
.search-submit { min-height: 48px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--surface); padding: 8px 18px; cursor: pointer; }

/* Footer */
.site-info { margin-top: 0; border-top: 1px solid var(--line); }
.inside-site-info { width: min(calc(100% - 64px), var(--content-wide)); margin: 0 auto; padding: 56px 0; }
.copyright-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; font-size: 16px; }
.po-footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }

@media (max-width: 1024px) {
  .po-hero-title { font-size: clamp(64px, 10.5vw, 108px); }
  .po-card { grid-column: span 6; }
  .po-card:first-child, .po-card:nth-child(2) { grid-column: span 6; padding-top: 0; }
  .archive .post, .blog .post, .search-results .post { grid-column: span 6; }
  .archive .post:first-of-type, .blog .post:first-of-type, .search-results .post:first-of-type { grid-column: span 12; }
}

@media (max-width: 768px) {
  body { font-size: 17px; }
  .inside-header, .inside-navigation, .po-wrap, .inside-site-info,
  .archive .site-main, .blog .site-main, .search-results .site-main,
  .single .site-main, .page .site-main, .error404 .site-main { width: min(calc(100% - 32px), var(--content-wide)); }
  .inside-header { padding: 22px 0 18px; }
  .inside-navigation { min-height: 52px; }
  .main-navigation .main-nav > ul > li > a { margin-right: 0; padding-right: 12px; }
  .po-hero { display: flex; flex-direction: column; min-height: auto; padding: 40px 0 48px; gap: 40px; align-items: stretch; }
  .po-hero::before { opacity: 0.3; }
  .po-hero-copy { padding-top: 0; }
  .po-kicker { margin-bottom: 24px; }
  .po-hero-title { font-size: clamp(54px, 17vw, 90px); line-height: 0.93; }
  .po-hero-title span:last-child { margin-left: 0.18em; }
  .po-hero-lead { margin-top: 30px; font-size: 21px; }
  .po-hero-visual { width: 82%; margin-left: auto; }
  .po-section { padding: 56px 0; }
  .po-section-heading, .po-paths, .po-articles, .po-note { display: block; }
  .po-section-heading h2 { margin-bottom: 20px; }
  .po-section-heading p { max-width: 56ch; }
  .po-path, .po-path:nth-child(2) { margin: 0 0 36px; }
  .po-card, .po-card:first-child, .po-card:nth-child(2) { margin: 0 0 44px; padding-top: 0; }
  .po-card:first-child .po-card-image img { aspect-ratio: 4 / 3; }
  .po-note h2 { margin-bottom: 28px; }
  .po-note-body { font-size: 19px; }
  .archive .page-header, .blog .page-header, .search-results .page-header { grid-column: 1 / -1; }
  .archive .site-main, .blog .site-main, .search-results .site-main,
  .single .site-main, .page .site-main { padding: 44px 0 64px; }
  .entry-content { font-size: 18px; }
  .entry-content table { display: block; overflow-x: auto; }
  .copyright-bar { flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  html { color-scheme: dark; }
  :root {
    --surface: var(--po-night-950);
    --surface-alt: var(--po-forest-800);
    --ink: var(--po-night-50);
    --ink-strong: var(--po-sand-100);
    --accent: var(--po-coral-400);
    --line: color-mix(in oklch, var(--ink) 26%, transparent);
  }
  img { filter: brightness(0.86) contrast(1.08); }
}

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