/* ==========================================================================
   IMA HOUSE — LANDING PAGE STYLESHEET
   Luxury Art Direction & Architectural Minimalism
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Local Webfonts Definition (100% Offline)
   -------------------------------------------------------------------------- */

/* Dekar (English Geometric Display Sans) */
@font-face {
  font-family: 'Dekar';
  src: url('assets/fonts/Dekar.woff') format('woff'),
       url('assets/fonts/Dekar.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Plus Jakarta Sans (English Geometric Sans Fallback) */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Variable.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Vazirmatn (Persian Modern Sans) */
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg-sage: #83a29d;
  --text-dark: #111111;
  --text-muted: #2d3e3b;
  --card-scrim: rgba(255, 255, 255, 0.18);
  --card-border: rgba(255, 255, 255, 0.35);
  
  --font-en: 'Dekar', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;

  --ease-gallery: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-reveal: opacity 0.85s var(--ease-gallery), transform 0.85s var(--ease-gallery);
}

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

html {
  font-size: 16px;
  background-color: var(--bg-sage);
  color: var(--text-dark);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  font-family: var(--font-en);
  line-height: 1.8;
  color: var(--text-dark);
  overflow-x: hidden;
  background-color: var(--bg-sage);
}

/* --------------------------------------------------------------------------
   4. Background Canvas (Ambient Arched Wall)
   -------------------------------------------------------------------------- */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-sage);
  background-image: url('assets/ima%20web%20bg%20copy%20long%20empty.jpg');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .bg-canvas {
    position: fixed;
    background-size: cover;
    background-position: center 20%;
  }
}

/* --------------------------------------------------------------------------
   5. Page Layout & Architectural Arch Frame
   -------------------------------------------------------------------------- */
.page-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 5vh 20px 6vh 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* The Central Recessed Arch Niche Container */
.content-container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  
  /* Semicircular Arch Top + Column Body */
  border-radius: 330px 330px 24px 24px;
  padding: 90px 40px 60px 40px;
  
  /* Separation from outer background */
  background: rgba(131, 162, 157, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  /* Architectural depth, rim light and inner shadow */
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 24px 64px -12px rgba(15, 35, 30, 0.18),
    0 4px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 24px rgba(255, 255, 255, 0.3),
    inset 0 -10px 30px rgba(0, 0, 0, 0.05);
  
  position: relative;
  overflow: hidden;
}

/* Top Arch Highlight Sheen */
.content-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  border-radius: 330px 330px 0 0;
  background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   6. Sections Architecture & Gallery Spacing
   -------------------------------------------------------------------------- */

/* Hero Header Section */
.section-hero {
  margin-top: 4vh;
  margin-bottom: 7vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 330px;
}

.img-hero {
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.04));
  transition: transform 0.6s var(--ease-gallery);
}

/* Wordmark Section */
.section-wordmark {
  margin-bottom: 9vh;
  display: flex;
  justify-content: center;
  width: 100%;
}

.wordmark-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 240px;
}

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

/* Brand Partners Row */
.section-brands {
  margin-bottom: 12vh;
  width: 100%;
}

.brands-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.4s var(--ease-gallery), opacity 0.4s ease;
  opacity: 0.92;
  padding: 8px 16px;
  border-radius: 4px;
}

.brand-link:hover,
.brand-link:focus-visible {
  transform: translateY(-3px) scale(1.02);
  opacity: 1;
  outline: none;
}

.img-brand {
  max-width: 142px;
  height: auto;
  display: block;
}

/* Narrative Text Blocks */
.section-text {
  width: 100%;
  max-width: 780px;
  margin-bottom: 7vh;
  display: flex;
  justify-content: center;
}

.text-card {
  width: 100%;
  background: var(--card-scrim);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.narrative-p {
  color: var(--text-dark);
  font-size: 1.125rem;
  font-weight: 350;
  line-height: 2.05;
  letter-spacing: 0.015em;
  margin-bottom: 1.6rem;
  text-align: justify;
  text-justify: inter-word;
}

.narrative-p:last-child {
  margin-bottom: 0;
}

/* English Narrative Specifics (Dekar Font) */
.section-english .narrative-p {
  font-family: var(--font-en);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: 0.025em;
}

/* Persian Narrative Specifics */
.section-persian .narrative-p {
  font-family: var(--font-fa);
  font-size: 1.18rem;
  font-weight: 300;
  line-height: 2.25;
  letter-spacing: 0;
  text-align: justify;
}

/* Subtle Gallery Divider */
.gallery-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  margin: 1vh 0 8vh 0;
  opacity: 0.6;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17, 17, 17, 0.4), transparent);
}

.divider-dot {
  width: 4px;
  height: 4px;
  background-color: var(--text-dark);
  border-radius: 50%;
}

/* Instagram Section */
.section-social {
  margin-top: 1vh;
  margin-bottom: 5vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-dark);
  font-family: var(--font-en);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: transform 0.35s var(--ease-gallery), background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  outline: none;
}

.social-icon {
  display: block;
  flex-shrink: 0;
  stroke: var(--text-dark);
  opacity: 0.88;
}

.social-handle {
  font-weight: 400;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  width: 100%;
  margin-top: 4vh;
  padding-top: 4vh;
  padding-bottom: 2vh;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-brand-link:hover,
.footer-brand-link:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  outline: none;
}

.img-footer-brand {
  max-width: 98px;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   8. Scroll Reveal Animations (Intersection Observer)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: var(--transition-reveal);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   9. Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .brand-link,
  .footer-brand-link,
  .social-link,
  .img-hero {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   10. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 3vh 12px 4vh 12px;
  }

  .content-container {
    border-radius: 220px 220px 18px 18px;
    padding: 70px 20px 44px 20px;
  }

  .content-container::before {
    border-radius: 220px 220px 0 0;
    height: 200px;
  }

  .section-hero {
    margin-top: 1vh;
    margin-bottom: 4vh;
  }

  .hero-logo-wrap {
    max-width: 210px;
  }

  .section-wordmark {
    margin-bottom: 6vh;
  }

  .wordmark-wrap {
    max-width: 165px;
  }

  .section-brands {
    margin-bottom: 7vh;
  }

  .brands-row {
    flex-direction: column;
    gap: 32px;
  }

  .img-brand {
    max-width: 120px;
  }

  .text-card {
    padding: 28px 20px;
    border-radius: 10px;
  }

  .narrative-p {
    font-size: 1.02rem;
    line-height: 1.9;
  }

  .section-english .narrative-p {
    font-size: 1.02rem;
  }

  .section-persian .narrative-p {
    font-size: 1.05rem;
    line-height: 2.1;
  }

  .gallery-divider {
    margin: 1vh 0 5vh 0;
  }

  .footer-logos {
    gap: 28px;
  }

  .img-footer-brand {
    max-width: 82px;
  }
}

@media (max-width: 420px) {
  .content-container {
    border-radius: 150px 150px 14px 14px;
    padding: 50px 14px 32px 14px;
  }

  .content-container::before {
    border-radius: 150px 150px 0 0;
    height: 140px;
  }

  .hero-logo-wrap {
    max-width: 172px;
  }

  .wordmark-wrap {
    max-width: 135px;
  }

  .social-link {
    font-size: 0.92rem;
    padding: 8px 16px;
  }

  .text-card {
    padding: 20px 14px;
  }

  .narrative-p {
    font-size: 0.95rem;
  }
}
