/* =========================================================
   SHAHd SENIOR ARTIST — v1
   Easy theme edits: change the variables below only.
   ========================================================= */
:root {
  --bg: #100916;
  --bg-deep: #07040b;
  --purple: #2a1535;
  --purple-soft: #4a295b;
  --gold: #d9b56d;
  --gold-bright: #f2d79a;
  --ivory: #f7f0df;
  --rose: #c58e99;
  --muted: #b8aebd;
  --glass: rgba(22, 13, 29, 0.68);
  --border: rgba(242, 215, 154, 0.24);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 20% 15%, rgba(93, 45, 112, 0.26), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(181, 130, 78, 0.12), transparent 30%),
    var(--bg-deep);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
.hidden { display: none !important; }

.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.ambient-orb { position: fixed; width: 38vw; height: 38vw; border-radius: 50%; filter: blur(100px); opacity: .14; pointer-events: none; }
.orb-one { background: #7d3d95; top: -16vw; left: -10vw; }
.orb-two { background: #c39555; right: -16vw; bottom: -18vw; }
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.particle { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-bright); opacity: .45; animation: drift var(--duration) linear infinite; }
@keyframes drift { from { transform: translateY(105vh) rotate(0); } to { transform: translateY(-10vh) rotate(360deg); } }

#experience { position: relative; z-index: 2; }
.screen {
  position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden;
  opacity: 0; visibility: hidden; transform: scale(1.025);
  transition: opacity .65s ease, transform .75s cubic-bezier(.22,.9,.26,1), visibility .65s;
  scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.screen.active { opacity: 1; visibility: visible; transform: scale(1); z-index: 5; }
.screen-inner { width: min(1180px, calc(100% - 36px)); min-height: 100%; margin: 0 auto; padding: 92px 0 110px; position: relative; z-index: 2; }

.eyebrow { color: var(--gold-bright); letter-spacing: .24em; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.display-title, .section-heading h2, .hero-copy h2, .final-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500; letter-spacing: -.035em; margin: 0;
}
.lead, .section-heading p { color: var(--muted); line-height: 1.7; }
.gold-button, .ghost-button {
  border-radius: 999px; padding: 14px 24px; border: 1px solid transparent; font-weight: 800;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.gold-button { color: #1a1012; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); box-shadow: 0 10px 32px rgba(217,181,109,.25); }
.gold-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(217,181,109,.36); }
.gold-button:disabled { opacity: .38; cursor: not-allowed; }
.ghost-button { background: rgba(255,255,255,.035); border-color: var(--border); color: var(--ivory); }
.ghost-button:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.centered { display: block; margin: 34px auto 0; }

/* Lock */
.lock-layout { display: grid; place-items: center; align-content: center; text-align: center; }
.vault-mark { width: 112px; height: 112px; margin: 28px 0; position: relative; display: grid; place-items: center; }
.vault-ring { position: absolute; inset: 0; border: 1px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 24px rgba(217,181,109,.16), 0 0 44px rgba(217,181,109,.12); animation: spin 14s linear infinite; }
.vault-ring::before, .vault-ring::after { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(242,215,154,.45); border-radius: 50%; }
.vault-ring::after { inset: 24px; border-style: solid; }
.vault-brush { font-size: 2.2rem; color: var(--gold-bright); }
@keyframes spin { to { transform: rotate(360deg); } }
.display-title { font-size: clamp(3rem, 8vw, 6.8rem); max-width: 900px; line-height: .95; }
.lead { font-size: 1.05rem; max-width: 560px; }
.unlock-card { width: min(600px, 100%); margin-top: 38px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.unlock-card label { display: block; margin-bottom: 16px; color: #e7dcea; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input-row input { min-width: 0; color: var(--ivory); background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 14px 18px; outline: none; }
.input-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,181,109,.1); }
.hint, .form-message { font-size: .82rem; margin: 12px 0 0; color: #95899a; }
.form-message.success { color: #d9c182; } .form-message.error { color: #e5a1ac; }
.reveal { opacity: 0; transform: translateY(18px); animation: revealUp .7s forwards; }
.delay-1{animation-delay:.12s}.delay-2{animation-delay:.22s}.delay-3{animation-delay:.34s}.delay-4{animation-delay:.48s}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* Reveal */
.reveal-layout { display: grid; place-items: center; }
.loading-scene { width: min(680px, 100%); text-align: center; }
.loading-scene h2 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(2.8rem, 8vw, 6rem); margin: 12px 0 34px; }
.mission-label { color: var(--gold); font-size: .7rem; letter-spacing: .24em; font-weight: 800; }
.progress-shell { width: 100%; height: 4px; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 999px; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); box-shadow: 0 0 24px var(--gold); transition: width .14s linear; }
.loading-percent { margin-top: 16px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.artist-reveal { width: 100%; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(34px, 7vw, 90px); align-items: center; }
.hero-media { position: relative; width: min(440px, 100%); margin: 0 auto; }
.hero-media img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 220px 220px 32px 32px; border: 1px solid var(--border); filter: saturate(.82) contrast(1.06); box-shadow: var(--shadow); }
.hero-glow { position: absolute; inset: 10% -10% -7%; background: radial-gradient(circle, rgba(201,155,84,.32), transparent 66%); z-index: -1; filter: blur(28px); }
.senior-stamp { position: absolute; right: -18px; bottom: 30px; width: 126px; height: 126px; border-radius: 50%; display: grid; place-items: center; text-align: center; color: var(--gold-bright); border: 1px solid var(--gold); background: rgba(16,9,22,.88); font-size: .62rem; letter-spacing: .16em; transform: rotate(-8deg); }
.senior-stamp strong { display: block; font-family: Georgia, serif; font-size: 1rem; letter-spacing: .04em; }
.hero-copy h2 { font-size: clamp(3.4rem, 8vw, 7rem); line-height: .85; margin: 18px 0 24px; }
.hero-copy h2 span { color: var(--gold-bright); font-style: italic; }
.hero-subtitle { font-size: 1.16rem; color: var(--rose); }
.body-copy { max-width: 620px; color: var(--muted); line-height: 1.8; }
.button-stack { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.reaction-overlay, .media-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 22px; background: rgba(5,3,8,.82); backdrop-filter: blur(15px); opacity: 0; visibility: hidden; transition: .35s ease; }
.reaction-overlay.open, .media-modal.open { opacity: 1; visibility: visible; }
.reaction-card { width: min(500px, 100%); text-align: center; background: #160c1c; border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 28px; box-shadow: var(--shadow); transform: scale(.92); transition: .35s; }
.reaction-overlay.open .reaction-card { transform: scale(1); }
.reaction-icon { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-size: 1.8rem; }
.reaction-card h3 { font-family: Georgia, serif; font-size: 2.2rem; margin: 0 0 10px; }
.reaction-card p { color: var(--muted); line-height: 1.7; }

/* Story */
.story-layout, .gallery-layout { padding-top: 82px; }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-heading h2 { font-size: clamp(3rem, 7vw, 5.7rem); margin: 12px 0 10px; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; position: relative; margin-bottom: 34px; }
.timeline::before { content: ""; position: absolute; height: 1px; top: 31px; left: 7%; right: 7%; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .35; }
.timeline-item { position: relative; z-index: 1; border: 1px solid var(--border); border-radius: 20px; min-height: 165px; padding: 18px; background: rgba(22,13,29,.62); color: var(--ivory); text-align: left; backdrop-filter: blur(12px); transition: .3s ease; }
.timeline-item:hover, .timeline-item.active { transform: translateY(-5px); border-color: rgba(242,215,154,.66); background: rgba(54,30,65,.76); }
.timeline-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; margin-bottom: 26px; background: var(--gold); color: #1a1118; font-size: .68rem; font-weight: 900; }
.timeline-title { display: block; font-family: Georgia, serif; font-size: 1.2rem; }
.timeline-caption { display: block; margin-top: 8px; color: #a89cab; font-size: .78rem; line-height: 1.5; }
.story-preview { display: grid; grid-template-columns: .88fr 1.12fr; min-height: 420px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass); box-shadow: var(--shadow); }
.story-preview img { width: 100%; height: 100%; max-height: 500px; object-fit: cover; }
.story-preview-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 6vw, 72px); }
.story-preview-copy span { color: var(--gold); font-size: .7rem; font-weight: 900; letter-spacing: .22em; }
.story-preview-copy h3 { font-family: Georgia, serif; font-size: clamp(2.4rem, 6vw, 4.7rem); font-weight: 400; margin: 14px 0; }
.story-preview-copy p { color: var(--muted); line-height: 1.85; font-size: 1.04rem; }

/* Gallery */
.gallery-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.gallery-backdrop video { width: 100%; height: 100%; object-fit: cover; opacity: .18; filter: grayscale(.35) contrast(1.15); }
.gallery-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,4,11,.86), rgba(16,9,22,.92)); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 255px; gap: 16px; }
.gallery-card { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; padding: 0; background: #17101c; color: white; text-align: left; box-shadow: 0 14px 45px rgba(0,0,0,.28); }
.gallery-card.tall { grid-row: span 2; } .gallery-card.wide { grid-column: span 2; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.8,.2,1), filter .4s; filter: saturate(.76) brightness(.84); }
.gallery-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 36%, rgba(5,3,8,.92)); }
.gallery-card span { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 18px; }
.gallery-card strong { display: block; font-family: Georgia, serif; font-size: 1.28rem; font-weight: 500; }
.gallery-card small { display: block; margin-top: 5px; color: #cfc3d1; }
.gallery-card:hover img { transform: scale(1.065); filter: saturate(1) brightness(.95); }
.media-dialog { width: min(950px, 100%); max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--border); border-radius: var(--radius); background: #120b17; box-shadow: var(--shadow); position: relative; }
.modal-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: rgba(8,4,10,.72); color: white; font-size: 1.5rem; }
.modal-media { min-height: 460px; background: #08050a; }
.modal-media img, .modal-media video { width: 100%; height: 100%; min-height: 460px; max-height: 78vh; object-fit: contain; }
.modal-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 58px); }
.modal-copy span { color: var(--gold); letter-spacing: .2em; font-size: .68rem; font-weight: 900; }
.modal-copy h3 { font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 400; margin: 14px 0; }
.modal-copy p { color: var(--muted); line-height: 1.85; }

/* Final */
.final-layout { display: grid; place-items: center; }
.final-intro { text-align: center; width: min(760px, 100%); }
.final-intro h2 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(3rem, 8vw, 6.2rem); line-height: 1; margin: 18px 0 44px; }
.meter-wrap { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass); }
.meter-labels { display: flex; justify-content: space-between; margin-bottom: 15px; color: var(--muted); }
.meter-labels strong { color: var(--gold-bright); }
#seniorMeter { width: 100%; accent-color: var(--gold); }
.meter-hint { color: #978b9b; margin: 18px 0 28px; }
.final-celebration { width: 100%; display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(35px, 7vw, 90px); align-items: center; }
.final-portrait-wrap { position: relative; }
.final-portrait-wrap img { width: 100%; max-height: 76vh; object-fit: cover; object-position: center top; border-radius: 240px 240px 34px 34px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.gold-halo { position: absolute; z-index: -1; inset: 10% -10% -8%; border-radius: 50%; background: radial-gradient(circle, rgba(217,181,109,.32), transparent 65%); filter: blur(34px); }
.final-copy h2 { font-size: clamp(4rem, 10vw, 8.5rem); line-height: .78; margin: 16px 0 30px; }
.final-copy h2 em { color: var(--gold-bright); font-weight: 400; }
.final-message { max-width: 700px; color: #c8bdca; line-height: 1.75; }
.final-message [lang="ar"] { font-family: Tahoma, Arial, sans-serif; line-height: 1.9; }
.final-copy blockquote { margin: 28px 0 0; padding: 18px 0 18px 22px; border-left: 2px solid var(--gold); font-family: Georgia, serif; color: #ede1cf; font-size: 1.22rem; line-height: 1.6; }
.signature { color: var(--gold-bright); font-weight: 800; letter-spacing: .06em; }
#confettiCanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* Controls */
.sound-toggle { position: fixed; z-index: 60; top: 18px; right: 18px; border: 1px solid var(--border); border-radius: 999px; padding: 10px 14px; background: rgba(10,6,13,.68); color: var(--ivory); backdrop-filter: blur(12px); display: flex; align-items: center; gap: 8px; }
.sound-icon { color: var(--gold); }
.sound-label { font-size: .72rem; }
.progress-nav { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: rgba(8,5,11,.62); backdrop-filter: blur(15px); }
.progress-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #695d6e; transition: .3s; }
.progress-dot.active { width: 28px; border-radius: 99px; background: var(--gold); }
.progress-dot:disabled { cursor: default; opacity: .45; }

@media (max-width: 900px) {
  body { overflow: hidden; }
  .screen-inner { width: min(100% - 24px, 760px); padding-top: 76px; }
  .artist-reveal, .story-preview, .final-celebration { grid-template-columns: 1fr; }
  .hero-media { width: min(330px, 88%); }
  .hero-copy, .final-copy { text-align: center; }
  .hero-copy .body-copy, .final-message { margin-left: auto; margin-right: auto; }
  .button-stack { justify-content: center; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
  .story-preview img { max-height: 390px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 230px; }
  .gallery-card.tall { grid-row: span 2; }
  .gallery-card.wide { grid-column: span 2; }
  .media-dialog { grid-template-columns: 1fr; }
  .modal-media, .modal-media img, .modal-media video { min-height: 320px; max-height: 55vh; }
  .final-portrait-wrap { width: min(380px, 90%); margin: 0 auto; }
  .final-copy blockquote { text-align: left; }
}

@media (max-width: 560px) {
  .screen-inner { padding-bottom: 92px; }
  .display-title { font-size: 3.55rem; }
  .input-row { grid-template-columns: 1fr; }
  .input-row .gold-button { width: 100%; }
  .artist-reveal { padding-top: 20px; }
  .hero-copy h2 { font-size: 3.65rem; }
  .senior-stamp { width: 100px; height: 100px; right: -4px; }
  .timeline { grid-template-columns: 1fr; }
  .timeline-item { min-height: 126px; }
  .timeline-number { margin-bottom: 14px; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 270px; }
  .gallery-card.tall, .gallery-card.wide { grid-row: auto; grid-column: auto; }
  .final-copy h2 { font-size: 4.45rem; }
  .sound-label { display: none; }
  .progress-nav { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* v2 — bilingual Egyptian Arabic support */
.ar-inline,
.ar-copy,
.ar-title,
.stamp-ar,
[lang="ar"] {
  font-family: "Tahoma", "Arial", sans-serif;
}
.ar-inline {
  display: inline-block;
  margin-top: .28rem;
  font-size: .72em;
  letter-spacing: 0;
  opacity: .82;
  line-height: 1.55;
}
.ar-copy {
  display: inline-block;
  margin-top: .45rem;
  line-height: 1.75;
  letter-spacing: 0;
  font-size: .94em;
  color: inherit;
  opacity: .92;
}
.ar-title {
  display: inline-block;
  margin-top: .35rem;
  font-size: .66em;
  line-height: 1.45;
  letter-spacing: 0;
  font-weight: 700;
}
.ar-title.small { font-size: .52em; }
.stamp-ar {
  display: block;
  margin-top: .35rem;
  font-size: .55rem;
  letter-spacing: 0;
  line-height: 1.3;
}
.timeline-caption [lang="ar"],
.gallery-card small { line-height: 1.55; }
.final-message [lang="ar"], blockquote [lang="ar"], .signature [lang="ar"] {
  display: inline-block;
  margin-top: .45rem;
  line-height: 1.8;
}
@media (max-width: 640px) {
  .ar-title { font-size: .58em; }
  .ar-copy { font-size: .88em; }
}
.video-sound-note {
  margin: .7rem 0 0;
  color: #f2d79a;
  font-size: .86rem;
  text-align: center;
  font-family: Tahoma, Arial, sans-serif;
}
