/* =========================================
   YNDEXA — Stylesheet
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:        #1a1a18;
  --ink-soft:   #3d3d38;
  --parchment:  #f5f3ee;
  --paper:      #faf9f6;
  --gold:       #9a7b3f;
  --gold-light: #c4a05a;
  --border:     #dedad2;
  --white:      #ffffff;

  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --nav-h: 68px;
  --section-gap: 96px;
  --radius: 4px;
  --transition: 0.22s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* --- Container --- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

p {
  color: var(--ink-soft);
  font-size: 0.9875rem;
  line-height: 1.75;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* --- Section shared --- */
.section {
  padding: var(--section-gap) 0;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 56px;
}

.section-header p {
  margin-top: 8px;
  max-width: 600px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--ink-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

/* --- Divider --- */
.divider {
  padding: 0;
}

.divider hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* =========================================
   HEADER / NAV
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all var(--transition);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background: var(--paper);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-emblem img {
  width: 100%;
  max-width: 340px;
  opacity: 0.08;
  filter: contrast(2);
}

/* =========================================
   ABOUT
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 64px;
  align-items: start;
}

.about-label {
  padding-top: 8px;
}

.about-content p {
  margin-bottom: 18px;
}


/* --- History cards (inside About) --- */
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  margin-top: 40px;
}

.history-card {
  background: var(--paper);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0.72;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-logo {
  height: 48px;
  display: flex;
  align-items: center;
}

.history-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: left center;
  filter: grayscale(1);
  opacity: 0.7;
}

.badge-encerrado {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8e80;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.history-text h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.history-text p {
  font-size: 0.845rem;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .history-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   SERVICES
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.services-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

.service-card {
  background: var(--paper);
  padding: 36px 32px;
  transition: background var(--transition);
}

.service-card:hover {
  background: var(--parchment);
}

.service-icon {
  width: 36px;
  height: 36px;
  color: var(--gold);
  margin-bottom: 20px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.875rem;
  line-height: 1.7;
}

/* =========================================
   FARINHA
   ========================================= */
.farinha {
  background: #4a4740;
  color: var(--parchment);
}

.farinha .section-tag {
  color: var(--gold-light);
}

.farinha .section-title {
  color: var(--white);
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.farinha-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: center;
}

.farinha .about-label {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.farinha-tagline {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold-light) !important;
  margin-bottom: 20px !important;
  line-height: 1.5;
}

.farinha-text p {
  color: #c8c4bc;
  margin-bottom: 18px;
}

.farinha-text .btn-primary {
  background: var(--gold);
  color: var(--white);
  margin-top: 8px;
}

.farinha-text .btn-primary:hover {
  background: var(--gold-light);
}

.farinha-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 20px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.farinha-features li {
  font-size: 0.875rem;
  color: #b8b4ac;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.farinha-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.75rem;
}

.farinha-stack {
  font-size: 0.82rem !important;
  color: #7a7870 !important;
}

.farinha-logo img {
  width: 100%;
  max-width: 140px;
}

/* =========================================
   CONTACT
   ========================================= */


.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.contact-details svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.contact-details a:hover {
  color: var(--gold);
}


/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.8;
}

.footer-copy {
  font-size: 0.8rem;
  color: #7a7870;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  font-size: 0.82rem;
  color: #7a7870;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--parchment);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-emblem {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .about-label {
    padding-top: 0;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .farinha-logo img {
    max-width: 100px;
  }
}

@media (max-width: 600px) {
  :root {
    --section-gap: 64px;
  }

  .container {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
  }

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

  .nav-toggle {
    display: flex;
  }

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

  .hero-title {
    font-size: 2.2rem;
  }

  .about-stats {
    gap: 32px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-nav {
    gap: 20px;
  }
}
