/*
Theme Name: РУБИДОЗ
Author: РУБИДОЗ
Description: Светлая корпоративная тема для ООО «РУБИДОЗ».
Version: 1.3.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rubidoz
*/

:root {
  --ink: #173348;
  --text: #405b6d;
  --muted: #6f8796;
  --blue: #175c87;
  --blue-dark: #104b71;
  --line: #d4e2e9;
  --light: #f2f7f9;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { color: var(--white); background: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 100; top: -80px; left: 12px; padding: 10px 14px; background: var(--white); }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; min-height: 86px; }
.brand { display: inline-flex; align-items: center; gap: 13px; flex: none; color: #123e5b; font-size: 22px; font-weight: 700; letter-spacing: .035em; line-height: 1; }
.brand-mark { display: block; width: 4px; height: 29px; background: var(--blue); }
.brand .custom-logo { width: auto; max-width: 220px; max-height: 58px; }
.header-nav { display: flex; align-items: center; gap: 28px; color: var(--text); font-size: 13px; }
.header-nav a:hover, .footer-nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 5px; }
.header-contact { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 0 17px; border: 1px solid var(--blue); color: var(--blue); font-size: 13px; font-weight: 700; white-space: nowrap; }
.header-contact:hover { background: var(--blue); color: var(--white); }
.header-contact svg, .button svg, .text-link svg { width: 17px; height: 17px; flex: none; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 43px; height: 43px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.menu-toggle svg { width: 22px; height: 22px; }

/* Common typography and controls */
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.13; }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 52px; padding: 0 23px; border: 1px solid var(--blue); background: var(--blue); color: var(--white); font-size: 14px; font-weight: 700; }
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--blue); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.text-link:hover { color: var(--blue-dark); }

/* Intro: the original science illustration is retained here. */
.hero { --blue: #1365a6; --ink: #102b46; position: relative; overflow: hidden; border-bottom: 0; background: linear-gradient(125deg, #fff 34%, #eff9fe 100%); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.hero::before { content: ""; position: absolute; right: -9%; bottom: -270px; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, #b9e7f4 0, rgba(185,231,244,0) 68%); opacity: .55; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(400px, .97fr); align-items: center; gap: 35px; min-height: 620px; padding-top: 80px; padding-bottom: 90px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 24px; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.hero .eyebrow::before { content: ""; width: 24px; height: 2px; background: #3fa6d9; }
.hero h1 { max-width: 710px; margin-bottom: 26px; font-size: clamp(42px, 5vw, 70px); font-weight: 750; letter-spacing: -.035em; }
.hero h1 span { color: var(--blue); }
.hero-lead { max-width: 570px; margin-bottom: 33px; color: #526e84; font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero .button { min-height: 54px; padding-inline: 24px; border-radius: 12px; }
.hero .text-link { color: #074b86; text-decoration: none; }
.hero .text-link:hover { color: #0b7db6; }
.hero-note { display: flex; align-items: center; gap: 10px; margin: 62px 0 0; color: #7790a0; font-size: 13px; }
.hero-note::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: #51b7df; box-shadow: 0 0 0 5px #dcf3fb; }
.science-stage { position: relative; display: grid; place-items: center; min-height: 470px; }
.science-stage::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, #d9f3fb 0%, #ecf9fd 42%, rgba(255,255,255,0) 73%); }
.orbit { position: absolute; border: 1px solid rgba(74,157,198,.28); border-radius: 50%; }
.orbit-one { width: 395px; height: 395px; }
.orbit-two { width: 275px; height: 275px; border-style: dashed; }
.orbit-three { width: 150px; height: 150px; background: #fff; box-shadow: 0 17px 60px rgba(27,117,167,.14); }
.orbit-one::before, .orbit-two::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #64c1e7; box-shadow: 0 0 0 7px #e8f8fc; }
.orbit-one::before { top: 28px; left: 80px; }
.orbit-two::after { right: 44px; bottom: 9px; background: #1c83bd; }
.core { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 133px; height: 133px; color: #074b86; text-align: center; }
.core svg { width: 36px; height: 36px; margin-bottom: 8px; }
.core strong { font-size: 12px; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; }
.element { position: absolute; z-index: 3; display: flex; flex-direction: column; width: 112px; height: 112px; padding: 13px 16px; border: 1px solid #d9edf7; border-radius: 17px; background: #fff; box-shadow: 0 22px 55px rgba(32,91,134,.10); }
.element small { color: #7b9cb1; font-size: 11px; line-height: 1; }
.element strong { color: var(--blue); font-size: 43px; font-weight: 650; letter-spacing: -.08em; line-height: 1.05; }
.element span { margin-top: auto; color: #58768b; font-size: 10px; line-height: 1; }
.element-rb { top: 47px; right: 55px; transform: rotate(5deg); }
.element-cs { bottom: 50px; left: 38px; transform: rotate(-6deg); }
.stage-tag { position: absolute; z-index: 3; top: 117px; left: 10px; padding: 10px 14px; border: 1px solid #d9ebf3; border-radius: 999px; background: #fff; color: #5e7c91; box-shadow: 0 10px 30px rgba(36,112,156,.07); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.hero-bottom { position: relative; border-top: 1px solid #e2f0f7; background: rgba(255,255,255,.6); }
.hero-bottom-inner { display: flex; align-items: center; gap: 35px; min-height: 80px; color: #6a8193; font-size: 13px; }
.hero-bottom-inner strong { color: #1b628e; font-weight: 750; }
.hero-bottom-inner span { display: flex; align-items: center; gap: 10px; }
.hero-bottom-inner span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #65c0e0; }

/* About */
.section { padding: 105px 0; }
.section h2 { margin-bottom: 25px; font-size: clamp(33px, 3.3vw, 44px); font-weight: 700; letter-spacing: -.035em; }
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; align-items: start; gap: clamp(55px, 9vw, 145px); }
.about-copy p:not(.section-kicker) { max-width: 495px; margin-bottom: 26px; color: var(--text); font-size: 16px; line-height: 1.78; }
.about-facts { border-top: 2px solid var(--blue); }
.about-facts > div { display: grid; grid-template-columns: 155px 1fr; gap: 25px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.about-facts span { color: var(--muted); font-size: 13px; }
.about-facts p { margin: 0; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.45; }

/* Directions */
.directions { background: #f7fafb; }
.directions-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.directions-head h2 { margin-bottom: 0; }
.directions-head p { max-width: 375px; margin: 0; color: var(--muted); font-size: 14px; }
.direction-list { border-top: 2px solid var(--blue); }
.direction-row { display: grid; grid-template-columns: 58px 90px minmax(150px, .8fr) minmax(230px, 1.5fr); align-items: center; gap: 25px; min-height: 126px; border-bottom: 1px solid var(--line); }
.direction-index { color: var(--muted); font-family: "Courier New", Courier, monospace; font-size: 12px; }
.direction-symbol { color: var(--blue); font-size: 43px; font-weight: 400; letter-spacing: -.07em; line-height: 1; }
.direction-row h3 { margin: 0; font-size: 21px; font-weight: 700; }
.direction-row p { max-width: 390px; margin: 0; color: var(--text); font-size: 14px; line-height: 1.6; }

/* Grant acknowledgment */
.fund-section { padding: 100px 0; }
.fund-wrap { display: grid; grid-template-columns: 225px 1fr; gap: 70px; align-items: start; padding: 40px 0; border-top: 2px solid var(--blue); border-bottom: 1px solid var(--line); }
.fund-logo { display: flex; align-items: center; min-height: 115px; }
.fund-logo img { width: 190px; height: auto; max-height: 98px; object-fit: contain; }
.fund-copy .section-kicker { margin-bottom: 12px; }
.fund-copy h2 { margin-bottom: 15px; font-size: 27px; letter-spacing: -.025em; }
.fund-copy p { max-width: 730px; margin-bottom: 18px; color: var(--text); font-size: 14px; line-height: 1.75; }

/* Contact */
.contact-section { padding: 85px 0 105px; background: var(--light); }
.contact-shell { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(45px, 8vw, 115px); }
.contact-copy h2 { margin-bottom: 18px; font-size: clamp(34px, 3.4vw, 45px); letter-spacing: -.035em; }
.contact-copy > p:not(.section-kicker) { max-width: 380px; color: var(--text); font-size: 15px; line-height: 1.75; }
.contact-person { margin-top: 55px; padding-top: 22px; border-top: 1px solid #b8ccd8; }
.contact-person span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.contact-person strong { display: block; margin-bottom: 7px; font-size: 17px; }
.contact-email { color: var(--blue); font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.contact-form { padding: 34px; border: 1px solid var(--line); background: var(--white); }
.contact-form h3 { margin-bottom: 27px; font-size: 22px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 17px; }
.field span { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
.field input, .field textarea { display: block; width: 100%; padding: 12px 13px; border: 1px solid #c5d6df; border-radius: 0; background: var(--white); color: var(--ink); font-size: 14px; line-height: 1.45; outline: none; }
.field input { height: 46px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.field input::placeholder, .field textarea::placeholder { color: #97aab5; }
.form-consent { display: flex; align-items: start; gap: 9px; margin: 2px 0 23px; color: var(--text); font-size: 13px; line-height: 1.55; }
.form-consent input { margin: 2px 0 0; accent-color: var(--blue); }
.form-consent a { text-decoration: underline; }
.form-privacy { margin: -10px 0 23px; color: var(--text); font-size: 13px; line-height: 1.55; }
.form-privacy a { text-decoration: underline; }
.contact-unavailable { min-height: 230px; }
.contact-unavailable p { max-width: 410px; color: var(--text); font-size: 14px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.form-row .button { min-height: 46px; padding-inline: 18px; }
.form-hint { max-width: 165px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.form-message { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid; font-size: 13px; line-height: 1.5; }
.form-message.success { border-color: #35825b; background: #edf6f0; color: #276845; }
.form-message.error { border-color: #b04c45; background: #fff2f0; color: #9b3b35; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Footer and inner pages */
.site-footer { background: var(--white); }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 115px; }
.footer-main .brand { font-size: 19px; }
.footer-main .brand-mark { height: 25px; }
.footer-nav { display: flex; gap: 26px; color: var(--text); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-bottom a:hover { color: var(--blue); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.inner-page { min-height: 55vh; padding: 90px 0; }
.inner-page .entry-content { max-width: 780px; color: var(--text); }
.inner-page h1 { font-size: clamp(36px, 4vw, 55px); }
.inner-page .entry-content a { color: var(--blue); text-decoration: underline; }
.legal-page .entry-content { max-width: 850px; }
.legal-page .entry-content h2 { margin: 35px 0 12px; color: var(--ink); font-size: 22px; line-height: 1.3; }
.legal-page .entry-content p { margin-bottom: 18px; font-size: 15px; line-height: 1.8; }
.legal-version { margin: -8px 0 35px; color: var(--muted); font-size: 13px; }
.post-card { padding: 25px 0; border-bottom: 1px solid var(--line); }
.post-card h2 { font-size: 26px; }
.post-card a:hover { color: var(--blue); }

@media (max-width: 1040px) {
  .header-nav { gap: 16px; }
  .header-contact { display: none; }
  .hero-grid { grid-template-columns: 1fr .8fr; }
  .science-stage { transform: scale(.86); transform-origin: center; }
  .contact-shell { gap: 50px; }
}

@media (max-width: 800px) {
  .container { width: min(680px, calc(100% - 40px)); }
  .header-inner { min-height: 72px; }
  .menu-toggle { display: flex; margin-left: auto; }
  .header-nav { display: none; position: absolute; z-index: 10; top: 72px; left: 0; right: 0; padding: 18px 20px 22px; border-bottom: 1px solid var(--line); background: var(--white); }
  .header-nav.is-open { display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
  .about-grid, .contact-shell { grid-template-columns: 1fr; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding-top: 72px; padding-bottom: 28px; }
  .hero h1 { font-size: clamp(40px, 7.3vw, 63px); }
  .hero-note { margin-top: 35px; }
  .science-stage { height: 375px; min-height: 375px; margin: -5px 0 -15px; transform: scale(.78); }
  .hero-bottom-inner { flex-wrap: wrap; gap: 8px 24px; min-height: 0; padding: 19px 0; }
  .section { padding: 75px 0; }
  .about-grid { gap: 45px; }
  .direction-row { grid-template-columns: 35px 68px minmax(135px, .9fr) minmax(190px, 1.1fr); gap: 14px; }
  .fund-wrap { grid-template-columns: 180px 1fr; gap: 35px; }
  .contact-section { padding: 75px 0; }
  .contact-shell { gap: 38px; }
  .contact-person { margin-top: 30px; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .brand { font-size: 19px; }
  .brand-mark { height: 25px; }
  .hero-grid { padding-top: 54px; }
  .hero h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { gap: 17px; }
  .hero-note { font-size: 12px; }
  .science-stage { height: 330px; min-height: 330px; margin: -17px -50px; transform: scale(.69); }
  .hero-bottom-inner { font-size: 11px; }
  .hero-bottom-inner strong { width: 100%; }
  .section h2 { font-size: 34px; }
  .about-facts > div { grid-template-columns: 1fr; gap: 6px; padding-block: 20px; }
  .directions-head { display: block; }
  .directions-head p { margin-top: 13px; }
  .direction-row { grid-template-columns: 32px 60px 1fr; gap: 11px; padding: 22px 0; }
  .direction-row h3 { font-size: 19px; }
  .direction-row p { grid-column: 3; font-size: 13px; }
  .direction-symbol { font-size: 38px; }
  .fund-section { padding: 75px 0; }
  .fund-wrap { grid-template-columns: 1fr; gap: 20px; padding-block: 32px; }
  .fund-logo { min-height: auto; }
  .fund-copy h2 { font-size: 24px; }
  .contact-form { padding: 25px 20px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .form-row { align-items: start; flex-direction: column; }
  .form-hint { max-width: none; }
  .footer-main { align-items: start; flex-direction: column; justify-content: center; gap: 20px; padding-block: 28px; }
  .footer-nav, .footer-bottom { flex-wrap: wrap; }
  .footer-nav { gap: 12px 18px; }
  .footer-bottom { gap: 7px; }
  .inner-page { padding: 65px 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
