/* ==========================================================
   Ivy – corporate one-page site
   Plain HTML/CSS, no frameworks
   ========================================================== */

:root {
  --red: #c10e0e;
  --red-dark: #9a0b0b;
  --ink: #212121;
  --ink-2: #2b2b2b;
  --text: #6f6f6f;
  --line: #e4e4e4;
  --paper: #f6f4f0;
  --white: #fff;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 40px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1.2em; }
.container { width: min(1180px, 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & eyebrow ---------- */
.btn {
  display: inline-block;
  height: 50px; line-height: 48px;
  padding: 0 37px;
  font: 700 12px/48px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .5s ease;
}
.btn--light { background: var(--white); color: var(--red); }
.btn--light:hover { background: var(--red); color: var(--white); }
.btn--outline { color: var(--white); border-color: rgba(255,255,255,.4); background: transparent; }
.btn--outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--ink); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font: 700 12px/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}
.eyebrow::after { content: ""; width: 44px; height: 1px; background: var(--ink); opacity: .5; }

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  height: var(--topbar-h);
  background: var(--ink);
  color: #d6d6d6;
  font-size: 12px;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.topbar__info, .topbar__social { display: flex; align-items: center; gap: 22px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: var(--white); }
.topbar svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- Header ---------- */
.header {
  position: absolute; inset: var(--topbar-h) 0 auto 0; z-index: 25;
  height: var(--header-h);
  background: rgba(33, 33, 33, .55);
  transition: background .3s, box-shadow .3s;
}
.header.is-stuck {
  position: fixed; inset: 0 0 auto 0;
  height: 70px;
  background: rgba(33, 33, 33, .96);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.header__inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header__right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.header__cta {
  padding: 0 22px; height: 40px; line-height: 38px;
  font: 700 11px/38px var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--white); border: 1px solid rgba(255,255,255,.4);
  transition: all .4s ease;
}
.header__cta:hover { background: var(--red); border-color: var(--red); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 40px; height: 40px; object-fit: contain; }
.brand__name { font: 700 19px/1 var(--sans); letter-spacing: .22em; color: var(--white); }
.nav ul { display: flex; gap: 12px; }
.nav li { padding: 0 20px; }
.nav a {
  position: relative; display: block; padding: 10px 0;
  font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--white);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -14px; height: 2px; width: 0;
  background: var(--white); transition: width .3s;
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }

.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--white); margin: 6px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100vh, 820px);
  display: grid; place-items: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  padding: calc(var(--topbar-h) + var(--header-h) + 50px) 0 120px;
  background: var(--ink);
}
.hero__slides, .hero__slide, .hero__shade { position: absolute; inset: 0; }
.hero__slide {
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease, transform 7s ease-out;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__shade { background: linear-gradient(180deg, rgba(20,20,20,.72) 0%, rgba(20,20,20,.5) 45%, rgba(20,20,20,.7) 100%); }
.hero__content { position: relative; max-width: 900px; }
.hero__badge {
  width: 84px; height: 84px; margin: 0 auto 22px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.55); border-radius: 50%;
  outline: 1px solid rgba(255,255,255,.25); outline-offset: 6px;
}
.hero__badge img { width: 42px; height: 42px; object-fit: contain; }
.hero__eyebrow {
  display: block; margin-bottom: 18px;
  font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.9);
}
.hero h1 { color: var(--white); font-size: clamp(38px, 6.2vw, 74px); font-weight: 400; margin-bottom: 40px; }
.hero h1 span { position: relative; display: inline-block; }
.hero h1 span::before, .hero h1 span::after {
  content: ""; position: absolute; top: 24%; width: 92px; height: 1px; background: rgba(255,255,255,.7);
}
.hero h1 span::before { right: calc(100% + 40px); }
.hero h1 span::after { left: calc(100% + 40px); }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__dots { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero__dots button { width: 22px; height: 2px; padding: 0; border: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: background .25s, width .25s; }
.hero__dots button.is-active { background: var(--white); width: 36px; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  min-height: 160px; padding: 24px;
  background-image: var(--bg); background-size: cover; background-position: center;
}
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; transition: opacity .4s; }
.tile--dark { color: var(--white); }
.tile--dark::before { background: rgba(33,33,33,.93); }
.tile--red { color: var(--white); }
.tile--red::before { background: rgba(193,14,14,.93); }
.tile--light { color: var(--ink); }
.tile--light::before { background: rgba(240,238,234,.94); }
.tile:hover::before { opacity: .82; }
.tile__num {
  font: 400 clamp(84px, 8vw, 120px)/1 var(--serif);
  color: rgba(255,255,255,.1);
  user-select: none;
}
.tile--red .tile__num { color: rgba(0,0,0,.2); }
.tile--light .tile__num { color: #fff; }
.tile__title { font: 400 clamp(26px, 2.4vw, 32px)/1.1 var(--serif); color: var(--red); }
.tile--red .tile__title { color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section__head .eyebrow { justify-content: center; }
h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 24px; }

/* About */
.about__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 90px; align-items: center; }
.about__text .btn { margin-top: 12px; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__media::before {
  content: ""; position: absolute; z-index: -1; right: -26px; bottom: -26px;
  width: 70%; height: 70%; background: var(--paper);
}
.about__badge {
  position: absolute; left: -28px; bottom: 40px;
  background: var(--red); color: var(--white);
  padding: 22px 28px; text-align: center; line-height: 1;
}
.about__badge span { display: block; font: 400 38px/1 var(--serif); }
.about__badge small { font: 700 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; display: block; margin-top: 8px; }

/* Companies */
.companies { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--white);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 22px 44px rgba(0,0,0,.12); }
.card__img {
  height: 210px; background-size: cover; background-position: center;
  position: relative;
}
.card__img::after { content: ""; position: absolute; inset: 0; background: rgba(20,20,20,.15); transition: background .3s; }
.card:hover .card__img::after { background: rgba(193,14,14,.25); }
.card__body { padding: 0 24px 30px; text-align: center; margin-top: -38px; position: relative; z-index: 1; }
.card__body img {
  width: 100%; height: 84px; object-fit: contain;
  background: var(--ink); padding: 14px 22px;
  margin: 0 auto 22px;
}
.card__body h3 { font-size: 26px; margin-bottom: 14px; }
.card__link {
  font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--red);
  border-bottom: 1px solid currentColor; padding-bottom: 5px;
}

/* CTA */
.cta { background: var(--red); color: var(--white); padding: 64px 0; }
.cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta h2 { color: var(--white); margin: 0; font-size: clamp(26px, 3.4vw, 38px); }

/* Contact */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: stretch; }
.contact__info a { color: var(--red); font-weight: 600; }
.contact__info a:hover { text-decoration: underline; }
form { margin-top: 30px; display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input, textarea {
  width: 100%; height: 50px; padding: 10px 20px;
  font: 400 14px/1.7 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 0;
  transition: border-color .2s;
}
input::placeholder, textarea::placeholder { color: #9a9a9a; }
input:focus, textarea:focus { outline: none; border-color: var(--red); }
textarea { resize: vertical; height: 140px; min-height: 120px; }
form .btn { justify-self: start; }
.btn[disabled] { opacity: .6; cursor: wait; }
#answer { margin-top: 18px; }
#answer p { margin: 0; padding: 14px 18px; font-size: 14px; }
#answer .success-message p { background: #eef6ee; color: #1f5f2a; border-left: 3px solid #2e8b3d; }
#answer .error-message p { background: #fbeeee; color: var(--red-dark); border-left: 3px solid var(--red); }
.contact__map { min-height: 460px; background: var(--paper); position: relative; }
.contact__map #map { position: absolute; inset: 0; z-index: 0; font-family: var(--sans); }
.contact__map .leaflet-tile-pane { filter: grayscale(1) contrast(1.05); }
.leaflet-popup-content-wrapper { border-radius: 0; padding: 4px; }
.leaflet-popup-content { margin: 14px 16px; font: 400 13px/1.6 var(--sans); color: var(--text); }
.map-pop h4 { margin: 0 0 2px; font: 400 22px/1.2 var(--serif); color: var(--ink); }
.map-pop p { margin: 0 0 12px; font-size: 12px; }
.map-pop__main {
  display: block; text-align: center; padding: 0 18px; height: 40px; line-height: 40px;
  background: var(--red); color: #fff !important;
  font: 700 11px/40px var(--sans); letter-spacing: .08em; text-transform: uppercase;
}
.map-pop__main:hover { background: var(--ink); }
.map-dir {
  position: absolute; left: 14px; bottom: 14px; z-index: 500;
  height: 42px; line-height: 42px; padding: 0 20px;
  background: var(--ink); color: #fff;
  font: 700 11px/42px var(--sans); letter-spacing: .08em; text-transform: uppercase;
  transition: background .3s;
}
.map-dir:hover { background: var(--red); }

/* Footer */
.footer { background: var(--ink); color: #b9b9b9; padding: 34px 0; font-size: 13px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { margin: 0; }
.to-top {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.25); color: var(--white); font-size: 18px;
  transition: background .25s, border-color .25s;
}
.to-top:hover { background: var(--red); border-color: var(--red); }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2) { transition-delay: .1s; }
.js .cards .reveal:nth-child(3) { transition-delay: .2s; }
.js .cards .reveal:nth-child(4) { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hero h1 span::before, .hero h1 span::after { display: none; }
}
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .about__grid, .contact__grid { gap: 56px; }
}
@media (max-width: 900px) {
  .section { padding: 84px 0; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; margin-left: 28px; }
  .contact__map { min-height: 340px; }

  .header__inner { grid-template-columns: 1fr auto; }
  .header__cta { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.is-open { max-height: 320px; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .nav li { padding: 0; }
  .nav a { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav a::after { display: none; }
  .nav a.is-active { color: #ff6b6b; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .topbar__info { gap: 14px; }
  .cards, .tiles { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .tile { min-height: 130px; }
  .hero { padding-bottom: 96px; }
  .cta__inner { flex-direction: column; text-align: center; }
  .footer__inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
