/* ============================================
   SOMAREDDY — Design System
   Aesthetic: Refined Luxury Editorial
   ============================================ */

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

:root {
  --ink:        #0C0B09;
  --ink-soft:   #1A1916;
  --cream:      #F2EDE4;
  --cream-dim:  #C8C0B2;
  --gold:       #B8924A;
  --gold-light: #D4AE72;
  --rule:       rgba(184,146,74,0.25);
  --glass:      rgba(12,11,9,0.85);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============ NOISE OVERLAY ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ============ NAVIGATION ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-decoration: none;
}

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

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 40px;
}

nav ul li a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.25s ease;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out);
}

nav ul li a:hover {
  color: var(--cream);
}

nav ul li a:hover::after {
  width: 100%;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px 80px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5.5vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 32px;
}

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

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--cream-dim);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 56px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  transition: all 0.3s ease;
  width: fit-content;
}

.hero-cta:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
  gap: 22px;
}

.hero-cta svg {
  transition: transform 0.3s var(--ease-out);
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease;
}

.hero:hover .hero-image img {
  transform: scale(1.03);
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, transparent 40%);
  z-index: 1;
}

.hero-stat {
  position: absolute;
  bottom: 48px;
  left: 48px;
  z-index: 3;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--cream);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 6px;
}

/* ============ SECTION WRAPPER ============ */
.section {
  padding: 120px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 72px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
}

.section-title em {
  font-style: italic;
  color: var(--gold-light);
}

.section-count {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 300;
  color: var(--rule);
  line-height: 1;
  padding-bottom: 4px;
}

/* ============ PROJECT GRID ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  aspect-ratio: 3/4;
}

.project-card:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,11,9,0.9) 0%, transparent 50%);
  opacity: 0.7;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px;
  transform: translateY(8px);
  transition: transform 0.4s var(--ease-out);
}

.project-card:hover .project-card-content {
  transform: translateY(0);
}

.project-card-number {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 14px;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s var(--ease-out) 0.05s;
}

.project-card:hover .project-card-link {
  opacity: 1;
  transform: translateY(0);
}

/* ============ DIVIDER ============ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--rule);
  margin: 0 80px;
  width: calc(100% - 160px);
}

/* ============ PROJECT PAGE — HERO ============ */
.project-hero {
  height: 85vh;
  min-height: 560px;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 12s ease;
}

.project-hero:hover img {
  transform: scale(1.04);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12,11,9,0.3) 0%,
    transparent 40%,
    rgba(12,11,9,0.75) 100%
  );
}

.project-hero-content {
  position: absolute;
  bottom: 72px;
  left: 80px;
  right: 80px;
  z-index: 2;
}

.project-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.25s ease, gap 0.25s ease;
}

.project-hero-back:hover {
  color: var(--cream);
  gap: 14px;
}

.project-hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.project-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7rem);
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
  letter-spacing: -0.02em;
}

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

/* ============ PROJECT GALLERY ============ */
.gallery-section {
  padding: 0 80px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-section-label {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}

.gallery-section-label h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.gallery-section-label span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 40px;
}

.gallery-grid {
  display: grid;
  gap: 3px;
  margin-bottom: 80px;
}

.gallery-grid.single {
  grid-template-columns: 1fr;
  max-width: 1000px;
}

.gallery-grid.double {
  grid-template-columns: 1fr 1fr;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--ink-soft);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
  min-height: 400px;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--rule);
  padding: 56px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.04em;
}

.footer-brand span {
  color: var(--gold);
}

.footer-meta {
  text-align: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--cream-dim);
  letter-spacing: 0.06em;
}

.footer-maintained {
  font-size: 0.72rem;
  color: var(--cream-dim);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.footer-maintained a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-maintained a:hover {
  color: var(--gold-light);
}

.footer-right {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-align: right;
}

/* ============ ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.45s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: 100svh; }
  .hero-content { padding: 80px 40px; }
  .hero-image { display: none; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card:first-child { grid-row: auto; aspect-ratio: 3/4; }
  .section { padding: 80px 40px; }
  .gallery-section { padding: 0 40px 80px; }
  footer { padding: 48px 40px; }
  nav { padding: 0 32px; }
}

@media (max-width: 680px) {
  nav { padding: 0 24px; }
  nav ul { gap: 24px; }
  .hero-content { padding: 60px 24px; }
  .hero-title { font-size: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 24px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gallery-section { padding: 0 24px 64px; }
  .gallery-grid.double { grid-template-columns: 1fr; }
  .project-hero-content { left: 24px; right: 24px; bottom: 40px; }
  .project-hero-title { font-size: 3rem; }
  footer { padding: 40px 24px; flex-direction: column; text-align: center; }
  .footer-right { text-align: center; }
}
