/*
Theme Name: Castillo Clinic
Theme URI: https://castilloodontologia.com.br
Author: Codex
Description: Tema institucional sob medida para Castillo Odontologia & Estetica.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: castillo-clinic
*/

:root {
  --ink: #171515;
  --ink-soft: #3d3a35;
  --muted: #6f6a61;
  --line: #e9e3da;
  --paper: #fffdfa;
  --warm: #f6f0e8;
  --sage: #6e8369;
  --sage-deep: #3f5b46;
  --gold: #b09a68;
  --mist: #edf3ef;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(33, 29, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(110, 131, 105, 0.55);
  outline-offset: 4px;
}

.skip-link {
  left: 20px;
  position: fixed;
  top: 16px;
  transform: translateY(-160%);
  z-index: 1000;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  min-height: 100vh;
  overflow: clip;
}

.site-header {
  align-items: center;
  background: rgba(255, 253, 250, 0.91);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(233, 227, 218, 0.78);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  left: 0;
  min-height: 78px;
  padding: 16px clamp(20px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 50;
}

.brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  height: 38px;
  object-fit: contain;
  width: min(188px, 42vw);
}

.nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: clamp(14px, 2.1vw, 28px);
  justify-content: center;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--sage-deep);
}

.header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: none;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  background: currentColor;
  content: "";
  display: block;
  height: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 18px;
}

.menu-toggle span {
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  left: 0;
  position: absolute;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.menu-open .menu-toggle span {
  background: transparent;
}

.menu-open .menu-toggle span::before {
  background: var(--ink);
  transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-toggle span::after {
  background: var(--ink);
  transform: translateY(-6px) rotate(-45deg);
}

.button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

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

.button.primary {
  background: var(--sage-deep);
  border: 1px solid var(--sage-deep);
  color: var(--white);
}

.button.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 21, 21, 0.16);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--sage-deep);
  color: var(--sage-deep);
}

.hero {
  background:
    linear-gradient(90deg, rgba(255, 253, 250, 0.98) 0%, rgba(255, 253, 250, 0.86) 43%, rgba(246, 240, 232, 0.28) 100%),
    radial-gradient(circle at 82% 22%, rgba(110, 131, 105, 0.2), transparent 34%),
    linear-gradient(135deg, var(--paper), var(--warm));
  min-height: min(830px, calc(100svh - 78px));
  position: relative;
}

.hero::after {
  background-image:
    linear-gradient(rgba(23, 21, 21, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 21, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  inset: 0;
  opacity: 0.34;
  pointer-events: none;
  position: absolute;
}

.hero-inner {
  align-items: stretch;
  display: grid;
  gap: clamp(28px, 5vw, 76px);
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  margin: 0 auto;
  max-width: 1440px;
  min-height: min(830px, calc(100svh - 78px));
  padding: clamp(34px, 5.5vw, 64px) clamp(20px, 5vw, 72px) clamp(30px, 5vw, 54px);
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: center;
  max-width: 780px;
}

.eyebrow {
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.hero-logo {
  margin: 0 0 clamp(18px, 2.8vw, 30px);
  max-width: min(520px, 86vw);
  width: 100%;
}

.hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.45rem, 5.6vw, 5.75rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  max-width: 920px;
}

.hero-lede {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.34rem);
  margin: 22px 0 0;
  max-width: 620px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-proof {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.92rem;
  gap: 12px;
  margin-top: 22px;
}

.hero-proof span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.hero-proof span::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.hero-panel {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.72);
  border-left: 1px solid rgba(176, 154, 104, 0.28);
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 360px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  position: relative;
}

.hero-panel::before {
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.8)),
    url("assets/img/castillo-logo-cropped.png") center 34% / min(620px, 125%) auto no-repeat;
  content: "";
  inset: 0;
  opacity: 0.08;
  position: absolute;
}

.hero-panel-content {
  align-self: end;
  position: relative;
  z-index: 1;
}

.hero-panel h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 2.6vw, 2.85rem);
  font-weight: 500;
  line-height: 1;
  margin: 0 0 18px;
}

.hero-panel p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0;
}

.section {
  padding: clamp(64px, 9vw, 124px) clamp(20px, 5vw, 72px);
}

.section.alt {
  background: var(--warm);
}

.section-inner {
  margin: 0 auto;
  max-width: 1240px;
}

.section-kicker {
  color: var(--sage-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.1rem, 4.6vw, 4.35rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  max-width: 850px;
}

.section-lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  margin: 20px 0 0;
  max-width: 680px;
}

.treatment-list {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 76px);
}

.treatment {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: clamp(18px, 3vw, 48px);
  grid-template-columns: minmax(120px, 0.36fr) minmax(0, 1fr) auto;
  padding: clamp(22px, 3.5vw, 36px) 0;
}

.treatment-number {
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.9;
}

.treatment h3 {
  font-size: clamp(1.22rem, 2vw, 1.68rem);
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 8px;
}

.treatment p {
  color: var(--muted);
  margin: 0;
  max-width: 670px;
}

.treatment-tag {
  align-self: center;
  border: 1px solid rgba(110, 131, 105, 0.26);
  border-radius: 999px;
  color: var(--sage-deep);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.process {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 6vw, 72px);
}

.process-step {
  background: rgba(255, 255, 255, 0.68);
  min-height: 260px;
  padding: clamp(24px, 3vw, 34px);
}

.process-step strong {
  color: var(--gold);
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: 42px;
}

.process-step h3 {
  font-size: 1.08rem;
  margin: 0 0 10px;
}

.process-step p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.trust-layout {
  align-items: end;
  display: grid;
  gap: clamp(34px, 6vw, 92px);
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.5fr);
}

.trust-copy {
  max-width: 760px;
}

.trust-notes {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 24px;
  padding-left: clamp(24px, 4vw, 44px);
}

.trust-note {
  display: grid;
  gap: 8px;
}

.trust-note span {
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trust-note p {
  color: var(--ink-soft);
  margin: 0;
}

.contact {
  background: var(--ink);
  color: var(--white);
  padding: clamp(64px, 10vw, 128px) clamp(20px, 5vw, 72px);
}

.contact-inner {
  align-items: end;
  display: grid;
  gap: clamp(32px, 7vw, 96px);
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.42fr);
  margin: 0 auto;
  max-width: 1240px;
}

.contact .section-kicker {
  color: #c9b987;
}

.contact h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 850px;
}

.contact p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.06rem;
  margin: 24px 0 0;
  max-width: 640px;
}

.contact-actions {
  display: grid;
  gap: 14px;
}

.contact .button.primary {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

.contact .button.primary:hover {
  background: #ded0ae;
  border-color: #ded0ae;
}

.contact .button.secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--white);
}

.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
  padding: 26px clamp(20px, 5vw, 72px);
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
}

.footer-inner p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    min-height: 72px;
  }

  .nav {
    background: rgba(255, 253, 250, 0.98);
    border-top: 1px solid var(--line);
    bottom: 0;
    display: none;
    flex-direction: column;
    justify-content: start;
    left: 0;
    padding: 32px 20px;
    position: fixed;
    right: 0;
    top: 72px;
  }

  .menu-open .nav {
    display: flex;
  }

  .nav a {
    font-size: 1.18rem;
  }

  .header-actions .button {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 44px;
  }

  .hero-panel {
    display: none;
  }

  .process,
  .trust-layout,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .trust-notes {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }
}

@media (max-width: 1120px) {
  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    gap: 0;
    grid-template-columns: 1fr;
    padding-bottom: 38px;
    padding-top: 38px;
  }

  .hero-panel {
    display: none;
  }

  .hero-logo {
    max-width: min(430px, 82vw);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand img {
    height: 36px;
    width: min(168px, 54vw);
  }

  .hero-inner,
  .section,
  .contact,
  .site-footer {
    padding-inline: 18px;
  }

  .hero-inner {
    gap: 0;
    padding-bottom: 42px;
    padding-top: 32px;
  }

  .hero-logo {
    margin-bottom: 16px;
    max-width: min(270px, 82vw);
  }

  .hero h1 {
    font-size: clamp(2.05rem, 10vw, 2.85rem);
  }

  .hero-lede {
    font-size: 1rem;
    margin-top: 18px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-proof {
    font-size: 0.86rem;
    margin-top: 18px;
  }

  .hero-actions .button.secondary {
    display: none;
  }

  .hero-actions,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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

  .treatment-tag {
    justify-self: start;
  }

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