/* ══════════════════════════════════════════════════════════════
   Qarmousha — domain sale page
   Palette: desert night. Ink base, sand text, one gold accent.
   ══════════════════════════════════════════════════════════════ */

:root {
  --ink:        #0C0A09;
  --ink-2:      #121010;
  --ink-3:      #1A1615;
  --line:       #2A2422;
  --line-soft:  #221D1B;

  --text:       #EDE6DA;
  --muted:      #9C9084;
  --muted-2:    #6F655C;

  --gold:       #D4A537;
  --gold-soft:  #E8C878;
  --gold-dim:   rgba(212, 165, 55, .14);

  --wrap:       1180px;
  --pad:        clamp(20px, 5vw, 48px);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Roboto Mono", monospace;

  --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;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--gold-soft); text-decoration-color: rgba(232, 200, 120, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--ink); padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* film grain over everything, very light */
.grain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══════════════════ TYPE PRIMITIVES ══════════════════ */

.label {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 1.6rem;
  max-width: 18ch;
}

.sub {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: -.01em;
  margin: 4.5rem 0 1.5rem;
}

.lede { font-size: clamp(1.06rem, 1.9vw, 1.28rem); color: #D6CCBF; line-height: 1.6; }
.lede--wide { max-width: 60ch; margin-bottom: 3rem; }

p { margin: 0 0 1.15rem; color: var(--muted); }
p.lede { color: #D6CCBF; }
em { font-style: italic; color: #CFC3B4; }

/* ══════════════════ BUTTONS ══════════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--gold); color: #14100A;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em;
  padding: .92rem 1.6rem;
  border: 1px solid var(--gold); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgba(212,165,55,.6); }
.btn:active { transform: translateY(0); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: rgba(255,255,255,.04); border-color: var(--gold); color: var(--gold-soft); box-shadow: none; }

.btn--sm { padding: .58rem 1.1rem; font-size: .85rem; }
.btn--lg { padding: 1.05rem 2.2rem; font-size: 1rem; }

/* ══════════════════ NAV ══════════════════ */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(12, 10, 9, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand__mark { width: 26px; height: 26px; fill: var(--gold); flex: none; }
.brand__word {
  font-family: var(--serif); font-weight: 600; font-size: 1.12rem;
  letter-spacing: .01em;
}

.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: .9rem;
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--text); }

@media (max-width: 860px) { .nav__links { display: none; } }

/* ══════════════════ HERO ══════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: 8rem 4.5rem;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 32%;
  will-change: transform;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 2%, rgba(12,10,9,.78) 34%, rgba(12,10,9,.30) 66%, rgba(12,10,9,.55) 100%),
    linear-gradient(to right, rgba(12,10,9,.86) 0%, rgba(12,10,9,.38) 52%, rgba(12,10,9,.05) 100%);
}
.hero__content { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 1.4rem;
  border: 1px solid var(--gold-dim); border-radius: 999px; padding: .4rem .9rem;
  background: rgba(212,165,55,.06);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.hero__title { margin: 0 0 1.6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1.2rem; }
.hero__word {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(3rem, 12vw, 8.5rem);
  line-height: .88; letter-spacing: -.045em;
  background: linear-gradient(170deg, #FFF6E4 8%, #E4CFA0 46%, #B98F35 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__ar {
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  color: var(--gold); opacity: .82; font-weight: 400;
  line-height: 1;
}

.hero__lede { max-width: 54ch; font-size: clamp(1.02rem, 1.75vw, 1.22rem); color: #DCD3C6; }
.hero__lede em { color: var(--gold-soft); font-style: italic; }

.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2.2rem 0 2.6rem; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0 2.4rem; list-style: none; margin: 0; padding: 0;
  font-size: .84rem; color: var(--muted-2); letter-spacing: .04em;
}
.hero__meta li { padding: .35rem 0; }
.hero__meta strong { color: var(--text); font-weight: 500; }

.hero__scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 1px solid var(--line);
  border-radius: 999px; display: grid; place-items: start center; padding-top: 8px;
}
.hero__scroll span { width: 3px; height: 8px; border-radius: 2px; background: var(--gold); animation: drift 1.9s infinite; }
@keyframes drift { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* ══════════════════ TICKER ══════════════════ */

.ticker {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-2);
  overflow: hidden; padding: .85rem 0;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.ticker__track {
  display: flex; align-items: center; gap: 1.6rem; width: max-content;
  animation: slide 46s linear infinite;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted-2);
}
.ticker__track i { color: var(--gold); font-style: normal; font-size: .5rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ══════════════════ SECTIONS ══════════════════ */

.section { padding-block: clamp(5rem, 11vw, 9rem); position: relative; }
.section--alt { background: var(--ink-2); border-block: 1px solid var(--line-soft); }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split--rev .split__text { order: 2; }
.split__text p:last-child { margin-bottom: 0; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--rev .split__text { order: 0; }
}

/* ══════════════════ CARDS ══════════════════ */

.card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.card:hover { border-color: rgba(212,165,55,.4); transform: translateY(-3px); }

.card--def { margin: 0; position: sticky; top: 110px; }
@media (max-width: 880px) { .card--def { position: static; } }

.def__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; margin-bottom: .5rem; }
.def__word { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
.def__ipa { font-family: var(--mono); font-size: .85rem; color: var(--muted-2); }
.def__pos { font-size: .88rem; color: var(--gold); margin-bottom: 1rem; }
.def__pos [lang="ar"] { font-size: 1.15rem; margin-inline-start: .3rem; }
.def__body { color: #C8BEB2; margin-bottom: 1.2rem; }
.def__alt { font-size: .82rem; color: var(--muted-2); margin: 0; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.def__alt span { color: var(--muted); }
.def__alt span + span::before { content: ""; }

/* ══════════════════ STATS ══════════════════ */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden;
  margin-bottom: 4.5rem;
}
.stat { background: var(--ink-2); padding: 1.9rem 1.5rem; }
.stat__num {
  display: block;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  letter-spacing: -.02em; color: var(--gold-soft);
  margin-bottom: .6rem; line-height: 1.1;
}
.stat p { font-size: .89rem; margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats { grid-template-columns: 1fr; } }

/* ══════════════════ GALLERY ══════════════════ */

.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: 400px; gap: 1rem; }
@media (max-width: 880px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 300px; } .gal--tall { grid-column: span 2; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; } .gal--tall { grid-column: auto; } }

.gal { margin: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--ink-3); }
.gal img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) contrast(1.04) brightness(.93);
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.gal:hover img { transform: scale(1.045); filter: saturate(1) contrast(1.06) brightness(1); }
.gal figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.4rem 1rem .9rem;
  font-size: .8rem; color: #D8CFC2; letter-spacing: .02em;
  background: linear-gradient(to top, rgba(12,10,9,.92), transparent);
}

/* the archival plate is a scan, not a photograph — let it breathe instead of cropping */
.gal--paper { display: flex; flex-direction: column; background: #14110E; }
.gal--paper img { height: auto; max-height: 340px; object-fit: contain; padding: 1.2rem 1.2rem .4rem; filter: none; }
.gal--paper:hover img { transform: none; filter: none; }
.gal--paper figcaption { position: static; background: none; padding: .2rem 1.2rem 1.1rem; text-align: center; }

.heritage__imgs { display: grid; gap: 1rem; }
.heritage__imgs .gal { height: 300px; }
.heritage__imgs .gal--paper { height: auto; }

/* ══════════════════ FACTS ══════════════════ */

.facts { list-style: none; margin: 4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.facts li {
  padding: 1.5rem 1.8rem 1.5rem 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: .95rem;
}
.facts strong { color: var(--text); font-weight: 500; display: block; margin-bottom: .25rem; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

/* ══════════════════ DESERT BAND ══════════════════ */

.band { position: relative; min-height: 62svh; display: grid; place-items: center; overflow: hidden; }
.band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.band__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--ink) 0%, rgba(12,10,9,.42) 26%, rgba(12,10,9,.48) 72%, var(--ink) 100%);
}
.band__content { position: relative; text-align: center; padding-block: 5rem; }
.band__text {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.8rem); line-height: 1.35;
  color: #F2E9DA; margin: 0; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(12,10,9,.8);
}

/* ══════════════════ GRID OF CARDS ══════════════════ */

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid4 h3 { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin: 0 0 .7rem; letter-spacing: -.01em; }
.grid4 p { font-size: .92rem; margin: 0; }
@media (max-width: 980px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }

/* ══════════════════ CHIPS ══════════════════ */

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }
.chips li {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1.05rem; font-size: .87rem; color: var(--muted);
  background: var(--ink-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.chips li:hover { border-color: var(--gold); color: var(--gold-soft); }

/* ══════════════════ STEPS ══════════════════ */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.steps li { background: var(--ink); padding: 2rem 1.7rem; }
.section--alt .steps li { background: var(--ink-2); }
.steps__n { font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; color: var(--gold); }
.steps h4 { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; margin: .8rem 0 .6rem; }
.steps p { font-size: .9rem; margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ══════════════════ CONTACT FORM ══════════════════ */

.section--contact { padding-bottom: clamp(4rem, 8vw, 7rem); }

.form { max-width: 900px; margin-top: 2.5rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.4rem; }
.field label {
  display: block; font-size: .92rem; font-weight: 500; color: var(--text);
  margin-bottom: .55rem;
}
.field .opt { color: var(--muted-2); font-weight: 300; font-size: .85rem; }

.field input, .field textarea {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans); font-size: 1rem; font-weight: 300;
  padding: .9rem 1rem;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #5B524A; }
.field input:hover, .field textarea:hover { border-color: #3A322E; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  background: var(--ink-3);
  box-shadow: 0 0 0 3px rgba(212,165,55,.12);
}

.field.is-bad input, .field.is-bad textarea { border-color: #B4543F; }
.field__err { font-size: .82rem; color: #E08B75; margin: .45rem 0 0; min-height: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { margin: 1.2rem 0 0; font-size: .93rem; min-height: 1.4em; }
.form__status.is-ok { color: var(--gold-soft); }
.form__status.is-bad { color: #E08B75; }

.contact__alt { margin: 2.4rem 0 0; color: var(--muted); font-size: .96rem; }

/* ══════════════════ FOOTER ══════════════════ */

.footer { border-top: 1px solid var(--line-soft); background: var(--ink-2); padding-block: 3.5rem 2.5rem; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 2rem; }
.brand--foot { margin-right: 0; }
.footer__tag { margin: 0; font-size: .93rem; }

.credits { border-top: 1px solid var(--line-soft); padding-top: 1.4rem; }
.credits summary {
  cursor: pointer; font-size: .86rem; color: var(--muted);
  font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase;
  list-style: none;
}
.credits summary::-webkit-details-marker { display: none; }
.credits summary::before { content: "+ "; color: var(--gold); }
.credits[open] summary::before { content: "− "; }
.credits summary:hover { color: var(--text); }
.credits__intro { font-size: .87rem; margin: 1.2rem 0 .8rem; max-width: 66ch; }
.credits__list { list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--muted-2); columns: 2; column-gap: 2.5rem; }
.credits__list li { margin-bottom: .55rem; break-inside: avoid; }
.credits__list em { color: var(--muted); font-style: normal; }
@media (max-width: 720px) { .credits__list { columns: 1; } }

.footer__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
  font-size: .8rem;
}
.footer__bar p { margin: 0; color: var(--muted-2); }

/* ══════════════════ REVEAL ══════════════════ */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

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