/*
Theme Name: SDPARTY Editorial
Theme URI: https://www.sdparty.net/
Author: SDPARTY
Description: Современная журнальная тема для молодежного портала SDPARTY.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sdparty
*/

:root {
  --ink: #481321;
  --wine: #7b1834;
  --accent: #f25138;
  --peach: #f6cdbf;
  --cream: #fff7ef;
  --paper: #fffdf9;
  --muted: #7b6966;
  --line: rgba(72, 19, 33, .17);
  --radius: 24px;
  --shadow: 0 18px 50px rgba(72, 19, 33, .12);
  --wrap: min(1380px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, Arial, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.site-wrap { overflow: hidden; }
.container { width: var(--wrap); margin-inline: auto; }
.section { padding: 78px 0; }
.section--paper { background: var(--paper); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-title { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 4.4rem); line-height: .98; letter-spacing: -.045em; }
.section-link { padding-bottom: 5px; border-bottom: 2px solid var(--accent); font-weight: 800; white-space: nowrap; }

.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,247,239,.94); backdrop-filter: blur(12px); }
.header-row { min-height: 86px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 4vw, 72px); }
.brand { grid-column: 1; grid-row: 1; justify-self: start; font-family: Georgia, serif; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; font-style: italic; letter-spacing: -.08em; transform: rotate(-2deg); white-space: nowrap; }
.brand .custom-logo { width: auto; max-height: 58px; }
.site-nav { grid-column: 2; grid-row: 1; justify-self: center; min-width: 0; }
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 1.5vw, 25px); margin: 0; padding: 0; list-style: none; }
.site-nav li { white-space: nowrap; }
.site-nav a { font-size: clamp(.78rem, .78vw, .9rem); font-weight: 750; }
.header-tools { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }
.lang-switch a { min-width: 45px; padding: 8px 11px; border-radius: 99px; text-align: center; font-size: .76rem; font-weight: 900; letter-spacing: .06em; }
.lang-switch a.is-active { color: #fff; background: var(--accent); }
.icon-button { width: 43px; height: 43px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.menu-toggle { display: none; }
.youth-strip { color: #fff; background: var(--ink); overflow: hidden; }
.youth-strip__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.youth-strip__track { min-width: 0; overflow: hidden; white-space: nowrap; color: rgba(255,255,255,.76); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.youth-strip__track span { display: inline-block; animation: sdparty-marquee 22s linear infinite; }
.youth-strip__cta { flex: 0 0 auto; padding: 5px 12px; border-radius: 99px; color: var(--ink); background: #ffcfbf; font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
@keyframes sdparty-marquee { from { transform: translateX(0); } to { transform: translateX(-35%); } }

.hero { position: relative; padding: 64px 0 52px; background: var(--peach); }
.hero::after { content: ''; position: absolute; inset: auto -8% -150px auto; width: 340px; height: 340px; border: 54px solid rgba(242,81,56,.16); border-radius: 50%; }
.hero-intro { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .45fr); align-items: end; gap: clamp(42px, 7vw, 110px); margin-bottom: 42px; }
.hero-title { max-width: 980px; margin: 0; font-family: Georgia, serif; font-size: clamp(4rem, 6.1vw, 6.65rem); font-weight: 800; line-height: .88; letter-spacing: -.065em; text-wrap: balance; }
.hero-copy { max-width: 370px; margin: 0 0 8px; font-size: 1.08rem; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .9fr); gap: 20px; }
.hero-feature { position: relative; min-height: 530px; overflow: hidden; border-radius: var(--radius); color: #fff; background: var(--wine); box-shadow: var(--shadow); }
.hero-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hero-feature:hover img { transform: scale(1.035); }
.hero-feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(36,6,14,.88) 100%); }
.hero-feature__body { position: absolute; z-index: 2; inset: auto 34px 32px; }
.hero-feature h2 { max-width: 720px; margin: 8px 0 12px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 4.2rem); line-height: .98; letter-spacing: -.04em; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.hero-feature .meta { color: rgba(255,255,255,.75); }
.category-pill { display: inline-block; padding: 7px 11px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hero-stack { display: grid; gap: 20px; }
.mini-feature { min-height: 255px; display: flex; flex-direction: column; justify-content: end; padding: 24px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.mini-feature:nth-child(2) { color: #fff; background: var(--wine); }
.mini-feature h3 { margin: 12px 0; font-family: Georgia, serif; font-size: 1.7rem; line-height: 1.04; }
.mini-feature:nth-child(2) .meta { color: rgba(255,255,255,.68); }

.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; }
.story-card { min-width: 0; display: flex; flex-direction: column; }
.story-card__image { position: relative; display: block; flex: 0 0 auto; aspect-ratio: 4/3; overflow: hidden; border-radius: 18px; background: #ead8cf; }
.story-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.story-card:hover img { transform: scale(1.04); }
.story-card__image .category-pill { position: absolute; left: 14px; bottom: 14px; }
.story-card h3 { margin: 17px 0 10px; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.08; letter-spacing: -.025em; }
.story-card p { color: var(--muted); }

.ranking { color: #fff; background: var(--ink); }
.ranking .eyebrow { color: #ff8b75; }
.ranking-list { counter-reset: rank; border-top: 1px solid rgba(255,255,255,.22); }
.rank-item { counter-increment: rank; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 22px; padding: 25px 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.rank-item::before { content: counter(rank, decimal-leading-zero); color: #ff8b75; font-family: Georgia, serif; font-size: 2rem; font-style: italic; }
.rank-item h3 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.3rem, 2.6vw, 2.5rem); line-height: 1.05; }
.rank-item .meta { color: rgba(255,255,255,.58); justify-content: end; }

.events-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.event-card { min-height: 310px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.event-card:nth-child(2) { background: var(--peach); }
.event-date { font-family: Georgia, serif; font-size: 3rem; font-weight: 800; line-height: .9; }
.event-card h3 { margin: 20px 0 10px; font-family: Georgia, serif; font-size: 1.8rem; line-height: 1.04; }
.event-card p { margin: 0; color: var(--muted); }

.join-card { position: relative; overflow: hidden; min-height: 360px; display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 40px; padding: clamp(32px, 6vw, 74px); border-radius: 34px; color: #fff; background: var(--wine); }
.join-card::after { content: '+'; position: absolute; right: 3%; top: -28%; color: rgba(255,255,255,.08); font: 900 clamp(18rem, 38vw, 38rem)/1 Georgia,serif; transform: rotate(12deg); }
.join-card > * { position: relative; z-index: 1; }
.join-card h2 { max-width: 850px; margin: 0; font-family: Georgia, serif; font-size: clamp(2.6rem, 6vw, 6rem); line-height: .9; letter-spacing: -.055em; }
.join-card__action { align-self: end; }
.join-card__action p { color: rgba(255,255,255,.76); }
.button--light { display: inline-block; color: var(--ink); background: #ffcfbf; }

.newsletter { padding: 50px; border-radius: 32px; color: #fff; background: var(--accent); display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 50px; }
.newsletter h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 5rem); line-height: .9; letter-spacing: -.05em; }
.newsletter p { max-width: 530px; }
.newsletter-form { display: flex; padding: 7px; border-radius: 99px; background: #fff; }
.newsletter-form input { min-width: 0; flex: 1; padding: 11px 18px; border: 0; outline: 0; border-radius: inherit; }
.newsletter-form button, .button { padding: 13px 22px; border: 0; border-radius: 99px; color: #fff; background: var(--ink); font-weight: 850; cursor: pointer; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 50px; padding: 64px 0; }
.page-header { margin-bottom: 34px; }
.page-title, .entry-title { margin: 0; font-family: Georgia, serif; font-size: clamp(2.6rem, 6vw, 5.8rem); line-height: .95; letter-spacing: -.055em; }
.entry-media { margin: 30px 0; overflow: hidden; border-radius: var(--radius); }
.entry-content { font-family: Georgia, serif; font-size: 1.15rem; color: #392a2c; }
.entry-content > * { max-width: 760px; }
.entry-content img, .entry-content .alignwide { max-width: 100%; }
.entry-content a { color: var(--wine); text-decoration: underline; text-decoration-color: var(--accent); }
.entry-content blockquote { margin: 2em 0; padding: 1px 0 1px 26px; border-left: 5px solid var(--accent); color: var(--wine); font-size: 1.35em; }
.pagination { margin-top: 45px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { min-width: 42px; min-height: 42px; display: grid; place-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; }
.pagination .current { color: #fff; background: var(--ink); }
.sidebar .widget { margin-bottom: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.widget-title { margin: 0 0 16px; font-family: Georgia, serif; font-size: 1.4rem; }
.widget ul { margin: 0; padding-left: 18px; }

.site-footer { padding: 62px 0 30px; color: #fff; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.footer-brand { font-family: Georgia, serif; font-size: 2.6rem; font-weight: 900; font-style: italic; }
.site-footer ul { margin: 12px 0 0; padding: 0; list-style: none; }
.site-footer li { margin: 8px 0; }
.footer-bottom { margin-top: 45px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.58); font-size: .82rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .header-row { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; justify-self: start; }
  .header-tools { grid-column: 2; }
  .menu-toggle { display: inline-grid; }
  .site-nav { display: none; grid-column: 1 / -1; position: absolute; inset: 86px 0 auto; padding: 22px 20px; background: var(--cream); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { width: var(--wrap); margin: auto; flex-direction: column; align-items: flex-start; }
  .hero-intro, .newsletter, .join-card { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { grid-template-columns: 1fr 1fr; }
  .stories-grid, .events-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  :root { --wrap: min(100% - 24px, 1180px); --radius: 18px; }
  .section { padding: 54px 0; }
  .hero { padding-top: 42px; }
  .hero-title { font-size: clamp(3.15rem, 17vw, 5.2rem); }
  .hero-grid, .hero-stack, .stories-grid, .events-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-feature { min-height: 430px; }
  .hero-feature__body { inset: auto 22px 22px; }
  .rank-item { grid-template-columns: 48px 1fr; }
  .rank-item .meta { grid-column: 2; justify-content: start; }
  .newsletter { padding: 30px 22px; }
  .newsletter-form { align-items: stretch; flex-direction: column; border-radius: 18px; }
  .section-head { align-items: start; flex-direction: column; }
  .lang-switch a { min-width: 39px; padding: 7px 8px; }
  .youth-strip__inner { width: 100%; padding-left: 12px; }
  .youth-strip__cta { margin-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .youth-strip__track span { animation: none; }
}
