/* ===========================================
   style.css — nuur.dev
   Dark editorial theme for a hospitality
   digital studio. Mobile-first, no framework.
   =========================================== */

/* ─────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────── */
:root {
  --bg:        #0b1610;
  --bg2:       #0f1e14;
  --bg3:       #0d1a12;
  --surface:   rgba(255,255,255,.028);
  --surfaceB:  rgba(255,255,255,.04);
  --text:      #dde8df;
  --muted:     rgba(221,232,223,.50);
  --muted2:    rgba(221,232,223,.28);
  --line:      rgba(221,232,223,.08);
  --lineB:     rgba(221,232,223,.14);
  --green:     #3d9e6a;
  --greenB:    #4cb87c;
  --greenDim:  rgba(61,158,106,.12);
  --greenGlow: rgba(61,158,106,.22);
  --serif:     "Fraunces", Georgia, serif;
  --body:      "EB Garamond", Georgia, serif;
  --arabic:    "Amiri", serif;
  --pad:       clamp(22px, 5.5vw, 52px);
  --max:       860px;
  --st:        env(safe-area-inset-top);
  --sb:        env(safe-area-inset-bottom);
  --sl:        env(safe-area-inset-left);
  --sr:        env(safe-area-inset-right);
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
}

a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; }
::selection { background: var(--greenDim); }

/* Film grain texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: .055;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") repeat;
  background-size: 180px;
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.wrap {
  position: relative; z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding-left:  calc(var(--pad) + var(--sl));
  padding-right: calc(var(--pad) + var(--sr));
}

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,22,16,.90);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-left:  calc(var(--pad) + var(--sl));
  padding-right: calc(var(--pad) + var(--sr));
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
  background: var(--bg2);
  transition: border-color .3s;
}
.logo:hover .logo-mark { border-color: rgba(61,158,106,.4); }

.logo-mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .28s;
}
.logo:hover .logo-mark img { opacity: .18; }

/* الحمد لله — same mechanism as ibrahimmalik.com avatar overlay */
.logo-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--arabic);
  font-weight: 700;
  font-size: 11.5px;
  color: #fff;
  opacity: 0;
  transition: opacity .28s;
  text-align: center;
  line-height: 1.25;
  padding: 3px;
}
.logo-mark:hover .logo-overlay,
.logo-mark:active  .logo-overlay { opacity: 1; }

.logo-type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-eyebrow {
  font-family: var(--body);
  font-size: 9.5px;
  letter-spacing: .28em;
  color: var(--muted2);
  text-transform: lowercase;
}
.logo-wordmark {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
  font-variant-numeric: oldstyle-nums;
}

/* ── Desktop nav links ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-a {
  font-family: var(--body);
  font-size: 13.5px;
  letter-spacing: .06em;
  color: var(--muted2);
  padding: 6px 12px;
  border-radius: 5px;
  transition: color .18s, background .18s;
}
.nav-a:hover { color: var(--text); background: rgba(221,232,223,.04); }

.nav-contact {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: .09em;
  color: var(--green);
  border: 1px solid rgba(61,158,106,.28);
  padding: 6px 15px;
  border-radius: 4px;
  transition: all .2s;
}
.nav-contact:hover { background: var(--greenDim); border-color: rgba(61,158,106,.5); }

/* ── Hamburger ── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  cursor: pointer;
  background: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
  padding: 3px;
}
.burger span {
  display: block;
  height: 1.5px;
  background: var(--muted2);
  border-radius: 2px;
  transition: all .24s ease;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg);  background: var(--text); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--text); }

/* ── Mobile drawer ── */
.drawer {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(9,17,12,.97);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}
.drawer.open { opacity: 1; pointer-events: all; }

.drawer-x {
  position: absolute;
  top: 18px;
  right: calc(var(--pad) + var(--sr));
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted2);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer a {
  font-family: var(--serif);
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
  padding: 10px 28px;
  transition: color .18s;
}
.drawer a:hover { color: var(--green); }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  padding-top:    clamp(64px, 12vw, 110px);
  padding-bottom: clamp(64px, 10vw,  96px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0; left: -20%;
  width: 80%; height: 100%;
  background: radial-gradient(ellipse at 30% 40%,
    rgba(61,158,106,.08) 0%, transparent 65%);
  pointer-events: none; z-index: -1;
}

.hero-watermark {
  position: absolute;
  top: -30px;
  right: clamp(-20px, -2vw, -10px);
  font-family: var(--arabic);
  font-weight: 700;
  font-size: clamp(160px, 28vw, 320px);
  color: rgba(61,158,106,.028);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.hero-inner { position: relative; z-index: 1; }

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: .09em;
  color: var(--green);
  border: 1px solid rgba(61,158,106,.22);
  background: rgba(61,158,106,.06);
  padding: 6px 14px;
  border-radius: 999px;
}

.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-loc {
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted2);
}

.hero-h {
  font-family: var(--serif);
  font-size: clamp(56px, 12vw, 118px);
  font-weight: 600;
  line-height: .88;
  letter-spacing: -.035em;
  font-variant-numeric: oldstyle-nums;
  margin-bottom: clamp(28px, 4vw, 40px);
}
.hero-h em {
  font-style: italic;
  font-weight: 200;
  color: var(--green);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.hero-tagline {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(15px, 2.2vw, 17.5px);
  line-height: 1.78;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--green);
  padding: 13px 26px;
  border-radius: 3px;
  transition: all .22s;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.hero-cta:hover {
  background: var(--greenB);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(61,158,106,.22);
}

.hero-ghost {
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: .07em;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .18s;
}
.hero-ghost:hover { color: var(--text); }

/* ─────────────────────────────────────────
   SHARED SECTION CHROME
───────────────────────────────────────── */
.section {
  padding: clamp(60px, 9vw, 96px) 0;
  border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: none; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(32px, 5vw, 48px);
  gap: 16px;
}
.sec-label {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .72;
}
.sec-num {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted2);
  font-variant-numeric: oldstyle-nums;
  font-style: italic;
}

/* ─────────────────────────────────────────
   SERVICES
───────────────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.svc {
  padding: clamp(24px, 3.5vw, 36px) clamp(22px, 3vw, 32px);
  background: var(--surface);
  border-right:  1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .25s;
  cursor: default;
}
.svc:nth-child(2n) { border-right: none; }
.svc:nth-child(3),
.svc:nth-child(4)  { border-bottom: none; }

.svc::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 0% 0%, var(--greenGlow) 0%, transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.svc:hover           { background: var(--surfaceB); }
.svc:hover::before   { opacity: .35; }

.svc-n {
  font-family: var(--body);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--green);
  opacity: .55;
  margin-bottom: 14px;
}
.svc-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(18px, 2.8vw, 22px);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin-bottom: 10px;
  transition: color .2s;
}
.svc:hover .svc-title { color: var(--green); }
.svc-desc {
  font-size: clamp(13.5px, 1.7vw, 15px);
  line-height: 1.68;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   WORK
───────────────────────────────────────── */
.work-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color .3s, transform .35s, box-shadow .35s;
  position: relative;
}
.work-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 5% 5%, rgba(61,158,106,.07) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.work-card:hover {
  border-color: rgba(61,158,106,.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 32px 64px rgba(0,0,0,.22);
}
.work-card:hover::before { opacity: 1; }

.work-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(22px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}
.work-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--green);
  opacity: .8;
}
.wdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.work-a {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted2);
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color .22s, border-color .22s;
}
.work-a:hover { color: var(--green); border-bottom-color: var(--green); }

.work-body {
  padding: clamp(24px, 3.5vw, 36px) clamp(22px, 3vw, 32px);
}
.work-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4.5vw, 36px);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin-bottom: 14px;
  transition: color .22s;
}
.work-card:hover .work-title { color: var(--green); }
.work-desc {
  font-size: clamp(14px, 1.8vw, 15.5px);
  line-height: 1.78;
  color: var(--muted);
  max-width: 560px;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}
.wtag {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted2);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all .2s;
}
.wtag:hover {
  color: var(--green);
  border-color: rgba(61,158,106,.25);
  background: var(--greenDim);
}

/* ─────────────────────────────────────────
   APPROACH
───────────────────────────────────────── */
.approach-list {
  display: flex;
  flex-direction: column;
}

.approach-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: clamp(24px, 3.5vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.approach-item:first-child { border-top: 1px solid var(--line); }
.approach-item:last-child  { border-bottom: none; }

.app-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 200;
  font-style: italic;
  color: var(--green);
  opacity: .38;
  line-height: 1;
  padding-top: 4px;
  transition: opacity .22s;
}
.approach-item:hover .app-num { opacity: .7; }

.app-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(18px, 2.5vw, 22px);
  letter-spacing: -.01em;
  margin-bottom: 8px;
  transition: color .22s;
}
.approach-item:hover .app-title { color: var(--green); }

.app-desc {
  font-size: clamp(13.5px, 1.7vw, 15px);
  line-height: 1.72;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-wrap {
  border: 1px solid rgba(61,158,106,.16);
  border-radius: 12px;
  padding: clamp(40px, 7vw, 72px) clamp(28px, 5vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-wrap::before {
  content: "";
  position: absolute;
  top: -80%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(61,158,106,.08) 0%, transparent 68%);
  pointer-events: none;
}

.contact-sup {
  font-family: var(--arabic);
  font-size: 15px;
  color: var(--green);
  opacity: .45;
  margin-bottom: 16px;
  letter-spacing: .08em;
}
.contact-h {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(44px, 9vw, 84px);
  line-height: .9;
  letter-spacing: -.035em;
  margin-bottom: 18px;
}
.contact-p {
  font-size: clamp(14.5px, 2vw, 16.5px);
  color: var(--muted);
  line-height: 1.78;
  max-width: 360px;
  margin: 0 auto 32px;
}

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

.c-email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--bg);
  background: var(--green);
  padding: 14px 28px;
  border-radius: 4px;
  min-height: 52px;
  transition: all .22s;
  -webkit-tap-highlight-color: transparent;
}
.c-email:hover {
  background: var(--greenB);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(61,158,106,.22);
}

.c-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 14px 22px;
  border-radius: 4px;
  min-height: 52px;
  cursor: pointer;
  transition: all .22s;
  -webkit-tap-highlight-color: transparent;
}
.c-copy:hover {
  color: var(--text);
  border-color: var(--lineB);
  background: var(--surface);
  transform: translateY(-2px);
}

/* Connect links — ibrahimmalik.com underline-reveal pattern */
.connect {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
  font-family: var(--body);
  font-size: 15.5px;
  font-weight: 500;
}
.connect a {
  position: relative;
  color: var(--muted2);
  transition: color .22s;
}
.connect a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 6px;
  background: var(--greenDim);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s;
  border-radius: 3px;
  z-index: -1;
}
.connect a:hover            { color: var(--green); }
.connect a:hover::after     { transform: scaleX(1); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  padding: 28px 0 calc(24px + var(--sb));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted2);
  letter-spacing: .04em;
}
.footer a { transition: color .18s; }
.footer a:hover { color: var(--green); }

/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.45); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero entrance — CSS only, no JS needed */
.h1 { animation: fadeUp .8s  ease .06s both; }
.h2 { animation: fadeUp .8s  ease .16s both; }
.h3 { animation: fadeUp .85s ease .24s both; }
.h4 { animation: fadeUp .8s  ease .36s both; }

/* Scroll-reveal elements (class applied by JS) */
.anim     { opacity: 0; }
.anim.in  { animation: fadeUp .75s ease both; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

/* Tablet */
@media (max-width: 720px) {
  .nav-menu { display: none; }
  .burger   { display: flex; }
  .drawer   { display: flex; }

  .hero-foot { grid-template-columns: 1fr; gap: 24px; }
  .hero-actions {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .services { grid-template-columns: 1fr; }
  .svc:nth-child(2n)          { border-right: none; }
  .svc:nth-child(1),
  .svc:nth-child(2),
  .svc:nth-child(3)           { border-bottom: 1px solid var(--line); }
  .svc:nth-child(4)           { border-bottom: none; }

  .approach-item { grid-template-columns: 36px 1fr; gap: 16px; }
}

/* Mobile */
@media (max-width: 480px) {
  :root { --pad: 20px; }

  .section { padding: 48px 0; }
  .hero-h  { font-size: clamp(46px, 15vw, 68px); }
  .hero-watermark { display: none; }
  .hero-meta      { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-loc        { display: none; }

  .work-bar        { flex-wrap: wrap; gap: 8px; }

  .contact-wrap    { padding: 32px 18px; }
  .contact-row     { flex-direction: column; align-items: stretch; }
  .c-email, .c-copy { justify-content: center; }

  .footer          { flex-direction: column; align-items: flex-start; }

  .approach-item   { grid-template-columns: 1fr; }
  .app-num         { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .h1, .h2, .h3, .h4,
  .anim, .anim.in, .pulse {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}
