/* Pagoria — start page (/). Colours of the game: deep sea and parchment. */
:root {
  --sea: #0f1d1b;
  --sea-2: #16302b;
  --sea-3: #1f423b;
  --parchment: #f7edd1;
  --parchment-2: #efe0b9;
  --ink: #2a2116;
  --ink-soft: #5d4e39;
  --gold: #e3b04b;
  --gold-dark: #b9822a;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .28);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: var(--gold-dark); }
.hidden { display: none !important; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 0;
  font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, #f2c463, var(--gold-dark));
  color: #2b1d07; box-shadow: 0 6px 16px rgba(185, 130, 42, .45);
}
.btn-primary:hover { box-shadow: 0 9px 22px rgba(185, 130, 42, .6); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: var(--parchment); border: 1px solid rgba(247, 237, 209, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn-big { padding: 15px 34px; font-size: 19px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 22px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(15, 29, 27, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(227, 176, 75, .25);
}
.brand { font: 700 24px/1 var(--serif); color: var(--parchment); text-decoration: none; letter-spacing: .5px; }
.topnav { display: flex; gap: 18px; flex: 1; }
.topnav a { color: rgba(247, 237, 209, .82); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--gold); }
.topactions { display: flex; gap: 10px; }

/* ---- hero ---- */
.hero {
  position: relative; min-height: min(78vh, 760px);
  display: flex; align-items: flex-end;
  background: var(--sea) center / cover no-repeat;
  color: var(--parchment);
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 29, 27, .15) 0%, rgba(15, 29, 27, .45) 45%, rgba(15, 29, 27, .95) 100%);
}
.hero-content {
  position: relative; width: min(1100px, 100%); margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) clamp(40px, 8vh, 80px);
}
.hero-kicker { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: 3px; font-weight: 700; font-size: 14px; }
.hero h1 {
  margin: 4px 0 10px; font: 700 clamp(48px, 9vw, 104px)/1 var(--serif);
  text-shadow: 0 4px 22px rgba(0, 0, 0, .55);
}
.hero-text { max-width: 640px; margin: 0 0 26px; font-size: clamp(17px, 2vw, 20px); color: rgba(247, 237, 209, .92); white-space: pre-line; }
.hero-note { margin: 12px 0 0; font-size: 14px; color: rgba(247, 237, 209, .65); }

/* ---- blocks ---- */
.block { width: min(1100px, 100%); margin: 0 auto; padding: 64px clamp(16px, 4vw, 48px) 40px; }
.block h2 { margin: 0 0 28px; font: 700 clamp(30px, 4vw, 40px)/1.15 var(--serif); text-align: center; }
.block h2::after { content: ""; display: block; width: 70px; height: 3px; margin: 14px auto 0; background: var(--gold); border-radius: 3px; }
.block-dark {
  width: 100%; max-width: none; background: var(--sea-2); color: var(--parchment);
  padding-left: max(16px, calc((100% - 1100px) / 2 + 48px)); padding-right: max(16px, calc((100% - 1100px) / 2 + 48px));
}

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.feature {
  background: #fffaf0; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(185, 130, 42, .2);
}
.feature-image { height: 170px; background: linear-gradient(180deg, #cfe5d7, #a9cdb8); display: flex; align-items: center; justify-content: center; }
.feature-image img { max-height: 160px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); }
.feature-image.photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; filter: none; }
.feature h3 { margin: 16px 18px 6px; font: 700 21px/1.25 var(--serif); }
.feature p { margin: 0 18px 20px; color: var(--ink-soft); white-space: pre-line; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery button {
  padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in;
  background: var(--sea-3); aspect-ratio: 16 / 10; box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery button:hover img { transform: scale(1.05); }

/* news */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.news-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  background: #fffaf0; border: 1px solid rgba(185, 130, 42, .25); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); font: inherit; color: inherit;
  transition: transform .15s ease;
}
.news-card:hover { transform: translateY(-3px); }
.news-card-image { aspect-ratio: 16 / 8; background: var(--sea-3) center / cover no-repeat; }
.news-card-body { padding: 16px 18px 20px; }
.news-date { margin: 0 0 4px; font-size: 13px; color: var(--gold-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.news-card h3 { margin: 0 0 8px; font: 700 21px/1.25 var(--serif); }
.news-card p { margin: 0; color: var(--ink-soft); }
.news-card .read-more { margin-top: 12px; color: var(--gold-dark); font-weight: 700; }
.news-draft { color: #a33; font-weight: 700; }
.news-empty { text-align: center; color: var(--ink-soft); }
.news-more { text-align: center; margin-top: 26px; }
.news-more .btn { color: var(--ink); border-color: rgba(42, 33, 22, .3); }

/* footer */
.footer { margin-top: 40px; padding: 30px 16px; text-align: center; background: var(--sea); color: rgba(247, 237, 209, .75); font-size: 15px; }
.footer p { margin: 4px 0; }
.footer a { color: var(--gold); }

/* overlays: full post and gallery picture */
.overlay {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto;
  background: rgba(8, 15, 14, .82); padding: clamp(12px, 4vh, 48px) 16px;
}
.post {
  position: relative; width: min(820px, 100%); margin: 0 auto;
  background: #fffaf0; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  padding-bottom: 26px;
}
.post-image { width: 100%; max-height: 420px; object-fit: cover; }
.post-close {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(15, 29, 27, .75); color: #fff; font-size: 18px; cursor: pointer;
}
.post .post-date, .post h2, .post-body, .post-draft { margin-left: clamp(18px, 4vw, 40px); margin-right: clamp(18px, 4vw, 40px); }
.post .post-date { margin-top: 22px; margin-bottom: 4px; font-size: 14px; color: var(--gold-dark); font-weight: 700; }
.post h2 { margin-top: 0; font: 700 clamp(26px, 3.4vw, 36px)/1.2 var(--serif); }
.post-body p { margin: 0 0 14px; }
.post-draft { color: #a33; font-weight: 700; }
.lightbox { display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox figure { margin: 0; max-width: min(1400px, 100%); }
.lightbox img { max-height: 84vh; margin: 0 auto; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox figcaption { margin-top: 10px; text-align: center; color: var(--parchment); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topnav { order: 3; width: 100%; justify-content: center; }
  .topactions { margin-left: auto; }
  #login-link { display: none; }
  .news { grid-template-columns: 1fr; }
}

/* Header without a picture: sea-green glow and a group of buildings. */
.hero-art { display: none; }
.hero.hero-plain {
  background:
    radial-gradient(ellipse 60% 55% at 72% 62%, rgba(96, 160, 110, .55), transparent 70%),
    radial-gradient(ellipse 80% 70% at 70% 70%, rgba(40, 110, 120, .5), transparent 75%),
    linear-gradient(180deg, #0f2a33 0%, #123a3a 55%, var(--sea) 100%);
}
.hero.hero-plain .hero-shade { background: linear-gradient(90deg, rgba(15, 29, 27, .75) 0%, rgba(15, 29, 27, .2) 55%, transparent 100%); }
.hero.hero-plain .hero-art { display: block; position: absolute; right: 2%; bottom: 6%; width: min(680px, 52vw); aspect-ratio: 1.35; }
.hero-art img { position: absolute; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45)); }
.hero-art .art-field { width: 46%; left: 2%; bottom: 4%; }
.hero-art .art-mill { width: 36%; left: 30%; bottom: 22%; }
.hero-art .art-academy { width: 36%; right: 2%; bottom: 30%; }
.hero-art .art-house { width: 24%; right: 18%; bottom: 2%; }
.hero-art .art-shipyard { width: 34%; left: 6%; top: 0; opacity: .95; }
@media (max-width: 900px) {
  .hero.hero-plain .hero-art { opacity: .35; width: 90vw; right: -10vw; }
}
