:root {
  --paper: #f7efdf;
  --ink: #223238;
  --accent: #c2663f;
  --accent-soft: #e3a47b;
  --sea: #2d7f98;
  --sea-deep: #1b5f75;
  --sun: #eec37f;
  --olive: #6d7e45;
  --stone: #d8cdb8;
  --card: rgba(255, 252, 244, 0.86);
  --shadow: 0 14px 38px rgba(34, 50, 56, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Archivo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, #fff6de 0%, #f7efdf 35%, #f2e5ce 70%, #ead8be 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

.texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 82% 10%, rgba(45, 127, 152, 0.16), rgba(45, 127, 152, 0) 34%),
    linear-gradient(130deg, rgba(194, 102, 63, 0.09), rgba(194, 102, 63, 0) 30%),
    repeating-linear-gradient(45deg, rgba(34, 50, 56, 0.02) 0 2px, transparent 2px 6px);
  mix-blend-mode: multiply;
  z-index: -1;
}

.hero,
.section,
footer {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 4.5rem 0 3rem;
  animation: slideIn 700ms ease-out both;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1px solid rgba(27, 95, 117, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(238, 195, 127, 0.25));
  box-shadow: var(--shadow);
  text-decoration: none;
  flex: 0 0 auto;
}

.site-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.top-menu {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0;
  padding: 0.34rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 95, 117, 0.2);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(238, 195, 127, 0.24));
}

.menu-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  border: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.menu-link:hover {
  transform: translateY(-1px);
  border-color: rgba(27, 95, 117, 0.35);
  background: rgba(255, 255, 255, 0.88);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  margin-left: auto;
  padding: 0.34rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 95, 117, 0.2);
  background: rgba(255, 255, 255, 0.7);
}

.language-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.flag-switch {
  display: inline-flex;
  gap: 0.35rem;
}

.flag-button {
  border: 1px solid rgba(30, 43, 47, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  padding: 0.26rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.flag-button:hover {
  transform: translateY(-1px);
}

.flag-button.is-active {
  border-color: var(--sea);
  box-shadow: 0 6px 14px rgba(45, 127, 152, 0.28);
}

.flag-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(30, 43, 47, 0.18);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sea-deep);
  margin: 0 0 0.75rem;
}

h1,
h2 {
  font-family: "Fraunces", serif;
  line-height: 1.1;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.4rem);
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  align-items: center;
  gap: 1.1rem;
}

.hero-copy {
  min-width: 0;
}

.lead {
  margin: 1.1rem 0 0;
  max-width: 64ch;
  font-size: clamp(1.02rem, 1.8vw, 1.25rem);
}

.hero-portrait {
  margin: 0;
}

.hero-portrait img {
  display: block;
  width: min(320px, 62vw);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(34, 50, 56, 0.14);
  box-shadow: var(--shadow);
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  padding: 0.68rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(140deg, var(--sea), var(--sea-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(27, 95, 117, 0.34);
}

.button.ghost {
  border-color: color-mix(in srgb, var(--olive) 62%, transparent);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.hero-copy > .hero-actions .button:nth-child(2) {
  border-color: color-mix(in srgb, var(--sea) 35%, white);
  background: linear-gradient(140deg, rgba(175, 218, 230, 0.86), rgba(214, 236, 242, 0.9));
}

.hero-copy > .hero-actions .button:nth-child(1) {
  border-color: color-mix(in srgb, var(--sea-deep) 55%, transparent);
  background: linear-gradient(140deg, var(--sea-deep), var(--sea));
}

.hero-copy > .hero-actions .button:nth-child(3) {
  border-color: color-mix(in srgb, var(--sea) 20%, white);
  background: linear-gradient(140deg, rgba(224, 242, 246, 0.94), rgba(245, 251, 252, 0.98));
}

.section {
  padding: 2.1rem 0;
}

.section-head {
  margin-bottom: 1.2rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
}

.section-head p {
  margin: 0.5rem 0 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.art-card {
  margin: 0;
  background: var(--card);
  border: 1px solid rgba(34, 50, 56, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(8px);
  opacity: 0;
  animation: reveal 520ms ease-out forwards;
}

.art-card.is-clickable {
  cursor: zoom-in;
}

.art-card.is-clickable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sea) 62%, white);
  outline-offset: 2px;
}

.art-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.art-card figcaption {
  padding: 0.8rem 0.9rem 0.9rem;
  font-size: 0.92rem;
}

.empty-state {
  margin-top: 1rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--ink) 70%, white);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 20, 22, 0.78);
  backdrop-filter: blur(3px);
}

.gallery-lightbox-frame {
  width: min(980px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.gallery-lightbox-close {
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.gallery-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-weight: 600;
}

.story-preview p {
  margin: 0;
  max-width: 72ch;
}

.story-prose {
  max-width: 860px;
}

.story-prose p {
  margin: 0 0 1rem;
}

.story-prose p:last-child {
  margin-bottom: 0;
}

.story-timeline-section {
  max-width: 940px;
}

.story-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.3rem;
  border-left: 3px solid color-mix(in srgb, var(--sea) 65%, white);
  display: grid;
  gap: 1rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.1rem;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.8rem;
  align-items: start;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.56rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--sea), var(--sea-deep));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.timeline-year {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sea-deep);
  letter-spacing: 0.02em;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(34, 50, 56, 0.12);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow);
}

.timeline-content h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
}

.timeline-content p {
  margin: 0.4rem 0 0;
}

.story-inline-image {
  margin: 0.2rem 0 1rem;
}

.story-inline-image img {
  display: block;
  width: min(520px, 100%);
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(34, 50, 56, 0.14);
  box-shadow: var(--shadow);
}

.admin-section {
  padding-top: 1.2rem;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(21, 30, 32, 0.58);
  backdrop-filter: blur(4px);
}

.login-card {
  width: min(460px, 100%);
  background: linear-gradient(150deg, #fffdf8, #f2e4cd);
  border: 1px solid rgba(34, 50, 56, 0.16);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
}

.login-card p {
  margin: 0.55rem 0 1rem;
}

.login-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
}

.admin-key-field {
  display: grid;
  gap: 0.35rem;
  min-width: min(340px, 100%);
}

.admin-key-field span {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-key-field input {
  width: 100%;
  border: 1px solid rgba(30, 43, 47, 0.26);
  border-radius: 10px;
  padding: 0.6rem 0.72rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

.admin-key-field input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, white);
  outline-offset: 1px;
}

.admin-status {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.admin-status.is-success {
  color: #1f6d34;
}

.admin-status.is-error {
  color: #8a2d16;
}

.admin-status.is-loading {
  color: color-mix(in srgb, var(--ink) 72%, var(--accent));
}

.contact {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.contact-card {
  background: linear-gradient(160deg, #fffdf8, #f1e2ca);
  border: 1px solid rgba(34, 50, 56, 0.12);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.contact-label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  color: var(--sea-deep);
  font-weight: 700;
}

.contact-value {
  margin: 0.5rem 0 0.35rem;
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.contact-field {
  display: grid;
  gap: 0.34rem;
}

.contact-field span {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(34, 50, 56, 0.24);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

.contact-field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sea) 58%, white);
  outline-offset: 1px;
}

.contact-note {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.92;
}

.contact-note.is-success {
  color: #1f6d34;
}

.contact-note.is-error {
  color: #8a2d16;
}

.contact-note.is-loading {
  color: color-mix(in srgb, var(--ink) 72%, var(--sea));
}

.imprint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 1rem;
}

.imprint-card {
  margin: 0;
  background: linear-gradient(160deg, #fffdf8, #f1e2ca);
  border: 1px solid rgba(34, 50, 56, 0.12);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.imprint-card h3 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
}

.imprint-card p {
  margin: 0;
}

.imprint-card a {
  color: var(--ink);
  font-weight: 700;
}

.imprint-wide {
  grid-column: 1 / -1;
}

.legal-main {
  padding-top: 2rem;
}

.legal-header {
  padding-top: 1.4rem;
  padding-bottom: 0;
}

.legal-header .top-menu {
  margin: 0;
}

.legal-tools {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}

footer {
  padding: 1.2rem 0 2rem;
  font-size: 0.92rem;
  opacity: 0.78;
}

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

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

@media (max-width: 820px) {
  .hero-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-portrait img {
    width: min(360px, 100%);
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .imprint-grid {
    grid-template-columns: 1fr;
  }

  .imprint-wide {
    grid-column: auto;
  }
}
