/* restromingo.ru — лёгкий стиль: Times New Roman + моно-акценты, белый фон, чёрные обводки, голубой акцент. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6a6a6a;
  --line: #000000;
  --soft: #f6f4ef;
  --accent: #7CC9FC;
  --accent-ink: #0a4f7a;
  --serif: "Times New Roman", Times, serif;
  --mono: "PT Mono", "Courier New", ui-monospace, monospace;
  --max: 880px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 18px 60px;
}
.page-home { max-width: 980px; padding-top: 12px; padding-bottom: 40px; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 17px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.06s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translate(1px, 1px); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--fg);
  border-color: var(--fg);
}

.btn-ghost { background: var(--bg); color: var(--fg); }
.btn-ghost:hover { background: var(--accent); color: var(--fg); }

/* === HOME: RING (центр + 8 проектов на разных радиусах) === */
.ring-stage {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}
.ring {
  position: relative;
  width: min(760px, 96vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  --scale: 1;
}
@media (max-width: 980px) {
  .ring { width: 96vw; --scale: 0.78; }
}
@media (max-width: 720px) {
  .ring { --scale: 0.62; }
}
.ring .center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(260px, 60%);
  text-align: center;
  z-index: 3;
}
.ring .logo-wrap {
  position: relative;
  width: 220px;
  max-width: 100%;
  height: 64px;
  margin: 0 auto;
  overflow: hidden;
}
.ring .logo-wrap.exiting { overflow: visible; }
.ring .logo {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring .logo img { width: 100%; height: 100%; object-fit: contain; }
.ring .mitya {
  position: absolute;
  height: 32px;
  width: auto;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}
.ring .mitya.flying { position: fixed; z-index: 10; }

.ring .proj {
  --i: 0;
  --rad: 240px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--i) * 45deg))
    translateY(calc(var(--rad) * var(--scale, 1) * -1))
    rotate(calc(var(--i) * -45deg));
  transition: transform 0.15s ease;
  z-index: 2;
}
.ring .proj:hover { z-index: 4; }
.ring .proj-img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}
.ring .proj-img svg { width: 100%; height: 100%; display: block; }
.ring .proj:hover .proj-img {
  box-shadow: 4px 4px 0 var(--accent);
  border-color: var(--fg);
  transform: translate(-2px, -2px);
}
.ring .proj-name {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 6px;
  color: var(--fg);
  white-space: nowrap;
}
.ring .proj:hover .proj-name { color: var(--accent-ink); }
.ring .proj-tag {
  position: absolute;
  top: -6px;
  right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--fg);
  color: var(--bg);
  padding: 1px 5px;
  z-index: 1;
}

/* мобильная версия — кольцо разворачивается в сетку */
@media (max-width: 600px) {
  .ring {
    width: 100%;
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 12px;
    padding: 6px 4px 0;
  }
  .ring .center {
    position: static;
    transform: none;
    width: 100%;
    grid-column: 1 / -1;
    padding: 6px 0 14px;
  }
  .ring .proj {
    position: static;
    transform: none;
    width: 100%;
    margin: 0;
  }
  .ring .proj-img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .ring .proj-name { white-space: normal; }
}

/* === HOME: PITCH === */
.pitch {
  max-width: 620px;
  margin: 28px auto 0;
  text-align: center;
  padding: 0 12px;
}
.pitch .pitch-line {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg);
}
.pitch a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pitch a:hover { color: var(--fg); background: var(--accent); }
.pitch-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 !important;
}

/* === CONTACT === */
.contact {
  max-width: 540px;
  margin: 64px auto 0;
  padding: 0 12px;
  text-align: center;
}
.contact-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: normal;
  line-height: 1.2;
  margin: 0 0 8px;
}
.contact-sub {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 22px;
}
.contact-sub .accent {
  color: var(--accent-ink);
  background: linear-gradient(transparent 65%, var(--accent) 65%);
  padding: 0 2px;
}

/* === LEAD FORM (только Times, минимум) === */
.lead-form {
  display: grid;
  gap: 12px;
  text-align: left;
  max-width: 460px;
  margin: 0 auto;
}
.lead-form .lf-input {
  font-family: var(--serif);
  font-size: 17px;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  background: transparent;
  color: var(--fg);
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
}
.lead-form .lf-input:focus { border-bottom-color: var(--accent); }
.lead-form .lf-input::placeholder { color: var(--muted); font-style: italic; }
.lead-form .lf-area {
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 10px;
  margin-top: 8px;
}
.lead-form .lf-area:focus { border-color: var(--accent); }
.lead-form .hp { display: none !important; }
.lead-form .lf-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}
.lead-form .status {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  min-height: 18px;
  font-style: italic;
}
.lead-form .status.ok { color: var(--accent-ink); font-style: normal; }
.lead-form .status.err { color: #7a0000; font-style: normal; }

/* === FOOTER === */
.foot {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.foot a { color: var(--fg); text-decoration: none; }
.foot a:hover { color: var(--accent-ink); text-decoration: underline; }

/* === INNER PAGES (codi / garmoshka / shrek) === */
.head-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 18px;
  color: var(--muted);
}
.head-bar a { color: var(--fg); text-decoration: none; }
.head-bar a:hover { color: var(--accent-ink); text-decoration: underline; }

/* === /codi/ — манифест и форматы === */
.codi-hero {
  margin: 24px 0 36px;
}
.codi-hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 64px);
  font-weight: normal;
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.codi-hero h1 .accent {
  background: linear-gradient(transparent 60%, var(--accent) 60%);
  padding: 0 4px;
}
.codi-hero .lead {
  font-size: 22px;
  line-height: 1.4;
  color: var(--fg);
  margin: 0 0 0;
  max-width: 620px;
}

.codi-manifest {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 36px 0;
  font-size: 18px;
  line-height: 1.55;
  max-width: 620px;
}
.codi-manifest p { margin: 0 0 10px; }
.codi-manifest p:last-child { margin: 0; }

.formats {
  display: grid;
  gap: 0;
  margin: 24px 0 36px;
}
.format {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px 18px;
  padding: 18px 0 18px 18px;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background 0.15s ease;
}
.format:last-child { border-bottom: 1px solid var(--line); }
.format::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  background: var(--fg);
  transition: background 0.15s ease, width 0.15s ease;
}
.format:hover { background: rgba(124,201,252,0.08); }
.format:hover::before { background: var(--accent); width: 5px; }
.format h3 {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 24px;
  margin: 0 0 4px;
}
.format p {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
}
.format .price {
  font-family: var(--serif);
  font-size: 19px;
  white-space: nowrap;
}
.format .price b {
  font-weight: normal;
  background: linear-gradient(transparent 60%, var(--accent) 60%);
  padding: 0 4px;
}
@media (max-width: 600px) {
  .format { grid-template-columns: 1fr; }
  .format .price { font-size: 17px; }
}

/* /garmoshka/ /shrek/ — простой блок скачивания */
.dl-page {
  max-width: 600px;
  margin: 32px 0;
}
.dl-page h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 52px);
  font-weight: normal;
  margin: 0 0 14px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.dl-page .lead {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 520px;
}
.dl-page .meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}
