/* Dobrychleba.cz — světlá veřejná varianta layoutu Qitchen + admin */

:root {
  --bg-outer: #eceae4;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --ink: #2c2a26;
  --muted: #6f6a62;
  --accent: #b08a4a;
  --accent-deep: #8d6b35;
  --line: rgba(44, 42, 38, 0.12);
  --shadow: 0 18px 50px rgba(44, 42, 38, 0.08);
  --radius: 14px;
  --font-display: "Forum", "Times New Roman", serif;
  --font-body: "Geist", "Avenir Next", "Segoe UI", sans-serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-outer);
}

body.is-public {
  background:
    radial-gradient(circle at 12% 8%, rgba(176, 138, 74, 0.12), transparent 34%),
    linear-gradient(160deg, #f4f2ec 0%, var(--bg-outer) 48%, #e7e4dc 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

/* ——— Veřejný shell ——— */

.shell {
  width: min(1440px, calc(100% - 1rem));
  margin: 0.5rem auto;
  min-height: calc(100vh - 1rem);
  min-height: calc(100dvh - 1rem);
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.4rem 0.2rem 0.45rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  display: block;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: rgba(176, 138, 74, 0.1);
}

.nav-links .topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.45rem 0 0;
  padding: 0.15rem 0.35rem;
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links .topbar-phone:hover,
.nav-links .topbar-phone.is-active {
  color: var(--ink);
  background: transparent;
}

.topbar-phone-icon {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf2;
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
}

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
  gap: 0.75rem;
  padding: 5.75rem 0.75rem 0.75rem;
  min-height: 0;
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
  text-align: center;
  padding: 0.28rem 1rem 0.42rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.site-footer a:hover {
  color: inherit;
  text-decoration: none;
}

.site-footer-heart {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin: 0 0.12em 0 0.05em;
  vertical-align: -0.12em;
  fill: #e31c23;
}

.page-fabs {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-fabs.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-fab {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
}

.page-fab:hover {
  background: #fff;
  color: var(--accent-deep);
}

.page-fab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-col {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 3fr);
  gap: 0.75rem;
  min-height: 0;
  height: 100%;
}

.top-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-height: 160px;
}

.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.hero-pane {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  background: #d9d2c5;
}

.hero-rotator {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 0;
  transform: scale(1.03);
  transition: opacity var(--hero-fade, 1.4s) ease-in-out;
  pointer-events: none;
}

.hero-media.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-media.is-drifting {
  animation: heroDrift 18s linear infinite alternate;
}

.hero-veil {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(44, 42, 38, 0.08) 0%, rgba(44, 42, 38, 0.18) 45%, rgba(44, 42, 38, 0.55) 100%),
    linear-gradient(90deg, rgba(44, 42, 38, 0.2), transparent 50%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: clamp(1.2rem, 3vw, 2.5rem);
  bottom: clamp(1.4rem, 4vw, 2.8rem);
  right: auto;
  z-index: 2;
  width: auto;
  max-width: calc(100% - 2.5rem);
  font-family: var(--font-display);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: #fffdf8;
  text-shadow: 0 8px 28px rgba(44, 42, 38, 0.35);
}

.hero-copy h1 .line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(0.4rem);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-copy h1 .line:nth-child(2) {
  animation-delay: 0.12s;
}

.hero-lede {
  margin: 0.9rem 0 0;
  max-width: 28rem;
  color: rgba(255, 253, 248, 0.92);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.28s forwards;
}

.hero-news {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: max-content;
  max-width: 90%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 28px rgba(44, 42, 38, 0.12);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.hero-news-item {
  max-width: 100%;
}

.hero-news-item + .hero-news-item {
  padding-top: 0.55rem;
  border-top: 1px solid rgba(44, 42, 38, 0.1);
}

.hero-news-date {
  display: block;
  margin: 0 0 0.12rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-news-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.15vw, 1.12rem);
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: #1a1814;
  white-space: normal;
}

.socials {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
}

.socials-ig {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #fffdf8;
}

.socials-ig-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: #fffdf8;
  transition: transform 0.25s ease, background 0.25s ease;
}

.socials-ig-bubble {
  position: relative;
  padding: 0.48rem 0.9rem 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease;
}

.socials-ig:hover .socials-ig-icon,
.socials-ig:hover .socials-ig-bubble {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.32);
}

.socials svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.side-rail {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-height: 0;
  height: 100%;
}

.rail-link {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  min-height: 160px;
  background: #ddd6ca;
  opacity: 0;
  transform: translateX(12px);
  animation: railIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.top-tiles .rail-link {
  transform: translateY(10px);
  animation-name: fadeUp;
}

.rail-link:nth-child(1) { animation-delay: 0.1s; }
.rail-link:nth-child(2) { animation-delay: 0.2s; }
.rail-link:nth-child(3) { animation-delay: 0.3s; }

.rail-link img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.7s ease;
  filter: saturate(0.95) brightness(0.97);
}

.rail-link:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) brightness(1);
}

.rail-link.is-static {
  cursor: default;
}

.rail-link.is-static:hover img {
  transform: none;
  filter: saturate(0.95) brightness(0.97);
}

.rail-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 3.4rem 0.95rem 0.7rem;
  background: linear-gradient(
    180deg,
    rgba(248, 247, 243, 0) 0%,
    rgba(248, 247, 243, 0.12) 38%,
    rgba(248, 247, 243, 0.55) 68%,
    rgba(248, 247, 243, 0.88) 86%,
    rgba(248, 247, 243, 0.97) 100%
  );
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  z-index: 1;
}

.rail-title {
  font-family: var(--font-display);
  font-size: 1.42rem;
  line-height: 1.12;
  letter-spacing: 0.03em;
  color: #1a1814;
  padding: 0.12rem 0.35rem 0.08rem 0.15rem;
  border-radius: 4px;
  background: rgba(248, 247, 243, 0.55);
  box-shadow: 0 0 18px 10px rgba(248, 247, 243, 0.55);
  text-shadow:
    0 1px 0 rgba(255, 253, 248, 0.95),
    0 0 10px rgba(248, 247, 243, 0.9),
    0 2px 6px rgba(248, 247, 243, 0.85);
}

.rail-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.rail-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
}

/* Inner page — not used on the homepage */

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.page-banner {
  position: relative;
  padding: 6.7rem 1.25rem 2.15rem;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
  border-bottom: 1px solid var(--line);
}

.home-chip {
  position: absolute;
  top: 5.15rem;
  left: 1.25rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

.home-chip-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 999px;
  border: 1px solid rgba(44, 42, 38, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.home-chip-bubble {
  padding: 0.48rem 0.9rem 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 42, 38, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease;
}

.home-chip:hover .home-chip-icon,
.home-chip:hover .home-chip-bubble {
  transform: translateY(-2px);
  background: #fff;
}

.home-chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-banner h1 {
  width: min(720px, 100%);
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.page-body {
  width: min(720px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.15rem 0 3.25rem;
  flex: 1;
}

.page-body .content {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.page-body .content.is-rich {
  white-space: normal;
}

.page-body .content.is-rich h1,
.page-body .content.is-rich h2,
.page-body .content.is-rich h3,
.page-body .content.is-rich h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  margin: 1.4rem 0 0.6rem;
}

.page-body .content.is-rich h1 { font-size: 2.35rem; }
.page-body .content.is-rich h2 { font-size: 2rem; }
.page-body .content.is-rich h3 { font-size: 1.45rem; }

.page-body .content.is-rich div { margin: 0 0 0.85rem; }

.page-body .content.is-rich p { margin: 0 0 0.85rem; }

.page-body .content.is-rich ul,
.page-body .content.is-rich ol {
  margin: 0 0 0.85rem;
  padding-left: 1.3rem;
}

.page-body .content.is-rich a {
  color: var(--accent-deep);
  text-decoration: underline;
}

.page-body .content.is-rich blockquote {
  margin: 1.2rem 0;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.35;
}

.page-body .content.is-rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 1rem;
}

.page-body .content.is-rich th,
.page-body .content.is-rich td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.page-body .content.is-rich th {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

.page-body .content.is-rich caption {
  caption-side: bottom;
  padding: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-body .content.is-rich img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0 0 1.2rem;
}

.page-body .content.is-rich > :first-child {
  margin-top: 0;
}

/* ——— Admin ——— */

.wrap { width: min(980px, calc(100% - 2rem)); margin: 0 auto; }
.site-header, .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.admin-header .brand { font-size: 1.45rem; }
.muted { color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}
.page-photos {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f5ef;
}
.page-photos-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.page-photos-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.page-photos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.page-photos-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.page-photos-thumb {
  display: block;
  width: 100%;
  height: 72px;
  background-color: #ddd6ca;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.page-photos-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
}
.page-photos-item-actions .btn {
  width: 100%;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .page-photos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.nav { display: flex; gap: 0.55rem; flex-wrap: nowrap; align-items: center; }
.nav > a,
.nav-btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
}
.nav > a.active,
.nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav-item {
  position: relative;
}
.nav-btn {
  cursor: default;
}
.nav-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 12.5rem;
  padding: 0.4rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.nav-drop::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 0;
  right: 0;
  height: 0.45rem;
}
.nav-item:hover .nav-drop,
.nav-item:focus-within .nav-drop {
  display: block;
}
.nav-drop a {
  display: block;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.48rem 0.9rem;
  color: var(--ink);
  white-space: nowrap;
}
.nav-drop a:hover,
.nav-drop a.is-current {
  background: rgba(176, 138, 74, 0.12);
  color: var(--ink);
}
.btn-danger { color: #b91c1c; border-color: #fecaca; }
label { display: block; margin-bottom: 0.35rem; font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], input[type="number"], input[type="tel"], input[type="url"], textarea, select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 180px; resize: vertical; }
.field { margin-bottom: 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: 8px; margin: 1rem 0; border: 1px solid var(--line); background: #fff; }
.flash-ok { color: #166534; }
.flash-error { color: #b91c1c; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 0.75rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.login-box { width: min(420px, calc(100% - 2rem)); margin: 12vh auto; }
.stat { font-family: var(--font-display); font-size: 2.2rem; margin: 0; }
.admin-main { padding: 1.5rem 0 3rem; }
body:not(.is-public) {
  background: linear-gradient(180deg, #f7f5ef, #efece4);
  color: var(--ink);
}

@keyframes heroDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, -0.8%, 0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes railIn {
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .main-col {
    grid-template-rows: auto auto;
    height: auto;
  }

  .top-tiles {
    grid-template-columns: 1fr;
  }

  .top-tiles .rail-link,
  .side-rail .rail-link {
    min-height: 180px;
  }

  .hero-pane {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    min-height: max(22rem, 52vh);
    height: auto;
    padding: 0.85rem 0.85rem 1.15rem;
  }

  .hero-news {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    max-width: 100%;
  }

  .home-chip {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 0 1rem;
  }

  .page-banner {
    padding-top: 5.4rem;
  }

  .hero-news-date {
    font-size: 0.72rem;
  }

  .hero-news-text {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    line-height: 1.15;
  }

  .hero-copy {
    position: relative;
    left: auto;
    bottom: auto;
    right: auto;
    max-width: 100%;
  }

  .socials {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-end;
  }

  .side-rail {
    grid-template-rows: none;
    height: auto;
  }

  .nav-links { display: none; }

  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    width: max-content;
    max-width: calc(100vw - 2rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--line);
    border-radius: 10px;
    z-index: 30;
  }

  .nav-links.is-open a {
    white-space: nowrap;
  }

  .nav-links.is-open .topbar-phone {
    margin: 0;
    padding: 0.55rem 0.75rem;
  }

  .menu-toggle { display: inline-flex; }

  .brand-logo {
    max-width: min(280px, calc(100vw - 7rem));
  }

  .hero-copy h1 .line {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 0.5rem);
    margin: 0.25rem auto;
    border-radius: 10px;
  }

  .topbar {
    left: 0.45rem;
    right: 0.45rem;
    top: 0.45rem;
  }

  .brand { font-size: 1.05rem; letter-spacing: 0.04em; }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .socials-ig-bubble {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
    white-space: normal;
    max-width: 11rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 0 !important;
  }

  .hero-media.is-active {
    opacity: 1 !important;
  }

  .hero-copy h1 .line,
  .hero-lede,
  .rail-link,
  .top-tiles .rail-link {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
