/* ==========================================================================
   ÓTICA MARIANA — DESIGN TOKENS
   Paleta: tinta (ink) para transmitir precisão/confiança + dourado (lente)
   para o calor da marca + um verde-azulado discreto para "clareza/visão".
   Tipografia: Fraunces (display, com eixo óptico de tamanho — referência
   literal ao universo da ótica) + Public Sans (leitura) + IBM Plex Mono
   (dados: telefones, horários, endereço — dá precisão de "ficha técnica").
   ========================================================================== */
:root {
    /* Cor */
    --ink: #14181d;
    --ink-2: #232b36;
    --paper: #f3f1ea;
    --paper-dim: #e8e5da;
    --gold: #b8873c;
    --gold-dark: #8f6a2c;
    --teal: #2f6b66;
    --line: rgba(20, 24, 29, 0.12);
    --line-on-dark: rgba(255, 255, 255, 0.14);
    --white: #ffffff;

    /* Tipografia */
    --font-display: "Fraunces", "Georgia", serif;
    --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "IBM Plex Mono", monospace;

    /* Layout */
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-pill: 999px;
    --container: 1180px;
    --gap: clamp(1.25rem, 3vw, 2.5rem);

    /* Movimento */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ==========================================================================
   ÍCONES — desenhados via mask (sem dependência de fontes externas),
   herdam a cor do texto ao redor (currentColor).
   ========================================================================== */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    vertical-align: -0.15em;
}
.icon--whatsapp { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.5 3.5A10.6 10.6 0 0 0 3 16.9L2 22l5.2-1.4A10.6 10.6 0 0 0 12 21.6h.1A10.5 10.5 0 0 0 20.5 3.5ZM12 19.7a8.7 8.7 0 0 1-4.4-1.2l-.3-.2-3.1.9.9-3-.2-.3A8.7 8.7 0 1 1 20.6 12 8.6 8.6 0 0 1 12 19.7Zm4.8-6.5c-.3-.1-1.5-.7-1.7-.8s-.4-.1-.5.1-.6.8-.7.9-.3.1-.5 0a7 7 0 0 1-2.1-1.3 8 8 0 0 1-1.4-1.8c-.2-.3 0-.4.1-.6l.4-.4a1.8 1.8 0 0 0 .2-.4.4.4 0 0 0 0-.4c-.1-.1-.5-1.3-.7-1.8s-.4-.4-.5-.4h-.5a.9.9 0 0 0-.6.3 2.8 2.8 0 0 0-.9 2.1 4.9 4.9 0 0 0 1 2.6 11.3 11.3 0 0 0 4.4 3.9c.6.3 1.1.4 1.5.6a3.5 3.5 0 0 0 1.6.1 2.7 2.7 0 0 0 1.8-1.2 2.2 2.2 0 0 0 .1-1.2c0-.1-.2-.2-.5-.3Z'/></svg>"); }
.icon--repair { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'><path d='M14.7 6.3a4 4 0 0 0-5.4 4.9L3 17.5V21h3.5l6.3-6.3a4 4 0 0 0 4.9-5.4l-2.6 2.6-2.2-.5-.5-2.2Z'/></svg>"); }
.icon--eye { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'><path d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z'/><circle cx='12' cy='12' r='3'/></svg>"); }
.icon--arrow { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>"); }
.icon--check { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12.5l5 5L20 6.5'/></svg>"); }
.icon--chevron-left { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 5l-7 7 7 7'/></svg>"); }
.icon--chevron-right { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 5l7 7-7 7'/></svg>"); }
.icon--star { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2.9 6.26L21.8 9l-5.06 4.64L18.2 21 12 17.27 5.8 21l1.46-7.36L2.2 9l6.9-.74Z'/></svg>"); }
.icon--quote { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.2 5.5C4.3 7 2.8 9.4 2.8 12.4c0 2.7 1.7 4.4 3.7 4.4a3 3 0 0 0 3-3c0-1.6-1.1-2.8-2.6-3-.1-1.4.9-3 2.7-3.9L7.2 5.5Zm9 0c-2.9 1.5-4.4 3.9-4.4 6.9 0 2.7 1.7 4.4 3.7 4.4a3 3 0 0 0 3-3c0-1.6-1.1-2.8-2.6-3-.1-1.4.9-3 2.7-3.9l-2.4-1.4Z'/></svg>"); }

/* ==========================================================================
   UTILITÁRIOS
   ========================================================================== */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 0.75rem;
}
.mono { font-family: var(--font-mono); }
.section-title {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.section-heading { display: flex; align-items: center; gap: 1.25rem; margin: 0 auto 3rem; max-width: var(--container); padding: 0 1.5rem; }
.section-heading__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.rule { flex: 1; border: none; border-top: 1px solid var(--line); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.7rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary {
    background: var(--gold);
    color: var(--ink);
}
.btn--primary:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-2px); }
.btn--ghost {
    border: 1.5px solid var(--line-on-dark);
    color: inherit;
}
.btn--ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(20, 24, 29, 0.92);
    border-bottom: 1px solid var(--line-on-dark);
}
.header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--paper);
}
.header__logo { height: 46px; width: auto; }
.header__nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0;
    position: relative;
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 1.5px;
    background: var(--gold);
    transition: right 0.3s var(--ease);
}
.nav__link:hover::after { right: 0; }
.nav__link--cta {
    background: var(--gold);
    color: var(--ink);
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-pill);
    transition: background-color 0.25s var(--ease);
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: var(--white); }

.header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}
.header__toggle span {
    width: 24px;
    height: 2px;
    background: var(--paper);
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    min-height: 640px;
}
.hero__snellen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(4rem, 16vw, 11rem);
    letter-spacing: 0.3em;
    color: rgba(243, 241, 234, 0.045);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}
.hero__content {
    position: relative;
    padding: 4rem 1.5rem 3rem clamp(1.5rem, 6vw, 6rem);
    max-width: 640px;
}
.hero__title {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.08;
    margin-bottom: 1.25rem;
}
.hero__subtitle {
    font-size: 1.05rem;
    color: rgba(243, 241, 234, 0.78);
    max-width: 46ch;
    margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.hero__status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(243, 241, 234, 0.7);
}
.status__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--teal);
}
.status__dot--closed { background: #a35a3a; }

.hero__media {
    position: relative;
    height: 100%;
    min-height: 460px;
}
.hero__image {
    position: absolute;
    object-position: top;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%);
    mask-image: linear-gradient(to right, transparent, black 12%);
}

/* ==========================================================================
   PROMOÇÕES
   ========================================================================== */
.promo {
    max-width: var(--container);
    margin: -70px auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}
.promo__card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    box-shadow: 0 20px 40px -25px rgba(20, 24, 29, 0.35);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.promo__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 48px -22px rgba(20, 24, 29, 0.4);
}
.promo__card .icon {
    font-size: 1.9rem;
    color: var(--gold-dark);
    margin-bottom: 1rem;
}
.promo__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}
.promo__text { color: #4b5259; margin-bottom: 1.25rem; }
.promo__link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.25s var(--ease);
}
.promo__link:hover { gap: 0.7rem; }

/* ==========================================================================
   SOBRE
   ========================================================================== */
.about {
    max-width: var(--container);
    margin: 0 auto;
    padding: 7rem 1.5rem 5rem;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.about__media {
    border-radius: var(--radius-md);
    overflow: hidden;
}
.about__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}
.about__media:hover .about__image {
    transform: scale(1);
}
.about__text { color: #4b5259; margin-bottom: 1.5rem; max-width: 56ch; }
.about__list { display: flex; flex-direction: column; gap: 0.7rem; }
.about__list li { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; }
.about__list .icon { color: var(--teal); font-size: 1.1rem; flex-shrink: 0; }

/* ==========================================================================
   GALERIA
   ========================================================================== */
.gallery { padding: 2rem 1.5rem 6rem; text-align: center; }
.gallery__hint { font-size: 0.85rem; color: #6b7178; margin-bottom: 2rem; }
.carousel {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}
.carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -28px rgba(20, 24, 29, 0.45);
    scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: filter 0.5s var(--ease), transform 0.5s var(--ease);
}
.carousel__slide:hover img,
.carousel__slide:focus-within img {
    transform: scale(1);
}
.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 6px 16px rgba(20,24,29,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.carousel__arrow:hover { background: var(--gold); transform: translateY(-50%) scale(1.06); }
.carousel__arrow--prev { left: -21px; }
.carousel__arrow--next { right: -21px; }
.carousel__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.carousel__dots button {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--line);
    transition: background-color 0.25s var(--ease), width 0.25s var(--ease);
}
.carousel__dots button[aria-selected="true"] {
    background: var(--gold-dark);
    width: 22px;
    border-radius: var(--radius-pill);
}

/* ==========================================================================
   AVALIAÇÕES
   Conteúdo populado via JS a partir de avaliacoes.json (ver script.js).
   ========================================================================== */
.reviews {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem 1.5rem 6rem;
    text-align: center;
}
.reviews__summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.75rem;
}
.reviews__average {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
}
.reviews__stars { display: inline-flex; gap: 2px; font-size: 1.15rem; }
.reviews__stars .icon--star,
.review-card__stars .icon--star {
    color: var(--paper-dim);
}
.reviews__stars .icon--star.is-filled,
.review-card__stars .icon--star.is-filled {
    color: var(--gold);
}
.reviews__count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #6b7178;
}

.reviews__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: var(--gap);
    text-align: left;
}
.reviews__loading,
.reviews__error {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7178;
    font-size: 0.95rem;
}

.review-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.9rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 36px -26px rgba(20, 24, 29, 0.35);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 44px -22px rgba(20, 24, 29, 0.4);
}
.review-card__stars {
    display: flex;
    gap: 2px;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}
.review-card__quote {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    opacity: 0.6;
}
.review-card__text {
    color: #3c4149;
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}
.review-card__meta {
    font-size: 0.85rem;
    color: #6b7178;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
}
.review-card__name { color: var(--ink); }

/* ==========================================================================
   LOCALIZAÇÃO
   ========================================================================== */
.location { padding: 2rem 1.5rem 6rem; }
.location__grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--gap);
    align-items: stretch;
}
.location__map {
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 340px;
    position: relative;
}
.location__map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.15);
    transition: filter 0.4s var(--ease);
}
.location__map:hover iframe,
.location__map iframe:focus { filter: grayscale(0); }
.location__card {
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}
.location__label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.location__address { font-size: 1.05rem; line-height: 1.7; margin-bottom: 0.5rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--ink); color: var(--paper); padding: 4rem 1.5rem 2rem; }
.footer__grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
.footer__col { text-align: center; }
.footer__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 1rem; }
.btn--footer {
    display: inline-block;
    border: 1.5px solid var(--line-on-dark);
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
    transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--footer:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.footer__text { color: rgba(243, 241, 234, 0.75); font-size: 0.92rem; line-height: 1.7; }
.footer__signature {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-on-dark);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(243, 241, 234, 0.5);
}

/* ==========================================================================
   RESPONSIVO — mobile-first: as regras acima já cobrem telas pequenas
   (grids empilham naturalmente onde necessário); os breakpoints abaixo
   ativam o layout multi-coluna a partir de tablet/desktop.
   ========================================================================== */
@media (max-width: 900px) {
    .header__nav {
        position: fixed;
        top: 66px;
        left: 0; right: 0;
        background: var(--ink);
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1.5rem;
        gap: 0.75rem;
        transform: translateY(-140%);
        transition: transform 0.35s var(--ease);
        border-bottom: 1px solid var(--line-on-dark);
    }
    .header__nav.is-open { transform: translateY(0); }
    .nav__link--cta { text-align: center; justify-content: center; }
    .header__toggle { display: flex; }

    .hero { grid-template-columns: 1fr; }
    .hero__media { min-height: 340px; order: -1; }
    .hero__image { mask-image: linear-gradient(to bottom, black 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent); }
    .hero__content { padding: 2.5rem 1.5rem; max-width: 100%; }

    .promo { grid-template-columns: 1fr; margin-top: -40px; }
    .about { grid-template-columns: 1fr; padding-top: 4rem; }
    .about__media { order: -1; }

    .location__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .hero__content { padding-left: 3rem; }
}
