/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FDF5EB;
  --text-dark: #4A2C2A;
  --text-medium: #6B4F4A;
  --btn-primary: #8B5E3C;
  --btn-hover: #7A5235;
  --btn-active: #6B472E;
  --accent-light: #A67C52;
  --white: #FFFFFF;
  --decoration: #E8DDD0;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', 'Segoe UI', sans-serif;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(74, 44, 42, 0.12);
  --page-max: 480px;
  --page-padding: clamp(16px, 5vw, 32px);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: url('../assets/bg-links.png');
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  background-attachment: scroll;
  color: var(--text-dark);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Page Container ===== */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    max(clamp(16px, 4vw, 24px), env(safe-area-inset-top, 0px))
    max(var(--page-padding), env(safe-area-inset-right, 0px))
    max(clamp(32px, 6vw, 48px), env(safe-area-inset-bottom, 0px))
    max(var(--page-padding), env(safe-area-inset-left, 0px));
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
}

.logo {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.logo__img {
  display: block;
  height: clamp(38px, 10vw, 48px);
  width: auto;
  max-width: min(220px, 70vw);
  object-fit: contain;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.menu-btn:hover {
  background: rgba(139, 94, 60, 0.08);
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--btn-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Divider ===== */
.divider {
  border: none;
  border-top: 1px solid rgba(139, 94, 60, 0.25);
  margin: 0 0 32px;
}

/* ===== Hero ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero__line {
  width: 48px;
  height: 2px;
  background-color: var(--btn-primary);
  margin: 0 auto 20px;
  border-radius: 2px;
}

.hero__description {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  line-height: 1.6;
  color: var(--text-medium);
  max-width: 36ch;
  margin: 0 auto;
  padding: 0 4px;
}

/* ===== Buttons ===== */
.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px clamp(16px, 4vw, 24px);
  background-color: var(--btn-primary);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
}

.btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74, 44, 42, 0.18);
}

.btn:active {
  background-color: var(--btn-active);
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: absolute;
  left: clamp(16px, 4vw, 24px);
}

.btn__icon svg {
  width: 22px;
  height: 22px;
}

.btn__text {
  text-align: center;
}

/* ===== Side Menu ===== */
.side-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}

.side-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.side-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 44, 42, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
}

.side-menu.is-open .side-menu__overlay {
  opacity: 1;
}

.side-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: var(--bg);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(74, 44, 42, 0.15);
}

.side-menu.is-open .side-menu__panel {
  transform: translateX(0);
}

.side-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  margin-bottom: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--btn-primary);
  border-radius: 6px;
  transition: background 0.2s;
}

.side-menu__close:hover {
  background: rgba(139, 94, 60, 0.08);
}

.side-menu__list {
  list-style: none;
}

.side-menu__list li + li {
  border-top: 1px solid rgba(139, 94, 60, 0.15);
}

.side-menu__list a {
  display: block;
  padding: 16px 8px;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, padding-left 0.2s;
}

.side-menu__list a:hover {
  color: var(--btn-primary);
  padding-left: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
  body {
    background-size: cover;
    background-position: bottom center;
  }
}

@media (min-width: 481px) {
  :root {
    --page-max: 520px;
  }
}

@media (min-width: 768px) {
  :root {
    --page-max: 540px;
  }

  body {
    background-attachment: fixed;
    background-size: cover;
    background-position: bottom center;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-max: 560px;
  }

  body {
    background-size: cover;
    background-position: bottom center;
  }
}

/* Telas largas/paisagem: mantém o ornamento inferior sem esticar demais */
@media (min-width: 900px) and (orientation: landscape) {
  body {
    background-size: auto 100%;
    background-position: bottom center;
  }
}

@media (max-width: 380px) {
  .header {
    padding: 14px 0 12px;
  }

  .hero {
    margin-bottom: 28px;
  }

  .links {
    gap: 12px;
  }

  .btn {
    min-height: 48px;
  }
}

/* ===== WhatsApp float ===== */
.whatsapp-float {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding-left: 6px;
  color: var(--white);
  background: linear-gradient(145deg, #34d46a 0%, #128C7E 100%);
  border-radius: 29px 0 0 29px;
  box-shadow: -4px 4px 18px rgba(18, 140, 126, 0.35);
  transform: translateY(-50%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-50%) translateX(-4px);
  box-shadow: -6px 6px 22px rgba(18, 140, 126, 0.45);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .menu-btn span,
  .side-menu__panel,
  .side-menu__overlay,
  .whatsapp-float {
    transition: none;
  }
}
