:root {
  --paper: #F5F7F6; --wall: #D6E6E3; --wall-deep: #B9D3CE;
  --ink: #1B2530; --ink-soft: #4A5661; --night: #1B2530; --night-2: #243140;
  --wood: #8A5A3B; --indigo: #3F3A8C; --indigo-deep: #2E2A6B; --white: #FFFFFF;
  --wrap: 72rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 "Schibsted Grotesk", system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--indigo); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #F2A541; outline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .75rem; line-height: 1.12; letter-spacing: -.015em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { --wrap: 46rem; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--white); padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: .5rem; }
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-lead { color: var(--ink-soft); max-width: 40rem; margin-bottom: 2rem; }

.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; background: var(--indigo); color: var(--white);
  padding: .8rem 1.4rem; border-radius: 6px; border: 2px solid var(--indigo); transition: background .15s; }
.btn:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); padding: .55rem 1rem; font-size: .95rem; white-space: nowrap; }
.btn-line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Hero: o prisma decompõe a luz nas formas de usar a sala */
.hero { background: var(--night); color: #E9EEF0; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--white); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: #C9D3D8; text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--white); text-decoration: underline; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; align-items: center; padding-top: clamp(1.5rem, 5vw, 3.5rem); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; color: var(--white); max-width: 14ch; margin-bottom: 1.4rem; }
.lead { font-size: 1.15rem; color: #C9D3D8; max-width: 34rem; margin-bottom: 1.6rem; }
.hero .btn { background: var(--white); color: var(--night); border-color: var(--white); }
.hero .btn:hover { background: var(--wall); border-color: var(--wall); }
.where { margin-top: 1.2rem; font-size: .95rem; color: #9AA8B1; }

.prism { margin: 0; }
.prism svg { width: 100%; height: auto; overflow: visible; }
.prism figcaption { font-size: .85rem; color: #8796A0; text-align: right; margin-top: .25rem; }
.beam { stroke-width: 5; stroke-linecap: round; fill: none; }
.glass { fill: rgba(214, 230, 227, .10); stroke: #E9EEF0; stroke-width: 2.5; stroke-linejoin: round; }
.glass-edge { stroke: #E9EEF0; stroke-width: 1.2; opacity: .35; }
.ray { cursor: pointer; text-decoration: none; }
.ray-out { fill: var(--c); opacity: .85; transition: opacity .2s; }
.ray-in { stroke: var(--c); stroke-width: 2; opacity: .55; }
.ray-name { fill: var(--white); font-size: 21px; font-weight: 700; }
.ray-price { fill: var(--c); font-size: 17px; font-weight: 600; }
.ray:hover .ray-out, .ray:focus-visible .ray-out { opacity: 1; }
.ray:hover .ray-name, .ray:focus-visible .ray-name { text-decoration: underline; }
.prism:has(.ray:hover) .ray:not(:hover) .ray-out { opacity: .35; }

/* Um único momento animado: o feixe entra e as cores se abrem */
@media (prefers-reduced-motion: no-preference) {
  .beam { stroke-dasharray: 270; stroke-dashoffset: 270; animation: draw .7s ease-out .2s forwards; }
  .ray-out { transform-origin: 342px 208px; transform: scaleX(0); animation: fan .6s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.85s + var(--i) * .08s); }
  .ray text { opacity: 0; animation: show .4s ease-out forwards; animation-delay: calc(1.2s + var(--i) * .08s); }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fan { to { transform: scaleX(1); } }
  @keyframes show { to { opacity: 1; } }
}

/* Planos */
.plan-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #C9D3D0; }
.plan { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem 2rem; align-items: center;
  padding: 1.4rem 0 1.4rem 1.4rem; border-bottom: 1px solid #C9D3D0; position: relative; }
.plan::before { content: ""; position: absolute; left: 0; top: 1.4rem; bottom: 1.4rem; width: 6px; border-radius: 3px; background: var(--c); }
.plan h3 { margin: 0 0 .15rem; font-size: 1.35rem; }
.plan-name p { margin: 0; color: var(--ink-soft); }
.plan-price { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.plan-price .cur { font-size: 1rem; font-weight: 600; margin-right: .25rem; color: var(--ink-soft); }
.plan-price .per { font-size: .95rem; font-weight: 500; margin-left: .4rem; color: var(--ink-soft); letter-spacing: 0; }
.plan:target { background: var(--white); }

/* Incluso: na cor das paredes da clínica */
.included { background: var(--wall); }
.inc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.6rem 2.4rem; margin: 1.5rem 0 0; }
.inc-list dt { font-weight: 700; font-size: 1.1rem; margin-bottom: .2rem; }
.inc-list dd { margin: 0; color: #36434C; }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-auto-rows: 11rem; grid-auto-flow: dense; gap: .75rem; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 4px; background: var(--wall); }
.gallery figure.tall { grid-row: span 2; }
.gallery a { display: block; height: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .75rem .5rem; font-size: .9rem; font-weight: 600; color: var(--white);
  background: linear-gradient(transparent, rgba(27, 37, 48, .75)); }

.zoom { border: 0; padding: 0; background: transparent; max-width: min(96vw, 70rem); max-height: 94vh; }
.zoom::backdrop { background: rgba(15, 20, 26, .88); }
.zoom img { max-width: 100%; max-height: 84vh; margin: 0 auto; border-radius: 4px; }
.zoom-cap { color: var(--white); text-align: center; margin: .6rem 0 0; }
.zoom-close { position: fixed; top: .75rem; right: 1rem; font: 700 2rem/1 inherit; color: var(--white); background: none; border: 0; cursor: pointer; padding: .25rem .6rem; }

/* Sobre */
.about { background: var(--white); }
.about-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about p { max-width: 36rem; }
.about img { border-radius: 4px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Perguntas */
.faq details { border-bottom: 1px solid #C9D3D0; }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 500; color: var(--indigo); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); max-width: 40rem; }

/* Contato */
.contact { background: var(--night); color: #E9EEF0; }
.contact h2 { color: var(--white); }
.contact p { color: #C9D3D8; }
.contact .btn { background: var(--white); color: var(--night); border-color: var(--white); }
.contact .btn:hover { background: var(--wall); border-color: var(--wall); }
.contact-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.contact-list { margin: 0; display: grid; gap: 1.2rem; }
.contact-list dt { font-size: .9rem; color: #9AA8B1; }
.contact-list dd { margin: 0; font-size: 1.1rem; }
.contact a:not(.btn) { color: var(--white); }

.foot { background: #131B23; color: #9AA8B1; font-size: .92rem; padding: 1.8rem 0; }
.foot-in { display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: space-between; }
.foot p { margin: 0; }
.foot a { color: #C9D3D8; }

.hero-slim { padding-bottom: 0; }
.prose { padding: 3rem 0 4rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; margin-bottom: 1.5rem; }

@media (max-width: 860px) {
  .hero-in, .about-in, .contact-in { grid-template-columns: 1fr; }
  .plan { grid-template-columns: minmax(0, 1fr) auto; }
  .plan .btn-line { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 520px) {
  .nav { gap: 1rem; font-size: .95rem; }
  .plan { grid-template-columns: 1fr; gap: .6rem; }
  .plan-price { font-size: 1.7rem; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 8rem; gap: .5rem; }
  .gallery figcaption { font-size: .8rem; }
  .prism { overflow: hidden; }
  .prism svg { width: 136%; margin-left: -38%; overflow: hidden; }
  .ray-name { font-size: 22px; }
  .ray-price { font-size: 17px; }
  .ray text { transform: translateX(-14px); }
}
