/* ==========================================================================
   sutochno78 — design system
   Palette drawn from the city itself: night Neva granite-blue, the gold of
   the Admiralty spire, warm plaster facades, white-nights pale blue.
   Mobile-first. No framework, no build step.
   ========================================================================== */

:root {
  /* brand */
  --neva:        #0f1c2e;
  --neva-soft:   #1c2c42;
  --granite:     #3d4b5c;
  --gold:        #b8892b;
  --gold-bright: #d8ab48;
  --white-night: #dce7f2;

  /* surfaces */
  --bg:          #f7f5f1;
  --surface:     #ffffff;
  --surface-alt: #efece6;
  --border:      #e0dbd2;
  --border-soft: #ebe7e0;

  /* text */
  --text:        #16202e;
  --text-muted:  #5d6875;
  --text-invert: #f7f5f1;

  /* status */
  --ok:      #2c7a4b;
  --ok-bg:   #e6f3ec;
  --warn:    #9a6b12;
  --warn-bg: #fbf1dd;
  --err:     #b03030;
  --err-bg:  #fbeaea;

  /* metrics */
  --wrap:    1180px;
  --radius:  14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 28, 46, .06), 0 2px 8px rgba(15, 28, 46, .05);
  --shadow-md: 0 2px 6px rgba(15, 28, 46, .07), 0 12px 28px rgba(15, 28, 46, .09);
  --shadow-lg: 0 8px 20px rgba(15, 28, 46, .10), 0 24px 60px rgba(15, 28, 46, .14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;

  --step: .25rem;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #10161f;
    --surface:     #18212e;
    --surface-alt: #1f2937;
    --border:      #2b3644;
    --border-soft: #232d3a;
    --text:        #e7ecf3;
    --text-muted:  #9aa7b6;
    --gold:        #d8ab48;
    --gold-bright: #e8c273;
    --ok-bg:   #12291d;
    --warn-bg: #2a2213;
    --err-bg:  #2b1717;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .38);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  }
}

/* --- reset ---------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.65rem, 1.15rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--neva);
  color: var(--text-invert);
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

@media (min-width: 700px) { .wrap { padding-inline: 1.5rem; } }

main { flex: 1 0 auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- header --------------------------------------------------------------- */

.site-header {
  background: var(--neva);
  color: var(--text-invert);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .07);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
  color: inherit;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--gold-bright), var(--gold));
  color: #23180a;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
}

.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.logo__sub  { font-size: .7rem; color: var(--white-night); opacity: .72; letter-spacing: .04em; text-transform: uppercase; }

/* Mobile menu built on <details> so it works with JavaScript disabled. */
.nav-toggle > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
}
.nav-toggle > summary::-webkit-details-marker { display: none; }

.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars i {
  display: block;
  width: 19px; height: 2px;
  background: var(--text-invert);
  border-radius: 2px;
}

.site-nav {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--neva-soft);
  display: flex;
  flex-direction: column;
  padding: .5rem 1rem 1rem;
  box-shadow: var(--shadow-md);
}

.site-nav a {
  padding: .8rem .25rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-weight: 500;
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a.is-active { color: var(--gold-bright); }

@media (min-width: 900px) {
  .nav-toggle > summary { display: none; }
  .site-nav {
    position: static;
    flex-direction: row;
    gap: .35rem;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .site-nav a {
    padding: .5rem .8rem;
    border: 0;
    border-radius: 9px;
    font-size: .95rem;
    transition: background .18s var(--ease), color .18s var(--ease);
  }
  .site-nav a:hover { background: rgba(255, 255, 255, .1); }
  .site-nav a.is-active { background: rgba(216, 171, 72, .16); }
}

/* --- breadcrumbs ---------------------------------------------------------- */

.breadcrumbs {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  font-size: .82rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
  list-style: none;
  margin: 0;
  padding: .7rem 0;
  color: var(--text-muted);
}
.breadcrumbs li + li::before { content: "›"; margin-right: .5rem; opacity: .5; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); }

/* --- sections ------------------------------------------------------------- */

.section { padding: 2.5rem 0; }
.section--tight { padding: 1.75rem 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border-soft); }

@media (min-width: 900px) {
  .section { padding: 3.5rem 0; }
  .section--tight { padding: 2.25rem 0; }
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.section__head h2 { margin: 0; }
.section__lead { color: var(--text-muted); margin: .35rem 0 0; max-width: 62ch; }

.link-more {
  color: var(--gold);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
}
.link-more:hover { text-decoration: underline; }
.link-more::after { content: " →"; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(150deg, var(--gold-bright), var(--gold));
  color: #23180a;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow-md); }

.btn--dark { background: var(--neva); color: var(--text-invert); }
.btn--dark:hover { background: var(--neva-soft); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn--block { width: 100%; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }

/* --- forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: .3rem; }

.field > label,
.form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

input[type="text"], input[type="date"], input[type="number"],
input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  padding: .65rem .8rem;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  min-height: 44px; /* comfortable tap target */
}

textarea { min-height: 120px; resize: vertical; line-height: 1.55; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 137, 43, .16);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.help { font-size: .8rem; color: var(--text-muted); }

.alert {
  padding: .85rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .92rem;
  margin-bottom: 1.25rem;
}
.alert--ok   { background: var(--ok-bg);   border-color: rgba(44, 122, 75, .3);  color: var(--ok); }
.alert--warn { background: var(--warn-bg); border-color: rgba(154, 107, 18, .3); color: var(--warn); }
.alert--err  { background: var(--err-bg);  border-color: rgba(176, 48, 48, .3);  color: var(--err); }
.alert ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* --- cards ---------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

@media (min-width: 700px) { .grid { gap: 1.35rem; } }

/* --- chips / tags --------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .7rem;
  font-size: .82rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
a.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip--metro { background: rgba(184, 137, 43, .12); color: var(--gold); }
.chip--accent { background: var(--neva); color: var(--text-invert); }

.metro-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
  background: currentColor;
}

/* --- pagination ----------------------------------------------------------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}
.pagination a, .pagination span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding-inline: .6rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  font-size: .92rem;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .is-current { background: var(--neva); color: var(--text-invert); border-color: var(--neva); font-weight: 600; }
.pagination .is-gap { border: 0; background: none; min-width: 20px; color: var(--text-muted); }

/* --- empty state ---------------------------------------------------------- */

.empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty h2 { margin-bottom: .35rem; }
.empty p { color: var(--text-muted); max-width: 46ch; margin-inline: auto; }

/* --- prose (journal / descriptions) --------------------------------------- */

.prose { max-width: 72ch; font-size: 1.03rem; line-height: 1.72; }
.prose h2 { margin-top: 2em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--gold); text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.5em 0;
  padding: .35rem 0 .35rem 1.15rem;
  border-left: 3px solid var(--gold);
  color: var(--text-muted);
  font-style: italic;
}
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border-soft); }
.prose th { font-weight: 600; background: var(--surface-alt); }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  background: var(--neva);
  color: var(--white-night);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  font-size: .92rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .site-footer__grid { grid-template-columns: 1.6fr repeat(auto-fit, minmax(160px, 1fr)); gap: 2.5rem; }
}

.site-footer__tagline { font-weight: 600; color: #fff; margin: .75rem 0 .5rem; }
.site-footer__note { color: rgba(220, 231, 242, .68); max-width: 44ch; font-size: .88rem; }

.site-footer__col h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gold-bright); margin-bottom: .8rem; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer__col a { color: rgba(220, 231, 242, .82); text-decoration: none; }
.site-footer__col a:hover { color: #fff; text-decoration: underline; }

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  color: rgba(220, 231, 242, .6);
  font-size: .82rem;
}
.site-footer__legal { max-width: 52ch; }

/* --- error pages ---------------------------------------------------------- */

.error-page { text-align: center; padding: 4rem 1rem 3rem; }
.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 8vw, 7rem);
  line-height: 1;
  color: var(--gold);
  margin: 0 0 .25em;
}
.error-page p { color: var(--text-muted); max-width: 48ch; margin-inline: auto; }
.error-page .btn { margin-top: 1.5rem; }
