/* ==========================================================================
   MANSOORA — pre-launch site
   Minimal luxury · black / white / monochrome + deep Islamic green accents
   ========================================================================== */

/* ---------- Tokens & base ---------- */
:root {
  --ink: #0A0A0A;
  --ink-2: #1C1C1C;
  --paper: #FAFAF7;
  --white: #FFFFFF;
  --grey-600: #5E5E5E;
  --grey-300: #D6D6D2;
  --grey-100: #EFEFEB;
  --green: #14533D;
  --green-light: #6FB892;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --arabic: "Amiri", Georgia, serif;

  --container: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--grey-600);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
p, h1, h2, h3, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.instagram :focus-visible,
.ig-tile:focus-visible,
.site-footer :focus-visible {
  outline-color: var(--green-light);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section { padding-block: clamp(5rem, 12vw, 9rem); }

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

/* ---------- Shared bits ---------- */

.skip-link {
  position: absolute;
  top: -4.5rem;
  left: 1rem;
  z-index: 300;
  padding: .8rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top .25s ease;
}
.skip-link:focus-visible { top: 1rem; }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow--center { justify-content: center; }

.star {
  width: 15px;
  height: 15px;
  flex: none;
  fill: currentColor;
}

/* hairline – star – hairline ornament */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-block: 1.6rem;
}
.ornament-line {
  width: 56px;
  height: 1px;
  background: var(--grey-300);
}
.ornament .star { width: 17px; height: 17px; color: var(--green); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 48px;
  padding: 0 2.1rem;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--paper); color: var(--ink); }
.btn-secondary { color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-light { color: var(--paper); border-color: var(--paper); }
.btn-light:hover { background: var(--paper); color: var(--ink); }

/* arch image frame */
.arch {
  position: relative;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: var(--grey-100);
}
.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* scroll reveal — hidden state only applied when JS is present */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.site-header.scrolled {
  background: rgba(250, 250, 247, .96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--grey-300);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey-600);
  text-decoration: none;
  transition: color .3s ease;
}
.nav-desktop a:hover { color: var(--ink); }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: clamp(.5rem, 2vw, 1.2rem);
}
.lang-toggle .lang-sep {
  color: var(--grey-300);
  font-size: 12px;
}
.lang-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .15rem;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--grey-600);
  transition: color .3s ease;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--ink); }
.lang-btn.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 1px;
  background: var(--green);
}

/* hamburger — only rendered when JS is active, and only on small screens */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 959.98px) {
  html.js .menu-toggle { display: inline-flex; }
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .3s ease;
}
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: calc(var(--header-h) + 2rem) clamp(1.5rem, 7vw, 3rem) 3rem;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  padding: .6rem 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--grey-100);
}
.mobile-menu nav a:last-child { border-bottom: 0; }

/* footer block pinned to the bottom of the overlay */
.mobile-menu-foot {
  position: absolute;
  left: clamp(1.5rem, 7vw, 3rem);
  right: clamp(1.5rem, 7vw, 3rem);
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
}
.mobile-menu-tagline {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--grey-600);
}
.mobile-menu-ig {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu-ig svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(6.5rem, 15vh, 9rem) clamp(3rem, 8vw, 6rem);
}
.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 7vw, 5rem);
  align-items: center;
}
.hero-copy { max-width: 34rem; }
.hero-copy .eyebrow { margin-bottom: 1.75rem; }
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: .005em;
}
.hero-sub {
  margin-top: 1.75rem;
  max-width: 30rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.75rem;
}
.hero-media { max-width: 520px; margin-inline: auto; width: 100%; }
.hero-media .arch { height: clamp(440px, 72vh, 700px); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}
.about-visual { text-align: center; }
.arabic-word {
  font-family: var(--arabic);
  font-size: clamp(4.5rem, 13vw, 9rem);
  line-height: 1.15;
  color: var(--ink);
}
.about-caption {
  margin-top: 1.25rem;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--grey-600);
}
.about-copy .eyebrow { margin-bottom: 1.4rem; }
.about-copy h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 1.75rem;
}
.about-copy p { max-width: 34rem; }

/* ---------- Values ---------- */
.values { padding-block: clamp(4rem, 10vw, 7rem); }
.values .eyebrow--center { display: flex; }
.values-grid {
  display: grid;
  gap: 2.75rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.value {
  border-top: 1px solid var(--grey-300);
  padding-top: 1.75rem;
}
.value-num {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.value-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: .8rem;
}
.value-text { font-size: 1rem; line-height: 1.75; }

/* ---------- Collection ---------- */
.section-head { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head .eyebrow--center { display: flex; }
.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-top: .4rem;
}
.section-intro {
  margin: 1.6rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.75;
  text-wrap: balance;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  margin-top: clamp(3rem, 7vw, 5rem);
}
.collection-card .arch img {
  aspect-ratio: 3 / 4;
  transition: transform .6s var(--ease);
}
.collection-card:hover .arch img,
.collection-card:focus-within .arch img { transform: scale(1.03); }
.card-tag {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  padding: .5rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.card-caption {
  margin-top: 1.15rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
}

/* ---------- Instagram (dark) ---------- */
.instagram {
  background: var(--ink);
  color: var(--paper);
}
.instagram .eyebrow { color: var(--green-light); }
.instagram h2 { color: var(--paper); }
.instagram .section-intro { color: rgba(250, 250, 247, .68); }
.instagram .ornament-line { background: rgba(250, 250, 247, .22); }
.instagram .ornament .star { color: var(--green-light); }

.ig-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.5rem, 1.6vw, 1rem);
  margin-top: clamp(2.75rem, 6vw, 4rem);
}
.ig-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--ink-2);
  background-size: cover;
  background-position: center;
  transition: filter .5s ease;
}
.ig-tile:hover, .ig-tile:focus-visible { filter: brightness(1.12); }
.ig-tile--1 { background-image: url("../assets/img/abaya-01.svg"); }
.ig-tile--2 {
  background: var(--paper);
}
.ig-tile__mark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
}
.ig-tile__mark .star { width: 14px; height: 14px; color: var(--green); }
.ig-tile__word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(.85rem, 1.8vw, 1.4rem);
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.ig-tile--3 { background-image: url("../assets/img/abaya-03.svg"); }
.ig-tile--4 { background-image: url("../assets/img/abaya-04.svg"); filter: brightness(.82); }
.ig-tile--5 { background-image: url("../assets/img/hero-drape.svg"); filter: brightness(.68); }
.ig-tile--6 {
  background: var(--green);
}
.ig-tile--6::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5.5' y='5.5' width='13' height='13' fill='%23FAFAF7' opacity='.55'/%3E%3Crect x='5.5' y='5.5' width='13' height='13' fill='%23FAFAF7' opacity='.55' transform='rotate(45 12 12)'/%3E%3C/svg%3E") center / 72px no-repeat;
  opacity: .22;
}
.ig-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, .45)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAFAF7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.6' cy='6.4' r='1.1' fill='%23FAFAF7' stroke='none'/%3E%3C/svg%3E") center / 30px no-repeat;
  opacity: 0;
  transition: opacity .4s ease;
}
.ig-tile:hover::after, .ig-tile:focus-visible::after { opacity: 1; }

.ig-cta { margin-top: clamp(2.75rem, 6vw, 4rem); text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--grey-300);
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}
.footer-inner .wordmark { font-size: 1.5rem; }
.footer-tagline {
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--grey-600);
}
.footer-ig {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-top: .4rem;
  border: 1px solid var(--grey-300);
  border-radius: 50%;
  color: var(--ink);
  transition: border-color .35s ease, color .35s ease;
}
.footer-ig:hover { border-color: var(--green); color: var(--green); }
.footer-ig svg { width: 20px; height: 20px; }
.footer-copy {
  margin-top: .6rem;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--grey-600);
}

/* ---------- Mobile & tablet (<960px) ---------- */
@media (max-width: 959.98px) {
  /* tighter hero: text first, arch visible on the first screen */
  .hero { padding-block: calc(var(--header-h) + 1.75rem) clamp(2.5rem, 7vw, 4rem); }
  .hero-grid { gap: 1.75rem; }
  .hero-copy .eyebrow { margin-bottom: 1.125rem; }
  .hero-sub { margin-top: 1.125rem; line-height: 1.65; }
  .hero-actions { flex-direction: column; margin-top: 1.75rem; }
  .hero-actions .btn-primary { width: 100%; }
  .hero-actions .btn-secondary {
    min-height: 44px;
    padding: 0;
    border: 0;
    justify-content: center;
    text-decoration: underline;
    text-underline-offset: 6px;
  }
  .hero-actions .btn-secondary:hover { background: none; color: var(--green); }
  .hero-media .arch { height: auto; aspect-ratio: 4 / 5; }

  /* tighter vertical rhythm — roughly a third less whitespace */
  .section { padding-block: clamp(3.5rem, 12vw, 9rem); }
  .values { padding-block: clamp(3rem, 10vw, 7rem); }
  .about-grid { gap: clamp(2rem, 7vw, 6rem); }
  .values-grid { margin-top: clamp(2rem, 7vw, 5rem); }
  .collection-grid { margin-top: clamp(2rem, 7vw, 5rem); }
  .ig-grid { margin-top: clamp(2rem, 6vw, 4rem); }
  .ig-cta { margin-top: clamp(2rem, 6vw, 4rem); }

  /* about copy centered to match the Arabic word above it */
  .about-copy { text-align: center; }
  .about-copy p { margin-inline: auto; }
}

/* ---------- Phones (<640px) ---------- */
@media (max-width: 639.98px) {
  /* heavier, darker body text on small screens (dark IG section keeps its own) */
  p { font-weight: 400; color: #4D4D4D; }

  /* compact eyebrow — fits on one line at 375px in both languages */
  .eyebrow { font-size: 11px; letter-spacing: .2em; }

  /* values: compact rows — number left, title + text right */
  .values-grid { gap: 1.5rem; }
  .value {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    column-gap: .75rem;
    padding-top: 1.25rem;
  }
  .value-num {
    grid-row: 1 / span 2;
    align-self: start;
    font-size: 1.75rem;
    line-height: 1;
    margin: 0;
  }
  .value-title { margin-bottom: .35rem; }

  /* collection: horizontal swipe carousel, bleeds to screen edges */
  .collection-grid {
    display: flex;
    gap: 1rem;
    margin-inline: calc(-1 * clamp(1.25rem, 5vw, 3rem));
    padding-inline: clamp(1.25rem, 5vw, 3rem);
    scroll-padding-inline: clamp(1.25rem, 5vw, 3rem);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .collection-grid::-webkit-scrollbar { display: none; }
  .collection-card { flex: 0 0 76%; scroll-snap-align: start; }
  /* off-screen cards never intersect the observer — keep them visible */
  html.js .collection-card.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* instagram: 3-column profile-style grid */
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .ig-tile__mark { gap: .55rem; }
  .ig-tile__mark .star { width: 11px; height: 11px; }
  .ig-tile__word { font-size: .75rem; letter-spacing: .2em; }
  .ig-tile--6::before { background-size: 44px; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
}

@media (min-width: 960px) {
  :root { --header-h: 80px; }
  .nav-desktop { display: flex; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero-media { justify-self: end; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .collection-grid { grid-template-columns: repeat(4, 1fr); }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .hero-media { max-width: 560px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
