:root {
  --red: #DF5557;
  --red-deep: #c44345;
  --gold: #D9B368;
  --char: #495059;
  --char-dark: #2E353C;
  --paper: #FBFAF8;
  --line: rgba(46, 53, 60, .10);
  --card: #ffffff;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(46,53,60,.05), 0 8px 24px -12px rgba(46,53,60,.18);
  --shadow-lg: 0 18px 50px -22px rgba(46,53,60,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--char-dark);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 420px at 85% -8%, rgba(217,179,104,.16), transparent 70%),
    radial-gradient(760px 380px at 8% 4%, rgba(223,85,87,.10), transparent 72%);
  background-repeat: no-repeat;
}

h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(251, 250, 248, .78);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px rgba(223,85,87,.15);
  flex: 0 0 auto;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-tag {
  font-size: 10.5px; letter-spacing: .16em; color: var(--char);
  opacity: .65; border-inline-start: 1px solid var(--line); padding-inline-start: 10px;
  white-space: nowrap;
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 10px 24px -12px rgba(223,85,87,.85);
}
.btn-primary:hover { background: var(--red-deep); box-shadow: 0 16px 30px -14px rgba(223,85,87,.95); }
.btn-ghost {
  background: rgba(255,255,255,.7); color: var(--char-dark);
  border-color: var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: rgba(223,85,87,.45); color: var(--red-deep); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 8px 15px; font-size: 13px; }

/* ── hero ── */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px) 40px; }
.hero { position: relative; padding: clamp(44px, 7vw, 86px) 0 clamp(28px, 4vw, 44px); text-align: center; }
.hero-glow {
  position: absolute; left: 10%; right: 10%; top: -8%; height: 320px;
  background: radial-gradient(closest-side, rgba(217,179,104,.30), transparent);
  filter: blur(6px); pointer-events: none; z-index: 0;
}
.hero > :not(.hero-glow) { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--char); background: rgba(217,179,104,.18);
  border: 1px solid rgba(217,179,104,.42);
  padding: 6px 15px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 6vw, 58px); font-weight: 900; margin-bottom: 16px; }
.lede {
  max-width: 640px; margin: 0 auto; font-size: clamp(15px, 2.2vw, 17.5px);
  color: var(--char); font-weight: 300; line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.hint { margin-top: 16px; font-size: 13px; color: var(--char); opacity: .7; }

/* ── sections ── */
.section { padding: clamp(30px, 5vw, 56px) 0 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 8px; }
.section-head p { color: var(--char); font-weight: 300; font-size: 15px; }

/* ── slides grid ── */
.grid {
  display: grid; gap: clamp(14px, 2.2vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display: flex; flex-direction: column;
  animation: fadeUp .5s cubic-bezier(.22,.8,.3,1) both;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(223,85,87,.28); }
.card-thumb {
  display: block; background: #EDEBE6; aspect-ratio: 4 / 5; overflow: hidden;
  position: relative;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(46,53,60,.06);
  pointer-events: none;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-num {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--red); opacity: .85;
}
.card-title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── source files ── */
.files { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.file {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: fadeUp .5s cubic-bezier(.22,.8,.3,1) both;
}
.file:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(217,179,104,.55); }
.file-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(223,85,87,.10); color: var(--red-deep);
  border: 1px solid rgba(223,85,87,.20);
}
.file-icon.gold { background: rgba(217,179,104,.18); color: #8a6b28; border-color: rgba(217,179,104,.45); }
.file-main { flex: 1; min-width: 0; }
.file-title { font-size: 15px; font-weight: 600; }
.file-desc { font-size: 12.5px; color: var(--char); opacity: .82; font-weight: 300; line-height: 1.6; }
.file-dl {
  align-self: center; flex: 0 0 auto;
  font-size: 12.5px; font-weight: 600; color: var(--red-deep);
  border: 1px solid rgba(223,85,87,.28); border-radius: 999px; padding: 7px 14px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.file-dl:hover { background: var(--red); color: #fff; transform: translateY(-1px); }

/* ── steps ── */
.note {
  background: rgba(255,255,255,.6); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 32px);
  margin-top: clamp(30px, 5vw, 56px);
}
.steps { margin: 0; padding-inline-start: 22px; color: var(--char); font-weight: 300; line-height: 2; }
.steps li { margin-bottom: 6px; }
.steps strong { color: var(--char-dark); font-weight: 700; }

/* ── footer ── */
.foot {
  max-width: 1180px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 40px) 46px;
  border-top: 1px solid var(--line); text-align: center; font-size: 13px;
}
.foot .muted { color: var(--char); opacity: .62; margin-top: 6px; font-size: 12px; }

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

@media (max-width: 620px) {
  .brand-tag { display: none; }
  .nav .btn { padding: 9px 15px; font-size: 13px; }
  .hero-actions .btn { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card-body { padding: 11px 12px 13px; }
  .card-title { font-size: 13.5px; }
  .files { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- sandboxed-iframe download warning --- */
.frame-warn {
  margin: 18px 0 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(217, 179, 104, .45);
  background: linear-gradient(180deg, rgba(217,179,104,.14), rgba(217,179,104,.06));
  backdrop-filter: blur(12px);
  color: var(--char-dark);
}
.frame-warn[hidden] { display: none; }
.frame-warn.pulse { animation: fwPulse .9s ease 2; }
@keyframes fwPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,179,104,0); }
  50% { box-shadow: 0 0 0 6px rgba(217,179,104,.18); }
}
.fw-icon {
  flex: 0 0 30px; height: 30px; width: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #D9B368; color: #12161c;
  font-weight: 900; font-size: 17px;
}
.fw-body strong { display: block; font-size: 15px; margin-bottom: 4px; }
.fw-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.7; opacity: .85; }
.fw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .frame-warn { margin: 14px 14px 0; flex-direction: column; }
}

/* --- raw direct links --- */
.raw { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.raw li {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline;
  padding: 10px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.raw span { font-weight: 700; font-size: 13px; color: var(--char-dark); min-width: 96px; }
.raw code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; direction: ltr; text-align: left; word-break: break-all;
  color: #8a4b4c; background: rgba(223,85,87,.06);
  padding: 3px 8px; border-radius: 8px; flex: 1 1 240px;
}
