/* =========================================================================
   Equipamentos Recomendados — Grupo Gita
   Design Philosophy: Structured Earth
   Mobile-first. Sem dependências. Vanilla CSS.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
:root {
  /* Paleta */
  --terracota: #803f2e;
  --terracota-deep: #6b3525;
  --terracota-light: #a6583e;
  --dark-green: #364636;
  --dark-green-deep: #263026;
  --sage: #a4b3a2;
  --sage-soft: #b9c5b7;
  --sand: #e2d0b0;
  --sand-light: #ede0c6;
  --ivory: #f7efdc;
  --soft-black: #1b1b1b;
  --charcoal: #2a2a2a;
  --white: #ffffff;
  --grey-700: #3a3a3a;
  --grey-500: #8a8a8a;
  --grey-400: #bba888;
  --line-sand: #d3c4a6;
  --line-sand-soft: #e8dfc8;

  /* Tipografia */
  --ff-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ff-serif: "Spectral", Georgia, serif;

  /* Espaços (base 8px) */
  --sp-1: 0.5rem;    /*  8 */
  --sp-2: 1rem;      /* 16 */
  --sp-3: 1.5rem;    /* 24 */
  --sp-4: 2rem;      /* 32 */
  --sp-5: 3rem;      /* 48 */
  --sp-6: 4rem;      /* 64 */
  --sp-7: 6rem;      /* 96 */
  --sp-8: 8rem;      /* 128 */

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(27, 27, 27, 0.05);
  --shadow-md: 0 4px 14px rgba(27, 27, 27, 0.06), 0 2px 4px rgba(27, 27, 27, 0.04);
  --shadow-lg: 0 10px 30px rgba(27, 27, 27, 0.1), 0 4px 10px rgba(27, 27, 27, 0.06);

  /* Timings */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --max-w: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --nav-h: 60px;
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-weight: 400;
  color: var(--soft-black);
  background: var(--sand);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--terracota);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Nav sticky
   ------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--sand-light) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line-sand) 60%, transparent);
  transform: translateY(-100%);
  transition: transform 400ms var(--ease-out);
  height: var(--nav-h);
}
.nav.is-visible { transform: translateY(0); }

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--soft-black);
}
.nav__logo-dot { color: var(--terracota); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 1.5vw, 1rem);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav__links::-webkit-scrollbar { display: none; }

.nav__link {
  position: relative;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-700);
  white-space: nowrap;
  transition: color 200ms var(--ease-out);
  border-radius: 4px;
}
.nav__link:hover { color: var(--terracota); }

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem; bottom: 4px;
  height: 2px;
  background: var(--terracota);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease-out);
}
.nav__link.is-active {
  color: var(--terracota);
}
.nav__link.is-active::after { transform: scaleX(1); }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--soft-black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + var(--sp-6)) var(--gutter) var(--sp-6);
  overflow: hidden;
  isolation: isolate;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 50%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 50%, transparent 90%);
  will-change: transform;
}

.hero__bar-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: var(--dark-green);
  box-shadow: inset 0 -1.5px 0 var(--terracota);
  z-index: 1;
}
.hero__bar-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--terracota);
  z-index: 1;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 720px;
  width: 100%;
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.hero__brand-text {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero__brand-dot { color: var(--terracota); }
.hero__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--terracota);
  opacity: 0.9;
}

.hero__rule {
  width: clamp(70px, 14vw, 140px);
  height: 1.5px;
  background: var(--terracota);
  margin: 0 auto clamp(1.2rem, 3vh, 2rem);
  border-radius: 1px;
}

.hero__title {
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(1rem, 2vh, 1.5rem);
  color: var(--white);
}

.hero__tagline {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--sage);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  margin: 0 auto;
  max-width: 520px;
}

.hero__dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: clamp(1.5rem, 3vh, 2.2rem) 0 1.2rem;
}
.hero__dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sage);
}
.hero__dots span:nth-child(2) { background: var(--terracota); }

.hero__chip {
  display: block;
  width: fit-content;
  margin: 0.5rem auto 0;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--sand) 78%, transparent);
  border: 1px solid var(--grey-700);
  border-radius: 999px;
}

.hero__cats {
  margin-top: clamp(2.2rem, 5vh, 3.5rem);
  font-size: 0.85rem;
  font-weight: 300;
  color: color-mix(in srgb, var(--sand) 62%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.hero__cats span:nth-child(even) { color: var(--terracota); font-weight: 400; }

.hero__scroll {
  position: absolute;
  bottom: clamp(1rem, 4vh, 2.2rem);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--sage);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  z-index: 2;
  animation: heroScrollBounce 2.6s ease-in-out infinite;
}
.hero__scroll-dot {
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, var(--terracota), transparent);
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.9; }
  50% { transform: translate(-50%, 10px); opacity: 0.6; }
}

/* -------------------------------------------------------------------------
   Category sections
   ------------------------------------------------------------------------- */
.cat {
  background: var(--sand);
  padding: clamp(var(--sp-5), 9vh, var(--sp-7)) var(--gutter);
}
.cat--alt { background: var(--sand-light); }

.cat__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.cat__header {
  margin-bottom: clamp(var(--sp-4), 6vh, var(--sp-5));
  text-align: left;
  max-width: 720px;
}

.cat__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracota);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.cat__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--dark-green);
  margin: 0 0 var(--sp-1);
  line-height: 1.05;
}

.cat__sub {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: color-mix(in srgb, var(--soft-black) 55%, var(--sand));
  margin: 0;
}

.cat__rule {
  margin-top: var(--sp-3);
  width: 48px; height: 2px;
  background: var(--terracota);
  border-radius: 1px;
}

/* -------------------------------------------------------------------------
   Grid & Card
   ------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}
.grid--mono {
  grid-template-columns: minmax(0, 420px);
  justify-content: flex-start;
}

.card {
  background: var(--white);
  border: 1px solid var(--line-sand);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 350ms var(--ease-out), box-shadow 350ms var(--ease-out), border-color 350ms var(--ease-out);
  position: relative;
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--soft-black);
}

.card__media {
  background: var(--ivory);
  border-bottom: 1px solid var(--line-sand-soft);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4%, 1.8rem);
  overflow: hidden;
}
.card__media img {
  max-width: 86%;
  max-height: 86%;
  width: auto; height: auto;
  object-fit: contain;
  transition: transform 600ms var(--ease-out);
  will-change: transform;
}

.card__body {
  padding: clamp(1.1rem, 3%, 1.5rem);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.7rem;
}

.card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracota);
}
.card__num { font-weight: 600; }
.card__dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--grey-400);
}
.card__cat { color: var(--grey-500); letter-spacing: 0.12em; }

.card__name {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 600;
  margin: 0;
  color: var(--soft-black);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--terracota);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: background 250ms var(--ease-out), transform 250ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card__cta::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(135deg, var(--terracota-light), var(--terracota));
  transform: translateX(-100%);
  transition: transform 400ms var(--ease-out);
  z-index: 0;
}
.card__cta > * { position: relative; z-index: 1; }

.card__arrow {
  display: inline-block;
  transition: transform 300ms var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--terracota) 22%, var(--line-sand));
}
.card:hover .card__media img { transform: scale(1.04); }
.card:hover .card__cta::before { transform: translateX(0); }
.card:hover .card__arrow { transform: translateX(4px); }
.card:active { transform: translateY(-2px); }

/* -------------------------------------------------------------------------
   Closing
   ------------------------------------------------------------------------- */
.closing {
  background: var(--soft-black);
  color: var(--white);
  padding: clamp(var(--sp-6), 12vh, var(--sp-7)) var(--gutter);
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black 40%, transparent 85%);
}

.closing__inner {
  max-width: 720px;
  margin: 0 auto;
}

.closing__rule {
  width: 120px; height: 1.5px;
  background: var(--terracota);
  margin: 0 auto var(--sp-4);
  border-radius: 1px;
}

.closing__title {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 3.6vw, 2.2rem);
  color: var(--sage);
  margin: 0 0 var(--sp-2);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.closing__sub {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: color-mix(in srgb, var(--sand) 60%, transparent);
  margin: 0;
  font-weight: 300;
}

.closing__dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: var(--sp-4);
}
.closing__dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sage);
}
.closing__dots span:nth-child(2) { background: var(--terracota); }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  background: var(--terracota);
  color: var(--white);
  padding: clamp(var(--sp-4), 6vh, var(--sp-5)) var(--gutter);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  align-items: center;
}
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1fr auto; gap: var(--sp-5); }
}

.footer__brand { display: flex; flex-direction: column; gap: 0.2rem; }
.footer__logo {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
}
.footer__logo-dot { color: color-mix(in srgb, var(--white) 70%, var(--terracota)); }

.footer__tagline {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--white) 80%, transparent);
  margin: 0;
}

.footer__meta {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--white) 85%, transparent);
  text-align: left;
}
@media (min-width: 720px) { .footer__meta { text-align: right; } }

.footer__meta p { margin: 0.15rem 0; }
.footer__meta a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Animations (reveal on scroll)
   Só esconde conteúdo se JS estiver ativo (html.js). Sem JS → visível.
   ------------------------------------------------------------------------- */
.js [data-anim] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: calc(var(--anim-delay, 0) * 1ms);
}
.js [data-anim].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero reveals imediato (sem observer dependency — tem delay próprio) */
.js .hero [data-anim] { animation: heroUp 800ms var(--ease-out) forwards; animation-delay: calc(var(--hero-delay, var(--d, 0)) * 1ms); opacity: 0; transform: translateY(20px); transition: none; }
.hero [data-anim][data-delay="0"]   { --d: 0;   }
.hero [data-anim][data-delay="100"] { --d: 100; }
.hero [data-anim][data-delay="200"] { --d: 200; }
.hero [data-anim][data-delay="300"] { --d: 350; }
.hero [data-anim][data-delay="400"] { --d: 500; }
.hero [data-anim][data-delay="500"] { --d: 650; }
.hero [data-anim][data-delay="600"] { --d: 800; }

@keyframes heroUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Parallax hint (JS controla translateY via custom property) */
.hero__grid {
  transform: translate3d(0, var(--parallax, 0px), 0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero [data-anim] { opacity: 1 !important; transform: none !important; }
  [data-anim] { opacity: 1; transform: none; }
  .hero__scroll { animation: none; }
}

/* -------------------------------------------------------------------------
   Responsive tweaks
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .nav__link { padding: 0.45rem 0.55rem; font-size: 0.78rem; }
  .nav__link::after { left: 0.55rem; right: 0.55rem; }

  .hero { padding-top: calc(var(--nav-h) + var(--sp-4)); }
  .hero__brand { gap: 1.2rem; }
  .hero__dot { width: 5px; height: 5px; }
  .hero__cats { font-size: 0.78rem; }

  .grid { grid-template-columns: 1fr; gap: 1rem; }
  .grid--mono { grid-template-columns: 1fr; }

  .card__media { padding: 1rem; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Print: escondido */
@media print {
  .nav, .hero__scroll { display: none; }
}
