/* ==========================================================================
   RVS Solution Theme – Main Stylesheet
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'Space Mono', monospace;
  --background: #F9F9F7;
  --foreground: #1a1a1a;
  --border-color: rgba(0, 0, 0, 0.1);
  --primary: #030213;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  position: relative;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a, button, input, textarea {
  cursor: none;
}

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

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

/* --- Grain Overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */
.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, background-color 0.3s ease, border 0.3s ease, width 0.3s ease, height 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cursor-dot.is-hovering {
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.cursor-follower {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.5s ease;
}

.cursor-follower.is-hovering {
  opacity: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 48px 120px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.site-nav .logo-link {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.site-nav .logo-text h1 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-nav .logo-text p {
  font-family: var(--font-mono);
  font-size: 9px;
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
}

.site-nav .nav-links {
  display: flex;
  gap: 48px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.site-nav .nav-links a {
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 96px 120px;
  margin-top: 128px;
}

.site-footer .footer-inner {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 64px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.site-footer .footer-email {
  font-family: var(--font-serif);
  font-size: 3rem;
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}

.site-footer .footer-email:hover {
  opacity: 0.6;
}

.site-footer .footer-location {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 24px;
  opacity: 0.4;
}

.site-footer .footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.4;
}

/* ==========================================================================
   Animations (Intersection Observer)
   ========================================================================== */
.animate-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-in.slide-left {
  transform: translateX(-30px);
}

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

.animate-in[data-delay="1"] { transition-delay: 0.1s; }
.animate-in[data-delay="2"] { transition-delay: 0.2s; }
.animate-in[data-delay="3"] { transition-delay: 0.3s; }
.animate-in[data-delay="4"] { transition-delay: 0.4s; }
.animate-in[data-delay="5"] { transition-delay: 0.5s; }
.animate-in[data-delay="6"] { transition-delay: 0.6s; }

/* ==========================================================================
   Home Page – Hero / Intro
   ========================================================================== */
.page-content {
  padding-top: 192px;
  padding-left: 120px;
  padding-right: 120px;
  padding-bottom: 96px;
}

.home-intro {
  margin-bottom: 128px;
  max-width: 672px;
}

.home-intro h2 {
  font-family: var(--font-serif);
  font-size: 3.75rem;
  line-height: 1.1;
  margin-bottom: 32px;
  font-weight: 400;
}

.home-intro p {
  font-size: 0.875rem;
  opacity: 0.5;
  line-height: 1.7;
}

/* ==========================================================================
   Home Page – Project Grid
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
}

.project-card:nth-child(8n+1) { grid-column: span 5; }
.project-card:nth-child(8n+2) { grid-column: span 4; }
.project-card:nth-child(8n+3) { grid-column: span 3; }
.project-card:nth-child(8n+4) { grid-column: span 6; }
.project-card:nth-child(8n+5) { grid-column: span 6; }
.project-card:nth-child(8n+6) { grid-column: span 4; }
.project-card:nth-child(8n+7) { grid-column: span 5; }
.project-card:nth-child(8n+8) { grid-column: span 3; }

.project-card a {
  display: block;
}

.project-card .project-image-wrap {
  position: relative;
  overflow: hidden;
  background-color: #f5f5f5;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.7s ease, transform 0.7s ease;
}

.project-card:hover .project-image-wrap {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

.project-card .project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.project-card:hover .project-image-wrap img {
  transform: scale(1.05);
}

.project-card .grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.project-card .project-label {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.project-card .project-label h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.project-card .project-label span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ==========================================================================
   Studio Page
   ========================================================================== */
.studio-header h1,
.contact-header h1 {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 32px;
  font-weight: 400;
}

.studio-header p,
.contact-header p {
  font-size: 1.25rem;
  opacity: 0.6;
  max-width: 672px;
  line-height: 1.6;
}

.section-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px;
  margin-bottom: 128px;
}

.section-label {
  grid-column: span 4;
}

.section-label h2 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  font-weight: 400;
}

.section-content {
  grid-column: span 8;
}

.section-content .prose {
  max-width: 65ch;
}

.section-content .prose p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Process Steps */
.process-step {
  margin-bottom: 48px;
}

.process-step h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 16px;
  font-weight: 400;
}

.process-step p {
  font-size: 1.125rem;
  line-height: 1.7;
  opacity: 0.8;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 48px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.service-item .service-num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-top: 4px;
}

.service-item h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 400;
  transition: opacity 0.3s ease;
}

.service-item:hover h3 {
  opacity: 0.6;
}

.service-item p {
  font-size: 0.875rem;
  opacity: 0.6;
  line-height: 1.6;
}

/* Team */
.team-member {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.team-member:last-child {
  border-bottom: none;
}

.team-member h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 400;
}

.team-member .role {
  font-size: 0.875rem;
  opacity: 0.6;
}

.team-member .bio {
  font-size: 0.875rem;
  margin-top: 16px;
  line-height: 1.6;
  opacity: 0.8;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-form {
  max-width: 768px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 32px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 16px;
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  outline: none;
  padding: 12px 0;
  font-size: 1.125rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: rgba(0, 0, 0, 0.6);
}

.form-group textarea {
  resize: none;
  min-height: 150px;
}

.btn-submit {
  padding: 16px 48px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  border-color: #000;
  background: #000;
  color: #fff;
  cursor: none;
}

.contact-info {
  margin-top: 128px;
  padding-top: 64px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.contact-info .info-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 16px;
}

.contact-info .info-value {
  font-size: 1.125rem;
}

.contact-info a {
  transition: opacity 0.3s ease;
}

.contact-info a:hover {
  opacity: 0.6;
}

/* ==========================================================================
   Case Study / Single Project
   ========================================================================== */
.case-study-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}

.case-study-hero .cs-main {
  max-width: 672px;
}

.case-study-hero .cs-main h1 {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 24px;
  font-weight: 400;
}

.case-study-hero .cs-main p {
  font-size: 1.25rem;
  opacity: 0.6;
  line-height: 1.6;
}

.case-study-hero .cs-meta {
  text-align: right;
}

.case-study-hero .cs-meta .cs-category {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 8px;
}

.case-study-hero .cs-meta .cs-year {
  font-size: 0.875rem;
}

.case-study-hero .cs-meta .cs-location {
  font-size: 0.875rem;
  opacity: 0.5;
}

.hero-image {
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  transform: rotate(-0.5deg);
  aspect-ratio: 16/9;
  margin-bottom: 96px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.challenge-approach {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  margin-bottom: 128px;
}

.challenge-approach h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 24px;
  font-weight: 400;
}

.challenge-approach p,
.challenge-approach li {
  font-size: 1.125rem;
  line-height: 1.7;
}

.approach-list {
  list-style: none;
  padding: 0;
}

.approach-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.approach-list li .dash {
  opacity: 0.3;
}

.image-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
}

.image-grid-two .cs-image {
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  aspect-ratio: 3/4;
}

.image-grid-two .cs-image:first-child {
  transform: rotate(0.5deg);
}

.image-grid-two .cs-image:last-child {
  transform: rotate(-0.3deg);
}

.image-grid-two .cs-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.full-width-image {
  max-width: 1024px;
  margin: 0 auto 64px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  aspect-ratio: 16/10;
  transform: rotate(0.2deg);
}

.full-width-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-quote {
  max-width: 576px;
  margin: 0 auto;
  text-align: center;
  padding-top: 64px;
}

.process-quote p {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  opacity: 0.4;
  line-height: 1.7;
  font-style: italic;
}

.process-quote .attribution {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 16px;
  opacity: 0.3;
}

.related-work {
  margin-top: 128px;
  padding-top: 64px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.related-work .rw-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 32px;
}

.related-work .rw-links {
  display: flex;
  gap: 48px;
  font-size: 0.875rem;
}

.related-work .rw-links a {
  transition: opacity 0.3s ease;
}

.related-work .rw-links a:hover {
  opacity: 0.6;
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.page-404 h1 {
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 400;
  margin-bottom: 16px;
}

.page-404 p {
  font-size: 1.25rem;
  opacity: 0.5;
  margin-bottom: 32px;
}

.page-404 a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.page-404 a:hover {
  opacity: 1;
}

/* ==========================================================================
   Form Success Message
   ========================================================================== */
.form-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.form-success h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin-bottom: 24px;
  font-weight: 400;
}

.form-success p {
  font-size: 1.25rem;
  opacity: 0.6;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .site-nav {
    padding: 32px 40px;
  }
  .page-content {
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 140px;
  }
  .site-footer {
    padding: 64px 40px;
  }
  .section-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .section-label {
    grid-column: span 1;
  }
  .section-content {
    grid-column: span 1;
  }
  .project-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .project-card:nth-child(8n+1),
  .project-card:nth-child(8n+2),
  .project-card:nth-child(8n+3),
  .project-card:nth-child(8n+4),
  .project-card:nth-child(8n+5),
  .project-card:nth-child(8n+6),
  .project-card:nth-child(8n+7),
  .project-card:nth-child(8n+8) {
    grid-column: span 3;
  }
  .site-footer .footer-email {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 24px 20px;
    flex-direction: column;
    gap: 16px;
  }
  .site-nav .nav-links {
    gap: 24px;
  }
  .page-content {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 120px;
  }
  .site-footer {
    padding: 48px 20px;
  }
  .site-footer .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .home-intro h2 {
    font-size: 2.5rem;
  }
  .studio-header h1,
  .contact-header h1,
  .case-study-hero .cs-main h1 {
    font-size: 3rem;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card:nth-child(8n+1),
  .project-card:nth-child(8n+2),
  .project-card:nth-child(8n+3),
  .project-card:nth-child(8n+4),
  .project-card:nth-child(8n+5),
  .project-card:nth-child(8n+6),
  .project-card:nth-child(8n+7),
  .project-card:nth-child(8n+8) {
    grid-column: span 1;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-info {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .case-study-hero {
    flex-direction: column;
    gap: 24px;
  }
  .case-study-hero .cs-meta {
    text-align: left;
  }
  .challenge-approach {
    grid-template-columns: 1fr;
  }
  .image-grid-two {
    grid-template-columns: 1fr;
  }
  .cursor-dot, .cursor-follower {
    display: none;
  }
  body, a, button, input, textarea {
    cursor: auto;
  }
}
