/* ==========================================================================
   REAL DECOR — Main stylesheet
   Design tokens, reset, typography, layout primitives
   ========================================================================== */

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

:root{
  /* ---- Color: warm, tactile, editorial — never gold/black-luxury cliché ---- */
  --color-bg:            #F7F4EE;
  --color-bg-secondary:  #EDE6D9;
  --color-bg-dark:       #16140F;
  --color-bg-dark-alt:   #211D16;
  --color-surface:       #FBFAF6;
  --color-surface-line:  rgba(27,24,20,0.10);

  --color-text:          #1B1814;
  --color-text-soft:     #2F2A24;
  --color-text-muted:    #534C42;
  --color-text-inverse:       #F7F4EE;
  --color-text-inverse-muted: #D4CBBA;

  --color-accent:        #6B5537;
  --color-accent-dark:   #56442C;
  --color-accent-soft:   #D4C4A8;

  --color-border:         rgba(27,24,20,0.14);
  --color-border-inverse: rgba(247,244,238,0.18);

  --color-overlay: rgba(15,13,10,0.42);

  /* ---- Type ---- */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'Manrope', 'Helvetica Neue', Arial, sans-serif;

  --fs-hero:   clamp(2.35rem, 5.2vw, 4.75rem);
  --fs-h1:     clamp(2.4rem, 5vw, 4.6rem);
  --fs-h2:     clamp(2rem, 3.6vw, 3.4rem);
  --fs-h3:     clamp(1.5rem, 2.4vw, 2.1rem);
  --fs-h4:     clamp(1.15rem, 1.4vw, 1.45rem);
  --fs-lead:   clamp(1.05rem, 1.3vw, 1.3rem);
  --fs-body:   1rem;
  --fs-small:  0.875rem;
  --fs-label:  0.75rem;

  --lh-tight: 1.18;
  --lh-snug:  1.35;
  --lh-body:  1.7;

  --tracking-label: 0.16em;
  --tracking-wide:  0.06em;

  /* ---- Layout ---- */
  --container:      1360px;
  --container-narrow: 860px;
  --gutter:         clamp(20px, 5vw, 64px);
  --grid-gap:       clamp(16px, 2vw, 32px);
  --section-space:  clamp(80px, 12vw, 176px);
  --section-space-sm: clamp(56px, 8vw, 112px);

  /* ---- Shape / motion ---- */
  --radius-small: 2px;
  --radius-large: 4px;
  --transition-fast: 220ms cubic-bezier(.4,0,.2,1);
  --transition: 480ms cubic-bezier(.16,.72,.24,1);
  --transition-slow: 900ms cubic-bezier(.16,.72,.24,1);

  --header-h: 92px;
  --header-h-scrolled: 68px;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                    */
/* ---------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  cursor: default;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd{ margin: 0; }
ul[class], ol[class]{ list-style: none; margin: 0; padding: 0; }
img, picture, svg, video{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-decoration: none; cursor: pointer; }
button, input, textarea, select{ font: inherit; color: inherit; }
button{ background: none; border: none; cursor: pointer; padding: 0; }
[data-lightbox-trigger],
[role="button"],
label[for],
select,
summary{ cursor: pointer; }
table{ border-collapse: collapse; }
:focus-visible{ outline: 2px solid var(--color-accent); outline-offset: 3px; }

body{
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------- */
/* Typography                                                               */
/* ---------------------------------------------------------------------- */
h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  /* color intentionally NOT set here — headings inherit color from their
     container (body text, .text-inverse, dark sections, image-card overlays).
     Setting it here would win over inheritance and force dark text even
     inside dark/photo contexts. */
}
h1{ font-size: var(--fs-h1); }
h2{ font-size: var(--fs-h2); }
h3{ font-size: var(--fs-h3); }
h4{ font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

.type-hero{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
}
.type-lead{
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--color-text-soft);
  font-weight: 400;
  letter-spacing: 0.002em;
}
.type-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.type-eyebrow::before{
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.type-eyebrow--noline::before{ content: none; }
.type-num{
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-accent);
}
.section--dark .type-num{ color: var(--color-accent-soft); }
.text-muted{ color: var(--color-text-muted); }
.text-inverse{ color: var(--color-text-inverse); }
.text-inverse-muted{ color: var(--color-text-inverse-muted); }
.italic{ font-style: italic; }

/* ---------------------------------------------------------------------- */
/* Layout                                                                   */
/* ---------------------------------------------------------------------- */
.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow{ max-width: var(--container-narrow); }
.full-bleed{ width: 100%; }

.section{ padding-block: var(--section-space); }
.section--sm{ padding-block: var(--section-space-sm); }
.section--top-0{ padding-top: 0; }
.section--bottom-0{ padding-bottom: 0; }
.section--dark{ background: var(--color-bg-dark); color: var(--color-text-inverse); }
.section--secondary{ background: var(--color-bg-secondary); }
.section--surface{ background: var(--color-surface); }
.section--dark .type-eyebrow,
.section--dark .type-lead,
.section--dark .text-muted{ color: var(--color-text-inverse-muted); }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4{ color: var(--color-text-inverse); }

.grid-12{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

.stack{ display: flex; flex-direction: column; }
.row{ display: flex; align-items: center; }
.gap-xs{ gap: 8px; }
.gap-sm{ gap: 16px; }
.gap-md{ gap: 24px; }
.gap-lg{ gap: 48px; }
.wrap{ flex-wrap: wrap; }
.justify-between{ justify-content: space-between; }
.justify-center{ justify-content: center; }
.align-end{ align-items: flex-end; }

.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--grid-gap);
  margin-bottom: clamp(40px, 6vw, 88px);
}
.section-head .type-eyebrow{ margin-bottom: 20px; }
.section-head h2{ max-width: 640px; }
.section-head__aside{
  max-width: 380px;
  padding-bottom: 6px;
}

.divider{
  height: 1px;
  width: 100%;
  background: var(--color-border);
  border: 0;
}
.divider--inverse{ background: var(--color-border-inverse); }

.sr-only{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link{
  position: absolute; left: 16px; top: -60px;
  background: var(--color-text); color: var(--color-text-inverse);
  padding: 12px 20px; z-index: 999; transition: top var(--transition-fast);
}
.skip-link:focus{ top: 16px; }

/* reveal-on-scroll base state (JS toggles .is-visible) */
[data-reveal]{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(.16,.72,.24,1), transform 900ms cubic-bezier(.16,.72,.24,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible{ opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"]{ transition-delay: 90ms; }
[data-reveal-delay="2"]{ transition-delay: 180ms; }
[data-reveal-delay="3"]{ transition-delay: 270ms; }
[data-reveal-delay="4"]{ transition-delay: 360ms; }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; }
}

.aspect{ position: relative; overflow: hidden; background: var(--color-bg-secondary); }
.aspect img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aspect--4-5{ aspect-ratio: 4/5; }
.aspect--3-4{ aspect-ratio: 3/4; }
.aspect--16-9{ aspect-ratio: 16/9; }
.aspect--1-1{ aspect-ratio: 1/1; }
.aspect--5-4{ aspect-ratio: 5/4; }
.aspect--21-9{ aspect-ratio: 21/9; }

.img-zoom{ overflow: hidden; }
.img-zoom img{ transition: transform 900ms cubic-bezier(.16,.72,.24,1); }
a.img-zoom:hover img,
[data-lightbox-trigger]:hover img{ transform: scale(1.045); }

/* Shared content grids — always live inside .container */
.categories-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.categories-grid > .card-category:first-child{
  grid-column: span 2;
  height: 440px;
}
.categories-grid > .card-category:nth-child(2){ height: 440px; }

.projects-grid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, 200px);
  gap: var(--grid-gap);
}
.projects-grid .card-project{ height: 100%; min-height: 0; }

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

.cards-grid{
  display: grid;
  gap: var(--grid-gap);
}
.cards-grid--2{ grid-template-columns: repeat(2, 1fr); }
.cards-grid--3{ grid-template-columns: repeat(3, 1fr); }
.cards-grid--4{ grid-template-columns: repeat(4, 1fr); }

.features-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}
.feature-item{
  border-top: 1px solid var(--color-border-inverse);
  padding-top: 24px;
}
.feature-item h3{ margin-top: 14px; }
.feature-item p{ margin-top: 12px; }

.gallery-grid{
  display: grid;
  gap: var(--grid-gap);
}
.gallery-grid + .gallery-grid,
.gallery-grid + .aspect,
.aspect + .gallery-grid{ margin-top: var(--grid-gap); }
.gallery-grid--2{ grid-template-columns: repeat(2, 1fr); }
.gallery-grid--3{ grid-template-columns: repeat(3, 1fr); }
.gallery-grid--4{ grid-template-columns: repeat(4, 1fr); }
.gallery-grid--5{ grid-template-columns: repeat(5, 1fr); }
[data-lightbox-trigger]{ cursor: pointer; }

.page-hero{
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--color-text-inverse);
  min-height: 440px;
  height: 62vh;
}
.page-hero--tall{ height: 88vh; min-height: 560px; }
.page-hero--home{ height: 100vh; min-height: 640px; }
.page-hero__media{ position: absolute; inset: 0; }
.page-hero__media img{ width: 100%; height: 100%; object-fit: cover; }
.page-hero__media img[data-parallax]{ height: 118%; }
.page-hero__shade{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,13,10,0.42) 0%, rgba(15,13,10,0.32) 36%, rgba(15,13,10,0.82) 100%);
}
.page-hero .container{
  position: relative;
  padding-bottom: clamp(48px, 7vw, 88px);
}
.page-hero .type-eyebrow,
.page-hero .type-lead,
.page-hero .breadcrumbs{ color: var(--color-text-inverse-muted); }
.page-hero .breadcrumbs a:hover{ color: var(--color-text-inverse); }
.cta-banner{
  position: relative;
  overflow: hidden;
  color: var(--color-text-inverse);
}
.cta-banner__media{ position: absolute; inset: 0; }
.cta-banner__media img{ width: 100%; height: 100%; object-fit: cover; }
.cta-banner__shade{ position: absolute; inset: 0; background: rgba(15,13,10,0.7); }
.cta-banner .container{ position: relative; text-align: center; }
.cta-banner .type-lead,
.cta-banner .type-eyebrow{ color: var(--color-text-inverse-muted); }

.tag-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.tag-list span{
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  cursor: default;
}

.split-facts{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.split-facts h4{ margin-bottom: 10px; }
