/* ==========================================================================
   ROCA Real Estate — Site styles (with motion)
   Brand: Onyx #1A1A1A · Champagne Gold #B08D57 · White #FFFFFF
   Secondary: Sage #6B7A5E · Terracotta #BF6B3D · Charcoal #2B2B2B
   ========================================================================== */

:root {
  --onyx: #1a1a1a;
  --charcoal: #2b2b2b;
  --gold: #b08d57;
  --gold-light: #c9a468;
  --gold-faint: rgba(176, 141, 87, 0.14);
  --sage: #6b7a5e;
  --terracotta: #bf6b3d;
  --paper: #ffffff;
  --paper-warm: #faf8f4;
  --line: #e8e2d6;
  --text: #3d3a35;
  --muted: #7d786f;
  --font-head: "Jost", "Futura", "Century Gothic", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container { width: min(1200px, 92vw); margin-inline: auto; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

h1, h2, h3 { font-family: var(--font-head); color: var(--onyx); font-weight: 600; }

h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: 0.01em; }

.section { padding: 5.5rem 0; }

.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head p { color: var(--muted); margin-top: 0.8rem; }

/* Gradient gold heading text */
.text-gold-gradient {
  background: linear-gradient(105deg, #d4b078 0%, var(--gold) 45%, #8a6b3f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Scroll reveal (JS adds .revealed) ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 140ms);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="zoom"] { transform: scale(0.92); }

/* Slide-up on load (hero content — no JS needed) */
.anim-up {
  opacity: 0;
  animation: rise 1s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 160ms + 150ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  box-shadow: 0 6px 18px rgba(176, 141, 87, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(176, 141, 87, 0.5); }

/* shine sweep */
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: none;
}
.btn-gold:hover::after { animation: sweep 0.9s var(--ease-out); }
@keyframes sweep { to { transform: translateX(110%); } }

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover { background: var(--gold-faint); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px rgba(26, 26, 26, 0.08); }

.site-header .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 0.9rem;
}

.logo svg { height: 62px; width: auto; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }

.main-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  text-decoration: none;
  color: var(--onyx);
  font-size: 0.95rem;
  white-space: nowrap;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1.5px;
  background: var(--gold);
  transition: right 0.3s var(--ease-out);
}
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }

.main-nav .btn { margin-left: 0.6rem; padding: 0.6rem 1.5rem; }
.main-nav .btn::after { display: none; }

.nav-toggle { display: none; }

/* ---------- Hero (home) — Ken Burns image + overlay ---------- */

.hero {
  position: relative;
  color: #fff;
  padding: 0;
  min-height: 90vh;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -2%;
  background: url("../assets/img/dubai-skyline.jpg") center / cover no-repeat;
  animation: kenburns 24s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(26, 26, 26, 0.94) 0%, rgba(26, 26, 26, 0.8) 55%, rgba(26, 26, 26, 0.45) 100%);
}

.hero .container { position: relative; z-index: 2; padding-block: 6rem; }

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 14ch;
  /* gradient clipped text */
  background: linear-gradient(100deg, #e0bd84 0%, var(--gold) 55%, #9c7a4b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

.hero .btn { margin-top: 2.2rem; }

/* floating chevron motif */
.hero-chevron {
  position: absolute;
  top: 8%;
  right: 6%;
  width: 130px;
  opacity: 0.5;
  z-index: 1;
  animation: floaty 6s ease-in-out infinite alternate;
}
@keyframes floaty {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-16px) rotate(-3deg); }
}

/* Page hero (interior pages) */

.page-hero {
  position: relative;
  background: var(--onyx);
  color: #fff;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

.page-hero .hero-bg {
  inset: -2%;
  animation-duration: 30s;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% auto;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(176, 141, 87, 0.28), transparent 65%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; margin-top: 0.6rem; }
.page-hero p { max-width: 56ch; margin-top: 1rem; color: rgba(255, 255, 255, 0.8); }

/* ---------- Stats band ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3.4rem 0;
}

.stat { text-align: center; }
.stat .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  color: var(--onyx);
  font-variant-numeric: tabular-nums;
}
.stat .label { color: var(--muted); margin-top: 0.2rem; }

.stats .divider { display: none; }

/* ---------- About / who ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
}

.about-grid .image-stack { position: relative; }

.about-grid .image-stack img {
  border-radius: 6px;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  width: 100%;
  transition: transform 1.2s var(--ease-out);
}
.about-grid .image-stack:hover img { transform: scale(1.03); }

.about-grid .image-stack .accent {
  position: absolute;
  inset: auto -24px -24px auto;
  width: 60%;
  height: 40%;
  border: 1px solid var(--gold);
  border-radius: 6px;
  z-index: -1;
}

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 2.4rem; margin-top: 2.4rem; }
.pillar {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.pillar:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(26, 26, 26, 0.08); }
.pillar h3 { font-size: 1.05rem; color: var(--gold); }
.pillar p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Marquee band ---------- */

.marquee-band {
  background: var(--onyx);
  overflow: hidden;
  padding: 1.15rem 0;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--gold-light);
  opacity: 0.85;
}
.marquee-track .dot { color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Card grids ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(26, 26, 26, 0.12); }

.card .thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.card:hover .thumb img { transform: scale(1.07); }

.card .tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--onyx); color: var(--gold-light);
  font-family: var(--font-head); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.32rem 0.75rem; border-radius: 999px;
  z-index: 2;
}

.card .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card h3 { font-size: 1.12rem; }
.card .loc { color: var(--muted); font-size: 0.88rem; }
.card .price { font-family: var(--font-head); font-weight: 700; color: var(--gold); font-size: 1.15rem; margin-top: auto; }
.card .specs { display: flex; gap: 1.2rem; color: var(--muted); font-size: 0.85rem; }

/* ---------- Services ---------- */

.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }

.svc {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2rem 2.1rem;
  background: var(--paper-warm);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.svc::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.svc:hover::before { transform: scaleX(1); }
.svc:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(26, 26, 26, 0.1); }

.svc .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--onyx);
  display: grid; place-items: center;
  margin-bottom: 1.2rem;
  transition: transform 0.35s var(--ease-out);
}
.svc:hover .icon { transform: rotate(-6deg) scale(1.08); }
.svc .icon svg { stroke: var(--gold); width: 26px; height: 26px; }
.svc h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.svc p { font-size: 0.95rem; color: var(--muted); }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.step {
  border-top: 2px solid var(--gold);
  padding-top: 1.1rem;
  position: relative;
}
.step .n {
  font-family: var(--font-head); font-weight: 700;
  color: var(--gold); font-size: 1.5rem;
  transition: transform 0.3s var(--ease-out);
}
.step:hover .n { transform: translateY(-3px); }
.step h3 { font-size: 1rem; margin: 0.3rem 0; }
.step p { font-size: 0.88rem; color: var(--muted); }

/* ---------- CTA band ---------- */

.cta {
  position: relative;
  background: var(--onyx);
  color: #fff;
  text-align: center;
  padding: 6rem 0;
  overflow: hidden;
}

.cta::before, .cta::after {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.75;
  animation: drift 14s ease-in-out infinite alternate;
}
.cta::before {
  background: radial-gradient(circle, rgba(176, 141, 87, 0.35), transparent 62%);
  top: -240px; left: -140px;
}
.cta::after {
  background: radial-gradient(circle, rgba(107, 122, 94, 0.3), transparent 62%);
  bottom: -260px; right: -160px;
  animation-delay: -7s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}

.cta .container { position: relative; z-index: 2; }
.cta h2 { color: var(--gold-light); margin-bottom: 0.8rem; }
.cta p { max-width: 52ch; margin: 0 auto 2rem; color: rgba(255, 255, 255, 0.8); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; }

.info-item { display: flex; gap: 1rem; margin-bottom: 1.7rem; }
.info-item .k {
  font-family: var(--font-head); font-weight: 600;
  color: var(--gold); letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.75rem;
}

form { display: grid; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

label { font-family: var(--font-head); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--onyx); display: grid; gap: 0.4rem; }

input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-warm);
  color: var(--onyx);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--onyx);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 2.5rem;
}

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { text-decoration: none; color: rgba(255, 255, 255, 0.75); transition: color 0.2s ease; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; display: grid; gap: 0.5rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 3rem;
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo svg { height: 58px; }

/* ---------- Story / team / careers ---------- */

.quote-card {
  background: var(--paper-warm);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 1.8rem 2rem;
  font-size: 1.02rem;
  color: var(--text);
  position: relative;
}
.quote-card::before {
  content: "\201C";
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--gold);
  line-height: 0.6;
  display: block;
  margin-bottom: 0.6rem;
}
.quote-card .by { margin-top: 1rem; font-family: var(--font-head); font-weight: 600; color: var(--onyx); }

.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--onyx);
  color: var(--gold-light);
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
}

.cert-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.cert-pair img { border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Carousel ---------- */

.carousel {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: 0.5rem;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track figure {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}

.carousel-track img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}

.carousel-track figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.7rem;
}

.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--onyx);
  font-size: 1.25rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-btn:hover { background: var(--gold-faint); transform: translateY(-50%) scale(1.06); }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
}
.carousel-dots button {
  width: 9px; height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.carousel-dots button.active { background: var(--gold); transform: scale(1.25); }

.story-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0.9;
}

/* ---------- Stagger helper ---------- */
.stagger > * { transition-delay: calc(var(--d, 0) * 120ms); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .anim-up { opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cards, .svc-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav {
    position: fixed; inset: 74px 0 auto 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 1.4rem 6vw 1.8rem; gap: 1.1rem;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: grid; place-items: center;
    margin-left: auto;
    width: 42px; height: 42px;
    background: none; border: 1px solid var(--line); border-radius: 8px;
    font-size: 1.2rem; cursor: pointer; color: var(--onyx);
  }
  .main-nav .btn { margin-left: 0; }
  .cards, .svc-grid, .pillars, .steps, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-chevron { display: none; }
}
