/*
Theme Name: AYS Studio
Theme URI: https://ays.com.ua
Author: AYS — Anton Yakob Studio
Description: Тема для сайту весільної фото- та відеозйомки AYS. Адаптивна, двомовна (Polylang), з портфоліо, калькулятором цін і блогом.
Version: 1.0.3
Requires at least: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: ays
*/

:root {
  --bg: #F2F3EF;
  --surface: #FFFFFF;
  --ink: #1B201D;
  --ink-2: #3E4742;
  --muted: #56605A;
  --line: #D5D9D2;
  --line-2: #C3C9C0;
  --accent: #2E5745;
  --accent-soft: #D7E3DC;
  --radius: 6px;
  --wrap: 1240px;
  --display: 'Tenor Sans', Georgia, serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--surface); color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #24473a; color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242,243,239,.94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark { font-family: var(--display); font-size: 30px; letter-spacing: .06em; line-height: 1; }
.logo__name { font-size: 13px; color: var(--muted); }
.logo img { max-height: 48px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.main-nav .menu-item-type-custom.current-menu-item > a { color: var(--ink); text-decoration: none; }
.main-nav .menu-item-type-custom.current-menu-item > a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 480px) { .logo__name { display: none; } }
.header-tools { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; font-size: 14px; font-weight: 600; }
.lang a { padding: 6px 12px; color: var(--ink); text-decoration: none; text-transform: uppercase; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink); padding: 0; cursor: pointer; }
@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .main-nav a { display: block; padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
}

/* Sections */
.section { padding: 96px 0; }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--ink); color: var(--bg); }
.section--accent { background: var(--accent); color: #fff; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 40px; }
.section-head h2, .h2 { font-size: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--muted); max-width: 420px; }
.link-strong { font-weight: 600; }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(36px, 5vw, 66px); line-height: 1.08; letter-spacing: -.01em; }
.hero__body { display: flex; flex-direction: column; gap: 28px; }
.hero__lead { font-size: 19px; color: var(--ink-2); max-width: 520px; }
.hero__note { font-size: 15px; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 300px 220px; gap: 14px; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.collage img:first-child { grid-column: 1 / 3; }
@media (max-width: 640px) { .hero { padding-top: 40px; padding-bottom: 56px; gap: 36px; } .collage { grid-template-rows: 200px 140px; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 40px; }
.features h3 { font-size: 23px; margin-bottom: 10px; }
.features p { color: var(--ink-2); font-size: 16px; }

/* Portfolio grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 28px 20px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.card img, .card__ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.card__ph { background: #E6E9E3; border: 1px dashed #9AA39C; }
.card__title { font-family: var(--display); font-size: 22px; }
.card:hover .card__title { color: var(--accent); }

/* Головна: 7 рубрик — перша картка ширша, щоб ряди були рівними */
@media (min-width: 1180px) {
  .cards--home .card:first-child:nth-last-child(7) { grid-column: span 2; }
  .cards--home .card:first-child:nth-last-child(7) img { aspect-ratio: 2.72 / 1; }
}

/* Video */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; align-items: center; }
.split__text { display: flex; flex-direction: column; gap: 20px; }
.section--dark .split__text p { color: #C9CFC9; }
.section--dark a { color: var(--bg); }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 999px; background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }

/* Prices */
.price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.price-card--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.price-card__label { font-weight: 600; font-size: 18px; font-family: var(--body); }
.price-card__value { font-family: var(--display); font-size: clamp(38px, 4vw, 48px); line-height: 1.1; }
.price-card__unit { color: var(--muted); font-size: 15px; display: block; }
.price-card--accent .price-card__unit { color: var(--accent-soft); }
.price-card__foot { padding-top: 14px; border-top: 1px solid #E1E4DE; font-size: 16px; }
.price-card--accent .price-card__foot { border-color: #4F7564; color: #E6EEE9; }

.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; align-items: start; }
.calc__controls { display: flex; flex-direction: column; gap: 28px; }
.calc__label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button { width: 52px; height: 52px; border-radius: 999px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 24px; cursor: pointer; }
.stepper output { font-family: var(--display); font-size: 40px; min-width: 150px; text-align: center; }
.calc__hint { font-size: 14px; color: var(--muted); margin-top: 8px; }
.calc__result { background: var(--bg); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.calc__total { font-family: var(--display); font-size: clamp(44px, 5vw, 64px); line-height: 1; }
.calc__break { white-space: pre-line; color: var(--ink-2); }

.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px; }
.cols3 h2 { font-size: 26px; margin-bottom: 14px; }
.cols3 ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }

/* Cities */
.cities { font-family: var(--display); font-size: clamp(24px, 3vw, 36px); line-height: 1.45; word-spacing: .35em; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px 20px; }
.post-card { border-top: 2px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.post-card img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.post-card__cat { font-size: 14px; color: var(--muted); }
.post-card__title { font-family: var(--display); font-size: 24px; line-height: 1.25; }
.post-card:hover .post-card__title { color: var(--accent); }
.post-card__ex { font-size: 16px; color: var(--ink-2); }
.pagination { margin-top: 48px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Single / page content */
.page-head { padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.page-head h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.08; }
.page-head__lead { font-size: 19px; color: var(--ink-2); max-width: 640px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.entry { max-width: 760px; margin: 0 auto; padding-bottom: 96px; font-size: 18px; line-height: 1.75; }
.entry--wide { max-width: var(--wrap); }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 1.8em; }
.entry h3 { font-size: 24px; margin-top: 1.5em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li + li { margin-top: .35em; }
.entry img { border-radius: 4px; }
.entry figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.entry blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid var(--accent); font-family: var(--display); font-size: 22px; }
.entry .wp-block-gallery { gap: 12px !important; }
.entry .wp-block-gallery .wp-block-image img { border-radius: 2px; }
.entry--wide .wp-block-gallery { margin-left: 0; margin-right: 0; }
.post-meta { font-size: 15px; color: var(--muted); }
.post-cta { margin-top: 56px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; align-items: start; }
.post-cta h2 { font-size: 28px; margin: 0; }

/* Contacts */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 56px; }
.contact__info { display: flex; flex-direction: column; gap: 22px; }
.contact__info p { color: var(--accent-soft); }
.contact__links { display: flex; flex-direction: column; gap: 8px; font-size: 18px; }
.contact__links a { color: #fff; }
.contact__phone { font-weight: 600; text-decoration: none; }
.form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
.form textarea { resize: vertical; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; }
.form__hp { position: absolute; left: -9999px; }
.form__msg { padding: 12px 14px; border-radius: 4px; font-size: 15px; }
.form__msg--ok { background: #E3EFE7; color: #1E4433; }
.form__msg--err { background: #F7E4E0; color: #7A2617; }

/* Footer */
.site-footer { padding: 32px 0; font-size: 14px; color: var(--muted); }
.site-footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--ink); }

/* Notice for 18+ portfolio */
.notice-18 { max-width: 560px; margin: 0 auto 96px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 16px; align-items: start; }
