/*
Theme Name: Rimgaile
Theme URI: https://example.com/rimgaile
Author: Rimgaile
Description: Минималистичная тема-визитка для фотографа. Спокойная бежевая палитра, крупные фотографии, только необходимое.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rimgaile
Tags: photography, portfolio, minimal, one-column, custom-menu, featured-images, block-styles
*/

:root {
  --bg: #faf7f1;
  --bg-alt: #f1e9dc;
  --soft: #e3d3b8;
  --mid: #c9b08c;
  --accent: #8c7554;
  --ink: #3b352d;
  --muted: #7a7266;
  --line: #e2d8c6;
  --sage: #9ca48b;
  --wrap: 1120px;
  --gap: clamp(1.25rem, 4vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 2px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; }
.btn-solid { background: var(--accent); color: #fdfbf7; }
.btn-solid:hover { background: #75613f; }
.btn-outline { border: 1px solid var(--mid); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fdfbf7; border-color: var(--accent); }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.site-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem; letter-spacing: 0.04em; color: var(--ink);
}
.site-title:hover { text-decoration: none; color: var(--accent); }
.custom-logo { max-height: 52px; width: auto; }

.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); font-size: 0.95rem; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav .current-menu-item > a { color: var(--accent); }

.header-cta { white-space: nowrap; }

/* Главная: обложка */
.hero {
  position: relative;
  min-height: clamp(60vh, 72vh, 82vh);
  display: flex; align-items: flex-end;
  background: var(--bg-alt) center/cover no-repeat;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero--image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(59,53,45,0) 30%, rgba(59,53,45,0.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 16ch; }
.hero--image h1, .hero--image .hero-sub { color: #fdfbf7; }
.hero-sub { max-width: 46ch; font-size: 1.1rem; color: var(--muted); margin-bottom: 1.5rem; }
.hero--image .eyebrow { color: rgba(253,251,247,0.85); }
.directions { margin-top: 1.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: inherit; }
.hero--image .directions { color: #f0e9dd; }

/* Галерея */
.grid {
  display: grid; gap: clamp(0.75rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.grid--two { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.tile { position: relative; overflow: hidden; background: var(--soft); }
.tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile figcaption {
  padding: 0.75rem 0.15rem 0; font-size: 0.9rem; color: var(--muted);
}

.gallery-title { margin-bottom: 2.5rem; }
.gallery-group { margin-bottom: 3.5rem; }
.gallery-group h2 { font-size: 1.6rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }

/* Секция-приглашение */
.cta-band { text-align: center; }
.cta-band p { max-width: 46ch; margin-inline: auto; color: var(--muted); }

/* Контакты */
.contacts { display: grid; gap: clamp(2rem, 6vw, 4rem); grid-template-columns: 1fr 1.1fr; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.contact-list .label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 0.2rem; }
.socials { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 0.4rem; }
.form-row label { font-size: 0.85rem; color: var(--muted); }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.8rem 0.9rem;
  border: 1px solid var(--line); border-radius: 2px;
  background: #fff; color: var(--ink); font: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 2px solid var(--soft); border-color: var(--mid);
}
.form-consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.form-consent input { width: auto; margin-top: 0.25rem; }
.form .btn { justify-self: start; }
.form-note { padding: 0.85rem 1rem; border-radius: 2px; font-size: 0.9rem; }
.form-note--ok { background: #eef1e6; color: #4c5738; }
.form-note--err { background: #f6ece6; color: #8a4b3a; }

/* Подвал */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1.2fr 1fr 1fr; }
.footer-inner h3 { font-size: 1rem; letter-spacing: 0.02em; }
.footer-inner p, .footer-inner a { color: var(--muted); font-size: 0.92rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.82rem; color: var(--muted);
}

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(38, 34, 28, 0.92); padding: 4vw;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: 0; color: #fdfbf7; font-size: 2rem; line-height: 1; cursor: pointer;
}

.wp-block-image img, .entry-content img { border-radius: 2px; }
.entry-content { max-width: 70ch; }

/* Адаптив */
@media (max-width: 820px) {
  .contacts { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; min-height: auto; padding-block: 0.75rem; }
  .site-nav { order: 3; width: 100%; }
  .site-nav ul { gap: 1.25rem; }
  .header-cta { margin-left: auto; }
  .footer-bottom { flex-direction: column; }
}
