/* ============================================================
   THE RAYAL CONSTRUCTIONS — Global Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ── CSS Variables ── */
:root {
  --imperial-gold:#C5A059;
  --lustre-gold:  #D4B67C;
  --sand-gold:    #E2CFAB;
  --midnight-navy:#0D1B2A;
  --deep-steel:   #1B263B;
  --silk-cream:   #F4F1EA;
  --alabaster:    #E0E1DD;
  --warm-grey:    #6E7582;
  --white:       #FFFFFF;
  --gold:        var(--imperial-gold);
  --gold-light:  var(--lustre-gold);
  --gold-dark:   #A78442;
  --charcoal:    var(--midnight-navy);
  --warm-dark:   #081321;
  --cream:       var(--silk-cream);
  --stone:       var(--alabaster);
  --nav-h:       90px;
  --content-w:   92%;
  --content-max: 1280px;
  --transition:  0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: 'Lora', 'Georgia', serif;
  background: var(--cream);
  color: var(--charcoal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

h1, h2, h3, h4, h5, h6,
.heading-display,
.heading-serif,
.logo-primary,
.footer-col h4 {
  font-family: 'Cinzel', 'Playfair Display', serif;
  letter-spacing: 0.1em;
}

p,
li,
.section-header p,
.footer-brand p,
.footer-col ul li,
.project-desc,
.panel-content p,
.about-text p,
.story-text p,
.why-text p {
  font-family: 'Lora', 'Georgia', serif;
}

.label-text,
.tag,
.btn-primary,
.btn-outline,
.nav-links a,
.mobile-nav a,
.nav-cta,
.portfolio-cat,
.project-cat,
.meta-tag,
.filter-btn,
.service-tab,
.view-project-btn,
.contact-card-label,
.form-group label {
  font-family: 'Montserrat', sans-serif;
}

/* Full-bleed sections should always span viewport width, even if nested */
.hero,
.page-hero,
.contact-hero,
.cta-band,
.consult-strip,
footer {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

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

a { text-decoration: none; color: inherit; }

/* ── Typography ── */
.heading-display {
  font-family: 'Cinzel', serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.15em;
}

.heading-serif {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.2;
}

.label-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* ── Gold Accent Line ── */
.gold-rule {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1rem 0;
}

.gold-rule.centered { margin: 1rem auto; }

/* ── Gold Tag ── */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.2rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gold);
  color: var(--charcoal);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.4rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  border-radius: 50px;
}

.btn-primary:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,168,76,0.35);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.4rem;
  border: 1px solid rgba(255,255,255,0.6);
  transition: var(--transition);
  cursor: pointer;
  border-radius: 50px;
}

.btn-outline:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

.btn-outline:active {
  transform: scale(0.98);
}

/* ── Section Spacing ── */
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }

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

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-family: 'Cinzel', 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.section-header p {
  font-size: 0.95rem;
  color: var(--warm-grey);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 300;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.navbar.scrolled {
  background: rgba(13,27,42,0.97);
  box-shadow: 0 12px 34px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.navbar-inner {
  width: var(--content-w);
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo — image version ── */
.logo-img-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(201,168,76,0.35),
    0 4px 18px rgba(230,120,40,0.28);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  flex-shrink: 0;
}

.logo-img-wrap:hover .logo-img {
  box-shadow:
    0 0 0 2px rgba(201,168,76,0.65),
    0 6px 28px rgba(230,120,40,0.45);
  transform: scale(1.05);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-primary {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.1em;
  line-height: 1;
}

.logo-primary span { color: var(--gold); }

.logo-sub {
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}

/* ── Footer logo ── */
.footer-logo-link {
  display: inline-block;
  margin-bottom: 1.4rem;
}

.footer-logo-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px rgba(201,168,76,0.4),
    0 0 0 7px rgba(201,168,76,0.08),
    0 8px 40px rgba(230,120,40,0.35),
    0 20px 60px rgba(0,0,0,0.4);
  transition: box-shadow 0.45s ease, transform 0.45s ease;
}

.footer-logo-link:hover .footer-logo-img {
  box-shadow:
    0 0 0 3px rgba(201,168,76,0.7),
    0 0 0 9px rgba(201,168,76,0.12),
    0 10px 50px rgba(230,120,40,0.55),
    0 24px 70px rgba(0,0,0,0.4);
  transform: scale(1.04) translateY(-2px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--gold);
  color: var(--charcoal) !important;
  padding: 0.6rem 1.4rem;
  font-weight: 700 !important;
  border-radius: 50px;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold-dark); color: var(--white) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;        /* larger tap target */
  margin: -10px;        /* compensate so layout stays same */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  background: transparent;
  border: none;
  outline: none;
}
.hamburger span {
  display: block;
  width: 25px; height: 2px;
  background: var(--white);
  transition: var(--transition);
  pointer-events: none; /* clicks pass to parent div */
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: flex;              /* always flex — visibility controls open/close */
  flex-direction: column;
  gap: 0;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(13,27,42,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 0 2rem;
  border-top: 1px solid rgba(201,168,76,0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              padding 0.38s ease;
  pointer-events: none;
}

.mobile-nav.open {
  max-height: 420px;
  padding: 1.5rem 2rem;
  pointer-events: auto;
}

.mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--gold); }

/* ── Hero (shared) ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 12s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13,27,42,0.84) 0%,
    rgba(13,27,42,0.5) 60%,
    rgba(13,27,42,0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--content-w);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
  animation: heroFade 1.2s ease both;
}

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

.hero-content .tag { border-color: rgba(201,168,76,0.6); }

.hero-content h1 {
  font-size: clamp(2.4rem, 5.8vw, 4.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 1.4rem;
  letter-spacing: 0.1em;
}

.hero-content h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-content p {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  margin-bottom: 2.2rem;
  max-width: 500px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.hero-scroll svg { width: 18px; height: 18px; stroke: var(--gold); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Carousel Dots ── */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.carousel-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--stone);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.carousel-dots button.active {
  background: var(--gold);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.25);
}

/* ── Footer ── */
footer {
  background: var(--midnight-navy);
  color: rgba(255,255,255,0.65);
}

.footer-main {
  padding: 70px 0 50px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  font-size: 0.82rem;
  line-height: 1.8;
  margin-top: 1.2rem;
  font-weight: 300;
}

.footer-col h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  font-weight: 300;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 300;
}

.footer-contact-item svg {
  width: 16px; height: 16px;
  stroke: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom-inner span {
  overflow-wrap: anywhere;
}

/* ── Page Hero (sub-pages) ── */
.page-hero {
  position: relative;
  height: 65vh;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: var(--content-w);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
}

.page-hero-content h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: 0.1em;
}

.hero-content h1 em,
.page-hero-content h1 em,
.portfolio-section .section-header h2 em,
.process-section h2 em,
.cta-band h2 em {
  color: var(--gold-light);
}

button,
[type='button'],
[type='submit'],
[type='reset'] {
  border-radius: 50px;
}

.service-tab,
.filter-btn,
.view-project-btn,
.carousel-arrow,
.contact-card,
.project-count-badge,
.meta-tag,
.project-card,
.panel-grid,
.panel-content,
.contact-form-card,
.value-card,
.credential,
.about-img-1,
.about-img-2,
.story-img-main,
.story-img-accent,
.portfolio-info {
  border-radius: 16px;
}

.project-card,
.panel-grid,
.contact-form-card,
.value-card,
.credential {
  box-shadow: 0 12px 24px rgba(13,27,42,0.1);
}

.cta-band-overlay {
  background: linear-gradient(145deg, rgba(13,27,42,0.88) 0%, rgba(27,38,59,0.82) 100%);
}

.consult-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--imperial-gold);
  color: var(--midnight-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(197,160,89,0.3), 0 15px 30px rgba(0,0,0,0.2);
  z-index: 1200;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.consult-fab:hover {
  background: var(--lustre-gold);
  box-shadow: 0 0 10px rgba(197,160,89,0.45), 0 18px 36px rgba(0,0,0,0.24);
  transform: translateY(-2px);
}

.consult-fab:active {
  transform: scale(0.98);
}

.consult-fab svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.page-hero-content p {
  max-width: min(92vw, 540px);
}

/* ── Fade In Animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 70px; --content-w: 90%; }
  .nav-links { display: none; }
  .hamburger { display: flex; }   /* reveal the hamburger on mobile */
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .hero-content h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
  .hero { min-height: 540px; }
  .page-hero { height: 58vh; min-height: 360px; }
  .page-hero-content h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
  .section { padding: 70px 0; }
}

@media (max-width: 480px) {
  .hero-content p { font-size: 0.92rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { text-align: center; justify-content: center; }
  .hero { min-height: 500px; }
  .page-hero { height: 52vh; min-height: 320px; }
  .page-hero-content h1 { font-size: clamp(2rem, 10vw, 2.9rem); }
  .consult-fab {
    right: 16px;
    bottom: 16px;
  }
}
