:root {
  --blue: #207bff;
  --blue-dark: #1771f1;
  --blue-light: #8abaff;
  --blue-soft: #eaf2ff;
  --accent: #ff8562;
  --black: #000;
  --text: #1a1a1a;
  --muted: #737373;
  --gray: #ebebeb;
  --bg-soft: #fafafa;
  --white: #fff;
  --r: 30px;
  --r-sm: 15px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', Arial, sans-serif; color: var(--text); background: var(--white); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--black); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 70px 0; scroll-margin-top: 70px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); margin-bottom: 14px; }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 16px; padding: 14px 28px; border-radius: var(--r); background: var(--blue); color: var(--white); text-decoration: none; transition: background .2s, transform .1s; }
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { background: var(--blue-soft); }
.btn-ghost { background: var(--gray); color: var(--black); }
.btn-ghost:hover { background: #dcdcdc; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray); }
.header .container { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 40px; height: 40px; }
.logo b { display: block; font-size: 18px; color: var(--black); line-height: 1.1; }
.logo small { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--blue); }
.burger { display: none; margin-left: auto; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; font-size: 24px; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: 1px solid var(--gray); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .burger { display: block; }
  .header .btn { display: none; }
}

/* hero */
.hero { padding: 30px 0 0; }
.hero-box { position: relative; overflow: hidden; background: var(--blue); color: var(--white); border-radius: var(--r); padding: clamp(36px, 7vw, 90px) clamp(24px, 6vw, 70px); }
.hero-box h1 { color: var(--white); max-width: 780px; }
.hero-box p { font-size: clamp(17px, 2vw, 21px); max-width: 600px; opacity: .92; margin: 22px 0 34px; }
.hero-box .badge { display: inline-block; background: rgba(255,255,255,.18); padding: 8px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.hero-flower { position: absolute; right: -60px; bottom: -80px; width: 420px; height: 420px; opacity: .16; filter: brightness(0) invert(1); pointer-events: none; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.18); color: var(--white); }
@media (max-width: 600px) { .hero-flower { width: 260px; height: 260px; } }

/* catalog */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.search { position: relative; width: min(420px, 100%); }
.search input { width: 100%; padding: 15px 20px 15px 48px; border-radius: var(--r); border: 1px solid var(--gray); background: var(--bg-soft); font: inherit; }
.search input:focus { outline: 2px solid var(--blue-light); border-color: transparent; }
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--bg-soft); border: 1px solid var(--gray); border-radius: var(--r); padding: 14px 14px 20px; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 30px rgba(32,123,255,.12); transform: translateY(-2px); }
.card .photo { aspect-ratio: 1; border-radius: 22px; margin-bottom: 16px; }
.card h3 { font-size: 18px; margin: 0 6px 6px; }
.card .pos { font-size: 14px; color: var(--text); margin: 0 6px 4px; }
.card .dept { color: var(--muted); font-size: 14px; margin: 0 6px 4px; flex: 1; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; width: min(720px, 100%); }
.filters .search { flex: 1 1 280px; }
.filters select { flex: 1 1 240px; min-width: 0; padding: 15px 20px; border-radius: var(--r); border: 1px solid var(--gray); background: var(--bg-soft); font: inherit; }
.found { color: var(--muted); font-size: 14px; margin: -18px 0 18px; }
.card .yrs { font-size: 13px; color: var(--blue); font-weight: 500; margin: 0 6px 14px; }
.card .btn { margin: 0 6px; }
.card.featured { background: var(--blue-soft); border-color: var(--blue-light); }
.tag { display: inline-block; align-self: flex-start; background: var(--accent); color: var(--white); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: var(--r); margin: 0 6px 10px; }
.photo { background: var(--blue-light) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--white); font-weight: 700; font-size: 56px; overflow: hidden; }
.empty { text-align: center; padding: 50px 0; color: var(--muted); }
.more { text-align: center; margin-top: 30px; }

/* request */
.request { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; background: var(--bg-soft); border-radius: var(--r); padding: clamp(28px, 5vw, 60px); }
.request h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
@media (max-width: 800px) { .request { grid-template-columns: 1fr; } }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 14px 18px; border-radius: var(--r-sm); border: 1px solid var(--gray); background: var(--white); font: inherit; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue-light); border-color: transparent; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--blue); }
.err { color: #d93025; font-size: 14px; min-height: 20px; margin: 4px 0 10px; }
.ok-msg { background: var(--blue-soft); color: var(--blue-dark); border-radius: var(--r-sm); padding: 18px; font-weight: 500; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* faq */
.faq { margin-top: 34px; display: grid; gap: 12px; }
.faq details { background: var(--bg-soft); border: 1px solid var(--gray); border-radius: 22px; padding: 0 26px; }
.faq summary { cursor: pointer; list-style: none; padding: 22px 30px 22px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 400; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--muted); }

/* footer */
.footer { background: var(--blue); color: var(--white); border-radius: var(--r) var(--r) 0 0; padding: 56px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; opacity: .7; }
.footer a { display: block; text-decoration: none; margin-bottom: 8px; }
.footer a:hover { text-decoration: underline; }
.footer p { margin: 0 0 8px; }
.footer .logo b, .footer .logo small { color: var(--white); }
.footer .logo img { filter: brightness(0) invert(1); }
.copy { border-top: 1px solid rgba(255,255,255,.25); margin-top: 40px; padding-top: 20px; font-size: 14px; opacity: .8; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* teacher page */
.teacher { display: grid; grid-template-columns: 380px 1fr; gap: 50px; align-items: start; padding: 40px 0 20px; }
.teacher .photo { aspect-ratio: 1; border-radius: var(--r); font-size: 110px; }
.teacher .position { font-size: 20px; font-weight: 500; margin-top: 14px; }
.teacher .dept { font-size: 18px; color: var(--muted); margin: 8px 0 26px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.stat { background: var(--bg-soft); border: 1px solid var(--gray); border-radius: 22px; padding: 16px 22px; min-width: 140px; }
.stat b { display: block; font-size: 28px; color: var(--blue); }
.stat span { font-size: 14px; color: var(--muted); }
.bio { font-size: 18px; margin-bottom: 30px; white-space: pre-line; }
.back { display: inline-flex; gap: 6px; text-decoration: none; color: var(--muted); margin-top: 30px; }
.back:hover { color: var(--blue); }
@media (max-width: 800px) { .teacher { grid-template-columns: 1fr; gap: 26px; } .teacher .photo { max-width: 340px; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-box { background: var(--white); border-radius: var(--r); width: 100%; max-width: 560px; padding: 34px clamp(20px, 5vw, 40px); position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--gray); cursor: pointer; font-size: 20px; }
.modal h2 { font-size: 26px; margin-bottom: 4px; padding-right: 40px; }
.modal .to { color: var(--muted); margin-bottom: 22px; }
.done-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 36px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }

/* attachments */
.hints { margin: 0 0 10px; padding-left: 20px; color: var(--muted); font-size: 14px; font-weight: 400; }
.hints li { margin-bottom: 2px; }
.field select { width: 100%; padding: 14px 18px; border-radius: var(--r-sm); border: 1px solid var(--gray); background: var(--white); font: inherit; }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.pager button { min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--gray); background: var(--white); font: inherit; font-weight: 500; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--blue-light); color: var(--blue); }
.pager button.on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pager button:disabled { opacity: .4; cursor: default; }
.pager span { align-self: center; padding: 0 4px; color: var(--muted); }
@media (max-width: 600px) { .pager { gap: 4px; } .pager button { min-width: 38px; height: 40px; padding: 0 8px; } }
.attach { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.attach:empty { display: none; }
.att { position: relative; width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--gray); }
.att img, .att video { width: 100%; height: 100%; object-fit: cover; }
.att-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 22px; text-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.att button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: var(--white); cursor: pointer; line-height: 1; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.media img, .media video { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); background: var(--black); }

/* wall of thanks */
.wall { padding-top: 30px; }
.wall h2 { margin-bottom: 24px; }
.wall-list { columns: 2 340px; column-gap: 20px; }
.note-card { break-inside: avoid; background: var(--bg-soft); border: 1px solid var(--gray); border-radius: var(--r); padding: 24px 26px; margin-bottom: 20px; }
.note-card p { margin: 0; white-space: pre-line; font-size: 17px; }
.note-card .by { margin-top: 14px; font-size: 14px; color: var(--muted); }
.note-card .by b { color: var(--black); font-weight: 600; }
.note-to { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.note-to b { color: var(--blue); }
.note-to:hover b { text-decoration: underline; }
.note-ava { width: 36px; height: 36px; border-radius: 50%; font-size: 13px; flex: none; }
.request-cta { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }

/* cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px; margin: 0 auto; background: var(--black); color: var(--white); border-radius: 22px; padding: 18px 20px; display: flex; gap: 16px; align-items: center; font-size: 14px; }
.cookie a { color: var(--blue-light); }

/* doc page */
.doc { max-width: 800px; padding: 50px 20px; }
.doc h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 24px; }

/* ---------- phones & touch ---------- */
.logo span { white-space: nowrap; }
.check { padding: 4px 0; }
.back { padding: 10px 0; }
/* finger-sized targets on any touch screen (phones, tablets) */
@media (pointer: coarse), (max-width: 900px) {
  .footer a { padding: 8px 0; margin-bottom: 0; }
  .btn-sm { min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
}
@media (max-width: 600px) {
  section { padding: 50px 0; }
  .btn-sm { min-height: 44px; padding: 10px 18px; }
  /* catalog: compact horizontal cards instead of full-screen photos */
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-content: start; padding: 12px; border-radius: 22px; }
  .card .photo { grid-row: 1 / span 5; width: 96px; height: 96px; aspect-ratio: auto; margin: 0; border-radius: 16px; font-size: 30px; }
  .card .tag, .card h3, .card .pos, .card .dept, .card .yrs { margin-left: 0; margin-right: 0; }
  .card .tag { margin-bottom: 6px; }
  .card h3 { font-size: 16px; margin-bottom: 4px; }
  .card .yrs:empty { display: none; }
  .card .btn { grid-column: 1 / -1; margin: 12px 0 0; }
}
/* form on phones (portrait or landscape): close button stays reachable while scrolling */
@media (max-width: 600px), (max-height: 500px) {
  .modal { padding: 12px 8px; }
  .modal-box { padding: 24px 18px; border-radius: 24px; }
  .modal-close { position: sticky; top: 0; float: right; margin: -8px -4px 0 8px; z-index: 2; width: 44px; height: 44px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  .modal h2 { padding-right: 0; }
}
@media (max-width: 360px) {
  h1 { font-size: 30px; }
  .container { padding: 0 16px; }
}
