/*!
Theme Name: poet
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: poet
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ------------------------------
0) Modern CSS Reset
------------------------------ */
*,*::before,*::after{box-sizing:border-box}
html:focus-within{scroll-behavior:smooth}
html,body{height:100%}
body,h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd{margin:0}
ul[role='list'],ol[role='list']{list-style:none}
img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}
input,button,textarea,select{font:inherit;color:inherit}
:where(button){background:none;border:0;padding:0}
@media (prefers-reduced-motion: reduce){html:focus-within{scroll-behavior:auto}*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}


/* ------------------------------
1) Design Tokens
------------------------------ */
:root{
/* Color system */
--bg: #ffffff;
--surface: #f7f8fa;
--elev: #ffffff;
--text: #111111;
--muted: #5f6368;
--link: #0b57d0; /* close to Apple blue but more neutral */
--hairline: rgba(0,0,0,.08);
--focus: #2684ff;


/* Radii, shadows, borders */
--radius: 16px;
--radius-sm: 12px;
--shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.04);
--shadow: 0 8px 24px rgba(0,0,0,.08);
--border: 1px solid var(--hairline);


/* Typography */
--font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
--leading: 1.6;
--tracking: -0.01em;


/* Spacing scale */
--s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
--s-7: 32px; --s-8: 40px; --s-9: 48px; --s-10: 64px; --s-11: 80px; --s-12: 96px;


/* Container */
--container: 1200px;
}


@media (prefers-color-scheme: dark){
:root{
--bg: #0b0b0d;
--surface: #0f1115;
--elev: #151821;
--text: #f5f5f7;
--muted: #c2c2c7;
--link: #3b82f6;
--hairline: rgba(255,255,255,.12);
--shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 1px 1px rgba(0,0,0,.35);
--shadow: 0 20px 60px rgba(0,0,0,.55);
}
}


/* ------------------------------
2) Base & Typography
------------------------------ */
html{color-scheme: light dark}
body{
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
line-height: var(--leading);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}


/* Fluid type scale */
h1{font-weight:700;letter-spacing:var(--tracking);line-height:1.1;font-size:clamp(32px,4.2vw,56px)}
h2{font-weight:700;letter-spacing:var(--tracking);line-height:1.15;font-size:clamp(28px,3.2vw,40px)}
h3{font-weight:600;letter-spacing:var(--tracking);line-height:1.2;font-size:clamp(22px,2.2vw,28px)}
h4{font-weight:600;letter-spacing:var(--tracking);line-height:1.25;font-size:20px}
h5{font-weight:600;letter-spacing:var(--tracking);line-height:1.3;font-size:18px}
h6{font-weight:600;letter-spacing:var(--tracking);line-height:1.35;font-size:16px}


p{color:var(--text);font-size:clamp(16px,1.2vw,18px)}
.small,small{font-size:14px;color:var(--muted)}


a{color:var(--link);text-decoration:none;-webkit-tap-highlight-color:transparent}
/* End */

/* ---------- Базовые переменные ---------- */
:root {
  --container: 1200px;
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --link: #0071e3;
  --hairline: rgba(0,0,0,.1);

  --radius: 16px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.05);
  --shadow: 0 12px 24px rgba(0,0,0,.08);

  --s-2: 8px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 48px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Контейнер ---------- */
.site-main, .site-header .site-branding, .site-footer .site-info, .widget-area {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
  z-index: 10;
}
.site-header .site-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) 0;
}
.site-title { font-weight: 700; font-size: 20px; }
.site-description { color: var(--muted); font-size: 14px; }

/* ---------- Меню ---------- */
.main-navigation ul {
  display: flex;
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation a {
  display: block;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}
.main-navigation a:hover {
  background: #f5f5f7;
}
.main-navigation .current-menu-item > a {
  background: #f0f0f2;
  box-shadow: var(--shadow-sm);
}
/* Мобильное меню */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: #fff;
  }
  .main-navigation ul { display: none; }
  .main-navigation.toggled ul {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: absolute;
    right: var(--s-6);
    top: 100%;
    margin-top: var(--s-2);
    padding: var(--s-4);
  }
  .main-navigation a { padding: 10px 12px; }
}

/* ---------- Посты ---------- */
.hentry, .post, .page {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
  margin: 0 auto var(--s-8);
}
.entry-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--s-4);
}
.entry-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--s-4);
}
.entry-content > * + * { margin-top: var(--s-4); }

/* ---------- Виджеты ---------- */
.widget {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
  margin-bottom: var(--s-6);
}
.widget-title {
  font-weight: 600;
  margin-bottom: var(--s-4);
}

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: auto;
  background: #fafafa;
}
.site-footer .site-info {
  display: flex;
  justify-content: space-between;
  padding: var(--s-6) 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Кнопки и ссылки ---------- */
button, .button, input[type="submit"] {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg,#fff,#f5f5f7);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}
button:hover, .button:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
a { color: var(--link); }
a:hover { text-decoration: underline; }

/* ---------- Сетка ---------- */
.grid {
  display: grid;
  gap: var(--s-6);
}
.grid.cols-2 { grid-template-columns: repeat(2,1fr); }
.grid.cols-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
