:root {
  --bg: #f9f3e9;
  --surface: #fffdf7;
  --surface-soft: #f4ead8;
  --ink: #2a2116;
  --muted: #655647;
  --line: #d8c9ae;
  --primary: #483112;
  --accent: #233247;
  --overlay: rgba(35, 50, 71, 0.62);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg), #ede1cc);
}

.topbar {
  background: #f3e7d3;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: var(--primary);
  font-family: "Literata", serif;
  font-weight: 700;
}

.main-nav {
  width: 100%;
}

.menu-root,
.menu-root ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-root {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.menu-root > li {
  position: relative;
}

.menu-root > li > a {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}

.menu-root > li:hover > a {
  background: var(--surface-soft);
}

.menu-root li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(35, 50, 71, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.menu-root li:hover ul,
.menu-root li:focus-within ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-root li ul a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #eee5d7;
}

.menu-root li ul li:last-child a {
  border-bottom: 0;
}

.menu-root li ul a:hover {
  background: var(--surface-soft);
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.1rem;
}

.hero {
  position: relative;
  min-height: 240px;
  border-radius: 14px;
  overflow: hidden;
  background-image: url("assets/images/about-hero-st-philopateer.jpeg");
  background-size: cover;
  background-position: center;
  border: 1px solid #bda988;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  margin: 0;
  font-family: "Literata", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero p {
  margin-top: 0.65rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.card h2 {
  margin: 0 0 0.6rem;
  color: var(--primary);
  font-family: "Literata", serif;
}

.card p {
  margin: 0.4rem 0 0.9rem;
  color: var(--muted);
}

.card a {
  color: var(--accent);
}

form {
  display: grid;
  gap: 0.55rem;
}

label {
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid #ccb99a;
  border-radius: 8px;
  padding: 0.58rem 0.65rem;
  font: inherit;
  background: #fff;
}

button {
  margin-top: 0.45rem;
  width: fit-content;
  border: 1px solid #1b2737;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

button:hover {
  background: #1c2a3d;
}

.social-links {
  display: grid;
  gap: 0.6rem;
}

.social-links a {
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  border: 1px solid #c5b091;
  background: #fbf6ee;
  color: var(--accent);
  border-radius: 8px;
  padding: 0.52rem 0.74rem;
  font-weight: 700;
}

.social-links a:hover {
  background: #f2e6d3;
}

.page-footer {
  max-width: 1160px;
  margin: 0 auto 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ece0cd;
  color: #4b3f31;
  padding: 0.8rem 1rem;
}

.page-footer p {
  margin: 0.2rem 0;
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-root {
    justify-content: flex-start;
    gap: 0.2rem;
  }

  .menu-root li ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 0.15rem;
    display: none;
  }

  .menu-root > li:hover ul,
  .menu-root > li:focus-within ul {
    display: block;
  }

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

  .hero {
    min-height: 200px;
  }

  .hero-content {
    padding: 3rem 1rem;
  }
}