/* ==========================================================================
   Fernandes Confecções — folha de estilos
   Identidade: fundo branco, texto preto, destaque em vinho #4D0C1C.
   Tipografia: Montserrat (corpo e títulos), Cormorant Garamond itálico (frase da marca).
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light;
  --white: #ffffff;
  --black: #000000;
  --wine: #4d0c1c;
  --text-soft: #3d3b36;
  --surface: #f6f5f1;
  --line: #e2e0d9;

  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-quote: "Cormorant Garamond", Georgia, serif;

  --gutter: 16px;
  --max: 1200px;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--white); z-index: 60; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; font-weight: 500; }
.eyebrow::before { content: ""; width: 44px; height: 5px; background: var(--wine); flex: none; }

/* 3. Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 26px;
  font: 500 11px/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--black); background: var(--black); color: var(--white); cursor: pointer;
  transition: transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: var(--wine); color: var(--white); border-color: var(--wine); }

/* 4. Cabeçalho ------------------------------------------------------------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; }
.brand { display: block; line-height: 0; }
.brand img { height: 52px; width: auto; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; font-weight: 500; padding-block: 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="true"] { box-shadow: inset 0 -1px 0 var(--black); }
@media (max-width: 640px) {
  .brand img { height: 42px; }
  .nav ul { gap: 12px; }
  .nav a { font-size: 10px; letter-spacing: .08em; }
  .nav__long { display: none; }
}
@media (max-width: 380px) {
  .site-header .wrap { gap: 8px; }
  .brand img { height: 36px; }
  .nav ul { gap: 9px; }
  .nav a { font-size: 10px; letter-spacing: .03em; }
}

/* 5. Hero ------------------------------------------------------------------ */
.hero { background: var(--surface); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; padding-block: 48px; }
.hero__brand { min-width: 0; }
.hero__logo { width: min(100%, 560px); height: auto; }
.hero__motto { margin-top: 26px; font-size: 12px; letter-spacing: .34em; text-transform: uppercase; line-height: 2; }
.hero__copy { margin-top: 14px; color: var(--text-soft); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.hero__photos img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: center top; background: var(--wine); }
.hero__photos figcaption { grid-column: 1 / -1; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-soft); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 32px; }
}

/* 6. Seções ---------------------------------------------------------------- */
.section { padding-block: 84px; scroll-margin-top: 70px; }
.section--tint { background: var(--surface); }
.section__head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 640px; }
.section__head h2 { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; font-weight: 300; }
.section__head h2 b { font-weight: 600; }
.section__head p { color: var(--text-soft); }

/* 7. Serviços -------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; --cp: 16px; }
.card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; border: 1px solid var(--line); background: var(--white); min-width: 0; }
.card__body { display: contents; }
.card__body > * { margin-inline: var(--cp); min-width: 0; }
.card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; background: var(--wine); }
.card__kicker { margin-top: 18px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-soft); }
.card h3 { margin-top: 10px; font-size: 16px; font-weight: 500; line-height: 1.3; }
.card__lead { margin-top: 10px; font-size: 13px; }
.card__concept { margin-top: 16px; margin-bottom: 20px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; align-content: start; gap: 10px; }
.card__concept h4 { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; font-weight: 600; }
.card__concept p { font-size: 13px; color: var(--text-soft); }
.card__concept ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 12px; }
.card__concept li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; }
.card__concept li::before { content: ""; width: 8px; height: 1px; background: var(--black); margin-top: 9px; }
@media (max-width: 900px) {
  .cards { gap: 0 10px; --cp: 10px; }
  .card__kicker { margin-top: 14px; font-size: 8px; letter-spacing: .18em; }
  .card h3 { font-size: 13px; }
  .card__lead, .card__concept p, .card__concept ul { font-size: 12px; }
  .card__concept { margin-bottom: 16px; }
  .card__concept h4 { font-size: 8px; letter-spacing: .16em; }
  .card__concept li { grid-template-columns: 10px 1fr; }
  .card__concept li::before { width: 6px; margin-top: 8px; }
}
@media (max-width: 560px) {
  .cards { gap: 0 6px; --cp: 6px; }
  .card__concept { display: none; }
  .card__lead { margin-bottom: 14px; }
}

/* 8. Quem somos ------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.tile { background: var(--white); border: 1px solid var(--line); padding: 32px; min-width: 0; }
.tile--main { grid-row: span 2; display: flex; flex-direction: column; gap: 20px; }
.tile--main h3 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 300; line-height: 1.15; }
.tile--main h3 b { font-weight: 600; }
.tile--main p { color: var(--text-soft); max-width: 58ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; border: 1px solid var(--black); padding: 8px 12px; }
.facts { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 2px; }
.facts strong { font-size: 24px; font-weight: 500; line-height: 1.2; }
.facts span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-soft); }
.tile--link { position: relative; overflow: hidden; background: var(--wine); border-color: var(--wine); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; gap: 22px; text-decoration: none; transition: border-color .2s, transform .2s; }
.tile--link:hover { border-color: var(--white); box-shadow: inset 0 0 0 1px var(--white); transform: translateY(-3px); }
.tile--link > :not(.tile__bg) { position: relative; z-index: 1; max-width: 55%; }
.tile__bg { position: absolute; top: 0; right: 0; bottom: 0; aspect-ratio: 1; height: 100%; color: var(--white); opacity: .22; pointer-events: none; z-index: 0; }
.tile__bg svg { display: block; width: 100%; height: 100%; stroke-width: 1.1; }
.tile__label { display: block; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.tile__name { display: block; font-size: clamp(14px, 1.6vw, 18px); font-weight: 500; overflow-wrap: anywhere; line-height: 1.3; margin-top: 4px; }
.tile__go { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .tile--main { grid-row: auto; } .tile { padding: 24px; } }

/* 9. Contato --------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact h2 { margin-top: 14px; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.contact__intro { color: var(--text-soft); margin-top: 14px; max-width: 44ch; }
.form { margin-top: 30px; display: grid; gap: 22px; }
.field { display: grid; gap: 4px; }
.field label, .form legend { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; }
.field input { min-height: 44px; font: 400 16px var(--font-body); color: var(--black); background: transparent; border: 0; border-bottom: 1px solid var(--black); padding: 10px 0; border-radius: 0; width: 100%; }
.field input::placeholder { color: var(--text-soft); opacity: .7; }
.field input:focus { outline: none; border-bottom-width: 2px; }
.err { font-size: 13px; color: var(--wine); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { font-size: 13px; min-height: 1.4em; }
.form__status[data-state="ok"] { font-weight: 500; border-left: 3px solid var(--black); padding-left: 10px; }
.form__status[data-state="error"] { color: var(--wine); border-left: 3px solid var(--wine); padding-left: 10px; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; line-height: 1.4; }
.check input { appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid var(--black); background: var(--white); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--black); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg) translate(1px, -1px); }
.map { border: 1px solid var(--line); background: var(--white); position: sticky; top: 90px; }
.map__frame { position: relative; aspect-ratio: 480 / 440; background: var(--surface); }
.map__frame img, .map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 16px 20px; border-top: 1px solid var(--black); }
.map__bar strong { display: block; font-size: 14px; font-weight: 500; }
.map__bar span { font-size: 13px; color: var(--text-soft); }
.map__bar a { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--black); padding-bottom: 3px; white-space: nowrap; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } .map { position: static; } }
@media (max-width: 480px) { .checks { grid-template-columns: 1fr; } }

/* 10. Rodapé --------------------------------------------------------------- */
.site-footer { background: var(--white); border-top: 1px solid var(--black); padding-block: 18px; }
.footer__grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px; }
.footer__brand { justify-self: start; line-height: 0; }
.footer__logo { height: 44px; width: auto; }
.footer__center { text-align: center; min-width: 0; }
.footer__quote { white-space: nowrap; font-family: var(--font-quote); font-style: italic; font-size: clamp(12px, 1.9vw, 20px); line-height: 1.3; }
.footer__legal { margin-top: 4px; font-size: 11px; letter-spacing: .06em; color: var(--text-soft); }
.footer__social { justify-self: end; display: flex; gap: 10px; }
.footer__social a { display: block; width: 44px; height: 44px; line-height: 0; color: var(--black); background: var(--white); border: 1px solid var(--black); transition: transform .2s, background .2s, color .2s; }
.footer__social a:hover { transform: translateY(-2px); background: var(--black); color: var(--white); }
.footer__social svg { width: 100%; height: 100%; display: block; }
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr auto; grid-template-areas: "brand social" "center center"; }
  .footer__brand { grid-area: brand; }
  .footer__social { grid-area: social; }
  .footer__center { grid-area: center; padding-top: 12px; border-top: 1px solid var(--line); }
  .footer__quote { font-size: clamp(12px, 3.3vw, 20px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile--link, .footer__social a { transition: none; }
}

/* 12. Efeitos de entrada (GSAP) ---------------------------------------- */
.motion [data-rv]:not(.is-in) { opacity: 0; }

/* 13. Trabalhos: carrossel 3D -------------------------------------------- */
.gallery { --w: clamp(180px, 22vw, 280px); }
.gallery__stage { position: relative; height: calc(var(--w) * 1.5 + 80px); perspective: 1500px; perspective-origin: 50% 38%; touch-action: pan-y; cursor: grab; overflow: hidden; user-select: none; -webkit-user-select: none; }
.gallery__stage.is-drag { cursor: grabbing; }
.gallery__stage::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: calc(var(--w) * 1.35); height: 22px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0,0,0,.2), transparent); pointer-events: none; }
.gallery__item { position: absolute; top: calc(50% - 24px); left: 50%; width: calc(var(--w) * var(--f, 1)); margin-left: calc(var(--w) * var(--f, 1) / -2); padding: 8px; background: var(--white); box-shadow: 0 30px 50px -28px rgba(0,0,0,.55), 0 0 0 1px var(--line); will-change: transform, opacity; backface-visibility: hidden; }
.gallery__item img { display: block; width: 100%; height: auto; object-fit: cover; object-position: center; background: var(--wine); pointer-events: none; -webkit-user-drag: none; }
.gallery__item::after { content: ""; position: absolute; inset: 8px; background: var(--surface); opacity: var(--shade, 0); pointer-events: none; }
.gallery__ui { margin-top: 18px; display: grid; justify-items: center; gap: 16px; }
.gallery__caption { min-height: 1.5em; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text-soft); text-align: center; }
.gallery__nav { display: flex; align-items: center; gap: 20px; }
.gallery__btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--black); background: var(--white); color: var(--black); cursor: pointer; transition: background .2s, color .2s; }
.gallery__btn:hover { background: var(--black); color: var(--white); }
.gallery__dots { display: flex; align-items: center; gap: 10px; }
.gallery__dot { position: relative; width: 8px; height: 8px; padding: 0; border: 1px solid var(--black); border-radius: 8px; background: transparent; cursor: pointer; transition: width .25s, background .25s, border-color .25s; }
.gallery__dot::after { content: ""; position: absolute; inset: -18px -5px; }
.gallery__dot[aria-current="true"] { width: 24px; background: var(--wine); border-color: var(--wine); }
@media (max-width: 700px) { .gallery { --w: min(52vw, 220px); } }
@media (prefers-reduced-motion: reduce) { .gallery__btn, .gallery__dot { transition: none; } }

/* 14. Acessibilidade ----------------------------------------------------- */
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--black); color: var(--white); padding: 12px 18px; font-size: 13px; text-decoration: none; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
.tile--link:focus-visible, .footer__social a:focus-visible { outline-color: var(--black); }
.tile--link:focus-visible { outline: 3px solid var(--white); outline-offset: -8px; }
.field input[aria-invalid="true"] { border-bottom-color: var(--wine); border-bottom-width: 2px; }
@media (pointer: coarse) { .check { min-height: 44px; align-items: center; } }

/* 15. Seção Trabalhos em vinho ------------------------------------------- */
.section--wine { background: var(--wine); color: var(--white); }
.section--wine .eyebrow { color: var(--white); }
.section--wine .eyebrow::before { background: var(--white); }
.section--wine .section__head p { color: rgba(255,255,255,.82); }
.section--wine .gallery__caption { color: rgba(255,255,255,.86); }
.section--wine .gallery__item { box-shadow: 0 30px 50px -26px rgba(0,0,0,.7); }
.section--wine .gallery__item::after { background: var(--wine); }
.section--wine .gallery__stage::after { background: radial-gradient(closest-side, rgba(0,0,0,.4), transparent); }
.section--wine .gallery__btn { background: transparent; color: var(--white); border-color: var(--white); }
.section--wine .gallery__btn:hover { background: var(--white); color: var(--wine); }
.section--wine .gallery__dot { border-color: var(--white); }
.section--wine .gallery__dot[aria-current="true"] { background: var(--white); border-color: var(--white); }
.section--wine :focus-visible { outline-color: var(--white); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
