:root {
  --cream: #f7f3ee;
  --warm-white: #fdfaf6;
  --brown-dark: #3b2a1a;
  --brown-mid: #3d2b1f;
  --brown-light: #a07850;
  --green-forest: #4a6741;
  --green-light: #d4e8c2;
  --border: #d6c8b8;
  --text-muted: #3d2b1f;
}

@font-face {
  font-family: 'UnifrakturMaguntia';
  src: url('./fonts/UnifrakturMaguntia-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── Base ── */

html,
body {
  height: 100%;
  margin: 0;
  font-family: serif;
  font-size: 16px;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0;
  font-weight: bold;
}

p {
  margin: 15px 0;
  font-size: 19px;
  color: var(--text-muted);
}

/* ── Header ── */

#header {
  position: relative;
  height: 140px;
  margin-bottom: -60px;
  padding-bottom: 60px;
  padding-top: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  background-image: url(images/header3.png);
  background-size: auto 100%;
  background-position: left;
}

#headerContent {
  font-size: 42px;
  font-family: 'UnifrakturMaguntia';
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.8);
  color: #000000;
  padding: 5px 5px 5px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.stamp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  background-color: white;
  border-radius: 50%;
  margin-right: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.stamp-icon img {
  object-fit: contain;
  transform: rotate(-45deg);
}

/* ── Sidebar ── */

.sideBar {
  width: 250px;
  background-color: #34495e;
  padding: 130px 20px 20px 20px;
  box-sizing: border-box;
  position: sticky;
  top: 140px;
  min-height: calc(100% - 140px - 80px);
  background-image: url(images/menubar2.png);
  box-shadow:
    10px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 10px 20px rgba(0, 0, 0, 0.8);
}

.menu nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0 -20px;
}

.menu nav ul li {
  margin: 0;
}

.menu nav ul li a {
  position: relative;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #2c1a0e;
  background: transparent;
  display: block;
  padding: 15px 16px 15px 24px;
  transition: background 0.2s ease;
}

.menu nav ul li a::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 12px;
  background: rgba(20, 10, 5, 0.18);
  transition: background 0.2s ease;
}

.menu nav ul li a:hover {
  background: rgba(20, 10, 5, 0.2);
}

.menu nav ul li a:focus-visible {
  outline: 2px solid #4a6741;
  outline-offset: -2px;
}

.menu nav ul li a.current {
  background: rgba(20, 10, 5, 0.2);
  font-weight: bold;
}

.menu nav ul li a.current::after {
  background: #4a6741;
}

.menu nav ul ul {
  margin: 0;
  padding: 0;
}

.menu nav ul ul li {
  margin: 0;
}

.menu nav ul ul li a {
  font-size: 0.95rem;
  padding: 13px 16px 13px 46px;
  color: #2c1a0e;
}

.menu nav ul ul li a::after {
  left: 30px;
}

.menu nav ul ul li a:hover {
  background: rgba(20, 10, 5, 0.2);
}

.menu nav ul ul li a.current {
  background: rgba(20, 10, 5, 0.2);
  font-weight: bold;
}

/* ── Page layout ── */

#page {
  display: flex;
  flex-direction: row;
  background-image: url(images/seina.png);
}

#content {
  flex: 1;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 130px 20px 50px 20px;
  overflow-y: visible;
}

#paperFrame {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px - 80px);
  height: auto;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  padding: 40px;
  position: relative;
  z-index: 0;
}

#paperContent {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#paperFrame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fffef0;
  box-shadow:
    2px 3px 20px black,
    0 0 60px #8a4d0f inset;
  background-size: cover;
  filter: url(#wavyPaper);
  z-index: -1;
  background-image: url(images/paperTexture.png);
}

#nailImage {
  position: absolute;
  width: 50px;
  height: auto;
  z-index: 10;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Footer ── */

footer {
  height: 80px;
  display: flex;
  align-items: center;
  color: #ffffff;
  padding: 0 20px;
  bottom: 0;
  margin: -20px 0 -20px -20px;
  background-image: url(images/footer3.png);
  background-size: auto 100%;
  background-position: left;
  filter: url(#wavyStone);
  position: relative;
  z-index: 1;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.8),
    inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

svg {
  height: 0;
}

#menuToggle {
  display: none;
}

.menu-overlay {
  display: none;
}

/* ── Page content components ── */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 1rem;
}

/* Cards */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 1.5rem 0;
}

.card,
.card-plain,
.card-plain-wide,
.card-icon-wide {
  background: transparent;
  border: 1px solid rgba(59, 42, 26, 0.38);
  border-radius: 2px;
  padding: 1.25rem;
  box-shadow: inset 0 0 0 3px rgba(59, 42, 26, 0.04);
  display: flex;
  flex-direction: column;
}

.card > a,
.card-plain > a,
.card-plain-wide > a,
.card-icon-wide > a {
  margin-top: auto;
  margin-bottom: 0;
}

.card,
.card-plain {
  flex: 1 1 200px;
}

.card-plain-wide,
.card-icon-wide {
  flex: 1 1 calc(50% - 7px);
  min-width: 0;
  overflow-wrap: break-word;
}

.card-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
  text-align: center;
}

.card h3,
.card-plain h3,
.card-plain-wide h3,
.card-icon-wide h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--brown-dark);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(59, 42, 26, 0.35);
  text-shadow: 0.5px 0.5px 0.7px rgba(59, 42, 26, 0.35);
  text-align: center;
}

.card p,
.card-plain p,
.card-plain-wide p,
.card-icon-wide p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  text-shadow: 0.3px 0.3px 0.5px rgba(59, 42, 26, 0.2);
}

.card-plain,
.card-plain-wide {
  padding: 0.9rem 1rem;
}

.card-plain h3,
.card-plain-wide h3 {
  margin-top: 0;
  text-align: left;
}

.card ul,
.card-plain ul,
.card-plain-wide ul,
.card-icon-wide ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.card li,
.card-plain li,
.card-plain-wide li,
.card-icon-wide li {
  padding: 3px 0;
  border-bottom: 1px dotted rgba(59, 42, 26, 0.3);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.card-plain p + p,
.card-plain-wide p + p {
  margin-top: 0.5rem;
}

/* Quote */

.quote-block {
  border-left: 3px solid rgba(59, 42, 26, 0.45);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.quote-block p {
  font-style: italic;
  font-size: 19px;
  color: var(--brown-mid);
  line-height: 1.75;
  margin: 0;
  text-shadow: 0.4px 0.4px 0.6px rgba(59, 42, 26, 0.25);
}

/* Section label */

.section-label {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2rem 0 0.75rem;
}

/* Vitsi */

.vitsi-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-bottom: 1rem;
}

.vitsi-grid.js-ready {
  scrollbar-width: none;
}
.vitsi-grid.js-ready::-webkit-scrollbar {
  display: none;
}

.vitsi-page {
  display: flex;
  flex-shrink: 0;
  width: 100%;
  scroll-snap-align: start;
}

.vitsi {
  flex: 1;
  min-height: 5rem;
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid rgba(59, 42, 26, 0.38);
  border-radius: 2px;
  padding: 0.9rem 1rem;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
  box-shadow: inset 0 0 0 3px rgba(59, 42, 26, 0.04);
  text-shadow: 0.3px 0.3px 0.5px rgba(59, 42, 26, 0.2);
}


.vitsi-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
}

.vitsi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(59, 42, 26, 0.18);
  border: 1px solid rgba(59, 42, 26, 0.28);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s;
}

.vitsi-dot.active {
  background: rgba(59, 42, 26, 0.55);
}

.vitsi-arrow {
  background: transparent;
  border: none;
  color: var(--brown-dark);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 0.25rem;
  transition: color 0.2s;
}

.vitsi-arrow:hover {
  color: rgba(59, 42, 26, 0.6);
}

/* Divider */

.divider {
  border-top: 1px solid #a08060;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.divider + .section-label {
  margin-top: 0;
}

/* Footer CTA */

.footer-cta {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid #a08060;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-cta h2 {
  font-size: 25px;
  font-weight: bold;
  color: var(--brown-dark);
  margin-bottom: 4px;
}

.footer-cta p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
}

.badge {
  background: var(--green-forest);
  color: var(--green-light);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 8px 18px;
  border-radius: 2px;
  white-space: nowrap;
  margin-bottom: 1.5rem;
  display: inline-block;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Contact */

.yhteystiedot a {
  color: var(--brown-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 42, 26, 0.35);
}

.yhteystiedot a:hover {
  border-bottom-color: rgba(59, 42, 26, 0.6);
}

/* Map */

.map-wrapper {
  border: 1px solid rgba(59, 42, 26, 0.38);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(59, 42, 26, 0.04);
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
}
