/* ==========================================================
   E-nvyt — shared styles
   Palette taken from the Envyt brand: greige paper, slate ink,
   sage ribbon, dusty blue from the invitations.
   ========================================================== */
:root {
  /* E-nvyt palette, taken from e-nvyt.com */
  --green: #b0c4b1;        /* main brand green */
  --cream: #f6ecdb;        /* brand cream */
  --paper: #fbf7f0;        /* light page base */
  --paper-2: #f6ecdb;
  --paper-3: #ece1cd;
  --ink: #4a5759;          /* brand slate (text, buttons) */
  --ink-soft: #66726f;
  --slate: #4a5759;
  --sage: #b0c4b1;
  --sage-deep: #6f8d74;
  --blue: #6f86a8;
  --seal: #b4975f;
  --line: rgba(55, 66, 68, .14);
  --shadow: 0 30px 60px -30px rgba(40, 50, 52, .35);
  --radius: 22px;

  --f-display: "Cormorant Garamond", "Amiri", Georgia, serif;
  --f-script: "Pinyon Script", "Aref Ruqaa", cursive;
  --f-body: "Jost", "Tajawal", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

html[lang="ar"] {
  --f-display: "Amiri", "Cormorant Garamond", serif;
  --f-script: "Aref Ruqaa", "Pinyon Script", serif;
  --f-body: "Tajawal", "Jost", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .22 0 0 0 0 .22 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(80px, 11vw, 140px); position: relative; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--f-body);
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
  display: inline-flex; align-items: center; gap: 12px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }

.h-display {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: .98;
  letter-spacing: -.015em;
  margin: 0;
}
.h-section {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -.01em;
  margin: 18px 0 0;
}
html[lang="ar"] .h-display, html[lang="ar"] .h-section { line-height: 1.35; letter-spacing: 0; }
.script {
  font-family: var(--f-script);
  font-weight: 400;
  color: var(--sage-deep);
  letter-spacing: 0;
}
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-soft); max-width: 56ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--slate); --fg: var(--paper-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  text-decoration: none; font-weight: 500; font-size: 15px; letter-spacing: .02em;
  border: 1px solid var(--bg);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0 10px 24px -14px rgba(40, 50, 52, .7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(40, 50, 52, .7); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: var(--ink); color: var(--paper-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s ease, box-shadow .3s ease;
}
.nav { background: var(--green); }
.nav.is-scrolled { background: rgba(176, 196, 177, .92); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.nav__logo img { height: 58px; width: auto; }
/* desktop: quiet text links with a thin underline for the current section */
.nav__links { display: flex; gap: clamp(16px, 2.2vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav__links a { position: relative; display: block; text-decoration: none; font-size: 14.5px; color: var(--ink); padding: 6px 0; white-space: nowrap; opacity: .78; transition: opacity .2s; }
.nav__links a i { display: none; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transition: transform .3s ease; }
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__menu-cta { display: none; }
section[id] { scroll-margin-top: 86px; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 999px; padding: 8px 14px; font-size: 14px;
  font-family: "Tajawal", "Jost", sans-serif;
}
.nav .btn { padding: 11px 20px; font-size: 14px; }
.menu-btn {
  display: none; position: relative; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-2);
}
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .35s ease, top .35s ease; }
.menu-btn span:nth-child(1) { top: 17px; }
.menu-btn span:nth-child(2) { top: 25px; }
.nav.is-open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .menu-btn span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1000px) {
  /* phones & tablets: full-screen menu with large numbered links */
  .nav__inner { height: 68px; }
  .nav__logo img { height: 48px; }
  .menu-btn { display: block; }
  .nav .btn--wa-nav { display: none; }
  .nav__menu {
    position: fixed; inset: 0; z-index: 2;
    display: flex; flex-direction: column; justify-content: center;
    padding: 90px max(var(--gutter), 8vw) 40px;
    background: var(--paper-2);
    background-image: radial-gradient(circle at 85% 10%, rgba(176,196,177,.55), transparent 45%);
    opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links li { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
  .nav.is-open .nav__links li { opacity: 1; transform: none; }
  .nav.is-open .nav__links li:nth-child(2) { transition-delay: .05s; }
  .nav.is-open .nav__links li:nth-child(3) { transition-delay: .1s; }
  .nav.is-open .nav__links li:nth-child(4) { transition-delay: .15s; }
  .nav.is-open .nav__links li:nth-child(5) { transition-delay: .2s; }
  .nav.is-open .nav__links li:nth-child(6) { transition-delay: .25s; }
  .nav__links a { display: flex; align-items: baseline; gap: 16px; opacity: 1; padding: 13px 0; border-bottom: 1px solid var(--line); font-family: var(--f-display); font-size: clamp(30px, 8vw, 42px); line-height: 1.1; }
  .nav__links a::after { display: none; }
  .nav__links a i { display: inline; font-style: normal; font-family: var(--f-body); font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); }
  .nav__links a.is-active span { font-style: italic; color: var(--sage-deep); }
  .nav__menu-cta { display: inline-flex; margin-top: 30px; align-self: flex-start; }
  body.menu-open { overflow: hidden; }
  body.menu-open .wa-float { opacity: 0; pointer-events: none; }
  .nav.is-open { backdrop-filter: none; box-shadow: none; }
  .nav__logo, .nav__actions { position: relative; z-index: 3; }
  section[id] { scroll-margin-top: 76px; }
}

/* ---------- phone frame ---------- */
/* Proportions taken from a real iPhone, in percentages so the
   corners, bezel and island stay realistic at any size. */
.phone {
  position: relative;
  aspect-ratio: 9 / 19.3;
  border-radius: 14% / 6.5%;
  padding: 2.8%;
  background: #15191a;
  box-shadow:
    inset 0 0 0 1px #6b7476,        /* thin metal edge */
    inset 0 0 0 2.5px #0c0e0f,
    var(--shadow);
}
.phone::before { /* dynamic island */
  content: ""; position: absolute; top: 2.6%; left: 50%; translate: -50% 0;
  width: 28%; aspect-ratio: 3.5 / 1; border-radius: 999px; background: #0b0d0e; z-index: 2;
}
.phone::after { /* side button */
  content: ""; position: absolute; top: 24%; right: -1.2%;
  width: 1.4%; height: 11%; border-radius: 0 3px 3px 0; background: #3a4244;
}
.phone__screen {
  width: 100%; height: 100%; border-radius: 11.5% / 5.4%; overflow: hidden;
  background: var(--paper-3);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}

/* ---------- footer ---------- */
.footer { background: var(--slate); color: #dfe3df; padding: 70px 0 34px; position: relative; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__logo { height: 60px; width: auto; filter: brightness(0) invert(.92); }
.footer h4 { font-family: var(--f-body); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #aeb8b4; margin: 6px 0 16px; font-weight: 500; }
html[lang="ar"] .footer h4 { letter-spacing: 0; font-size: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: #eef0ec; opacity: .85; }
.footer a:hover { opacity: 1; }
.footer p { color: #c8cfcb; max-width: 34ch; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 50px; padding-top: 24px; font-size: 14px; color: #aeb8b4; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- floating WhatsApp ---------- */
.wa-float {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.4);
  transition: transform .25s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- socials ---------- */
.socials { display: flex; gap: 10px; margin-top: 18px; }
.social { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); color: #eef0ec; opacity: 1 !important; transition: background .25s, color .25s, border-color .25s; }
.social:hover { background: var(--green); border-color: var(--green); color: var(--ink); }
.social svg { width: 19px; height: 19px; }
.nav__menu-social { display: none; }
@media (max-width: 1000px) {
  .nav__menu-social { display: flex; gap: 22px; margin-top: 22px; }
  .nav__menu-social a { color: var(--ink); text-decoration: none; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
}
