/* =========================================================================
   Packages page — loaded after style.css and header.css.
   Packages are tickets: index + name, a big price, a perforated tear line,
   then what's included (items added versus the previous package marked "+").
   Add-ons are price tiles, notes a numbered panel, then a WhatsApp help strip.
   Uses the editorial tokens so light/dark theme and Arabic (RTL) keep working.
   ========================================================================= */

.pk-main {
  --pk-mono: "JetBrains Mono", ui-monospace, monospace;
  --pk-ease: cubic-bezier(.16, 1, .3, 1);
  --pk-gutter: clamp(18px, 5vw, 80px);
  --pk-pad: clamp(22px, 2.2vw, 30px);
  display: block;
  padding: 0 var(--pk-gutter) clamp(70px, 9vw, 120px);
  color: var(--mono-text);
  overflow-x: clip;
}
.pk-main a { text-decoration: none; }
.pk-main h1, .pk-main h2, .pk-main h3 { color: var(--mono-text); }
.pk-main :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Hero ---------- */
.pk-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); align-items: end;
  gap: 28px clamp(30px, 6vw, 100px);
  padding: clamp(48px, 7vw, 100px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--mono-line);
}
.pk-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; color: var(--mono-muted); font: 500 11px/1.4 var(--editorial-sans); letter-spacing: .18em; text-transform: uppercase; }
.pk-kicker-num { color: var(--accent); font-family: var(--pk-mono); letter-spacing: .04em; direction: ltr; unicode-bidi: isolate; }
.pk-kicker-rule { width: clamp(32px, 5vw, 64px); height: 1px; background: currentColor; opacity: .5; }
.pk-hero h1 { margin: 0; font: 600 clamp(60px, 8.4vw, 132px)/.9 var(--editorial-serif); letter-spacing: -.04em; }
.pk-hero-side p { margin: 0 0 16px; color: var(--mono-muted); font: 400 16px/1.8 var(--editorial-sans); }
.pk-hero-tag { color: var(--mono-text); font: 500 11px/1.4 var(--pk-mono); letter-spacing: .14em; }

/* ---------- Tickets ---------- */
.pk-tickets-wrap { padding-top: clamp(30px, 4vw, 48px); }
.pk-legend { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 clamp(26px, 4vw, 44px); color: var(--mono-muted); font: 500 11px/1.3 var(--editorial-sans); letter-spacing: .12em; text-transform: uppercase; }
.pk-legend i, .pk-list li.is-new::before { font-style: normal; }
.pk-legend i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 14px/1 var(--editorial-sans); }

.pk-tickets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: clamp(12px, 1.4vw, 20px); }

.pk-card {
  --card-bg: color-mix(in srgb, var(--mono-panel) 70%, var(--mono-dark));
  --card-ink: var(--mono-text);
  --card-soft: var(--mono-muted);
  --card-line: var(--mono-line);
  position: relative; display: flex; flex-direction: column;
  padding: var(--pk-pad);
  background: var(--card-bg); color: var(--card-ink);
  border: 1px solid var(--card-line);
  transition: transform .6s var(--pk-ease), border-color .4s ease, box-shadow .6s ease;
  animation: pk-rise 1s var(--pk-ease) backwards;
}
.pk-card:nth-child(2) { animation-delay: .08s; }
.pk-card:nth-child(3) { animation-delay: .16s; }
.pk-card:nth-child(4) { animation-delay: .24s; }
@keyframes pk-rise { from { opacity: 0; transform: translateY(34px); } }
@media (hover: hover) {
  .pk-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 60%, var(--card-line)); box-shadow: 0 30px 60px -30px rgba(20, 14, 6, .35); }
}

.pk-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; min-height: 64px; }
.pk-index { color: var(--accent); font: 500 12px/1 var(--pk-mono); letter-spacing: .08em; direction: ltr; unicode-bidi: isolate; }
.pk-card h3 { flex: 1 1 auto; margin: 0; color: inherit !important; font: 600 clamp(24px, 2vw, 30px)/1.1 var(--editorial-serif); letter-spacing: -.01em; }
.pk-badge {
  position: absolute; top: -1px; inset-inline-end: var(--pk-pad);
  padding: 7px 12px; background: var(--accent); color: #fff;
  font: 600 10px/1 var(--editorial-sans); letter-spacing: .14em; text-transform: uppercase;
}

.pk-price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 0; }
.pk-amount { font: 600 clamp(42px, 3.8vw, 58px)/1 var(--editorial-serif); letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.pk-cur { color: var(--card-soft); font: 500 12px/1 var(--pk-mono); letter-spacing: .12em; }

/* Perforated tear line. The notches are real cut-outs: pricing.js measures the
   line (--tear-y) and a mask punches a half-circle into each edge, so the card's
   border genuinely stops there instead of running through a painted circle. */
.pk-tear { height: 0; margin: 26px calc(var(--pk-pad) * -1) 22px; border-top: 2px dashed color-mix(in srgb, var(--card-ink) 20%, transparent); }
.pk-card.has-notch {
  --notch: 12px;
  -webkit-mask:
    radial-gradient(circle at 0 var(--tear-y), #0000 var(--notch), #000 calc(var(--notch) + .5px)),
    radial-gradient(circle at 100% var(--tear-y), #0000 var(--notch), #000 calc(var(--notch) + .5px));
  -webkit-mask-composite: source-in;
          mask:
    radial-gradient(circle at 0 var(--tear-y), #0000 var(--notch), #000 calc(var(--notch) + .5px)),
    radial-gradient(circle at 100% var(--tear-y), #0000 var(--notch), #000 calc(var(--notch) + .5px));
          mask-composite: intersect;
  box-shadow: none !important; /* a mask would clip the shadow anyway */
}
/* Trace the card's border around each notch: a 1px ring just outside the hole.
   Its outer half falls outside the card and is masked away, leaving the curve.
   (Positions are from the padding box; --tear-y is from the border box.) */
.pk-card.has-notch::before,
.pk-card.has-notch::after {
  --ring: calc(var(--notch) + 1px);
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  top: calc(var(--tear-y) - 1px - var(--ring));
  width: calc(var(--ring) * 2); height: calc(var(--ring) * 2);
  border: 1px solid; border-color: inherit; border-radius: 50%;
  box-sizing: border-box;
}
.pk-card.has-notch::before { left: calc(-1px - var(--ring)); }
.pk-card.has-notch::after { right: calc(-1px - var(--ring)); }

.pk-list { display: grid; gap: 11px; margin: 0 0 26px; padding: 0; list-style: none; }
.pk-list li { position: relative; padding-inline-start: 26px; color: var(--card-soft); font: 400 14.5px/1.55 var(--editorial-sans); }
.pk-list li::before {
  content: ""; position: absolute; top: .38em; inset-inline-start: 0; width: 14px; height: 14px; border-radius: 50%;
  background: color-mix(in srgb, var(--card-ink) 10%, transparent);
}
.pk-list li::after {
  content: ""; position: absolute; top: .72em; inset-inline-start: 4.5px; width: 5px; height: 2.5px;
  /* Physical borders on purpose: a checkmark must not mirror in Arabic */
  border-left: 1.5px solid var(--card-ink); border-bottom: 1.5px solid var(--card-ink); transform: rotate(-45deg); opacity: .7;
}
.pk-list li.is-new { color: var(--card-ink); font-weight: 600; }
.pk-list li.is-new::before { content: "+"; display: grid; place-items: center; background: var(--accent); color: #fff; font: 600 12px/1 var(--editorial-sans); }
.pk-list li.is-new::after { display: none; }

.pk-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto;
  min-height: 52px; padding: 6px 6px 6px 18px;
  border: 1px solid var(--card-ink); color: var(--card-ink);
  font: 600 12px/1 var(--editorial-sans); letter-spacing: .1em; text-transform: uppercase;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}
html[dir="rtl"] .pk-cta { padding: 6px 18px 6px 6px; }
.pk-cta b { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; background: var(--card-ink); color: var(--card-bg); font-weight: 400; transition: background-color .35s ease, color .35s ease; }
/* The chip stays square; only the arrow moves: it leaves through the corner
   while its twin (the text-shadow) slides in from the opposite corner. */
.pk-cta b i { display: block; font-style: normal; text-shadow: -26px 26px 0 currentColor; transition: transform .55s var(--pk-ease); }
.pk-cta:hover { background: var(--card-ink); color: var(--card-bg); }
.pk-cta:hover b { background: var(--accent); color: #fff; }
.pk-cta:hover b i { transform: translate(26px, -26px); }
html[dir="rtl"] .pk-cta b { transform: scaleX(-1); }

/* VIP: the inverted ticket, on the same baseline as the others */
.pk-card.is-featured {
  --card-bg: var(--mono-text);
  --card-ink: var(--mono-dark);
  --card-soft: color-mix(in srgb, var(--mono-dark) 68%, var(--mono-text));
  --card-line: var(--mono-text);
  box-shadow: 0 34px 70px -28px rgba(20, 14, 6, .45);
}
.pk-card.is-featured .pk-cta { border-color: var(--accent); background: var(--accent); color: #fff; }
.pk-card.is-featured .pk-cta b { background: var(--mono-dark); color: var(--mono-text); }
.pk-card.is-featured .pk-cta:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }

/* ---------- Shared section title ---------- */
.pk-section-title {
  display: flex; align-items: center; gap: 16px; margin: 0 0 clamp(24px, 3vw, 36px);
  font: 600 clamp(34px, 3.6vw, 54px)/1 var(--editorial-serif); letter-spacing: -.03em;
}
.pk-section-title::after { content: ""; flex: 1; height: 1px; background: var(--mono-line); }

/* ---------- Add-ons: price tiles ---------- */
.pk-addons { padding-top: clamp(80px, 10vw, 140px); }
.pk-addon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); margin: 0; padding: 0; list-style: none; }
.pk-addon-grid li {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
  min-height: 150px; padding: 20px; border: 1px solid var(--mono-line);
  transition: border-color .35s ease, background-color .35s ease;
}
.pk-addon-grid li::before { content: "+"; position: absolute; top: 14px; inset-inline-end: 16px; color: var(--accent); font: 400 20px/1 var(--editorial-sans); transition: rotate .5s var(--pk-ease); }
.pk-addon-grid li:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pk-addon-grid li:hover::before { rotate: 90deg; }
.pk-addon-name { max-width: 85%; color: var(--mono-text); font: 500 15px/1.5 var(--editorial-sans); }
.pk-addon-price { color: var(--accent); font: 600 clamp(22px, 1.9vw, 28px)/1 var(--editorial-serif); font-variant-numeric: lining-nums; }

/* ---------- Notes: numbered panel ---------- */
.pk-notes { padding-top: clamp(70px, 9vw, 120px); }
.pk-notes ol {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px);
  margin: 0; padding: clamp(10px, 2vw, 22px) clamp(20px, 3vw, 40px);
  background: color-mix(in srgb, var(--mono-panel) 70%, var(--mono-dark)); border: 1px solid var(--mono-line);
  list-style: none; counter-reset: note;
}
.pk-notes li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--mono-line); color: var(--mono-muted); font: 400 15px/1.7 var(--editorial-sans);
  counter-increment: note;
}
.pk-notes li::before { content: counter(note, decimal-leading-zero); color: var(--accent); font: 500 12px/1 var(--pk-mono); direction: ltr; }
.pk-notes li:nth-last-child(-n + 2) { border-bottom: 0; }

/* ---------- Help strip ---------- */
.pk-help {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px;
  margin-top: clamp(70px, 9vw, 120px); padding: clamp(28px, 4vw, 46px) clamp(22px, 4vw, 52px);
  background: var(--mono-text); color: var(--mono-dark);
}
.pk-help h2 { margin: 0 0 8px; color: var(--mono-dark) !important; font: 600 clamp(28px, 3vw, 44px)/1.1 var(--editorial-serif); letter-spacing: -.02em; }
.pk-help p { margin: 0; color: color-mix(in srgb, var(--mono-dark) 70%, var(--mono-text)); font: 400 15.5px/1.7 var(--editorial-sans); }
.pk-wa {
  display: inline-flex; align-items: center; gap: 18px; min-height: 58px; padding: 7px 7px 7px 24px;
  background: #25d366; color: #fff !important; font: 700 13px/1 var(--editorial-sans); letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .35s ease;
}
html[dir="rtl"] .pk-wa { padding: 7px 24px 7px 7px; }
.pk-wa b { display: grid; place-items: center; width: 44px; height: 44px; background: #fff; color: #128c4b; transition: transform .5s var(--pk-ease); }
.pk-wa:hover { background: #1fb457; }
.pk-wa:hover b { transform: scale(1.08) rotate(-8deg); }

/* ---------- Arabic ---------- */
html[dir="rtl"] .pk-hero h1,
html[dir="rtl"] .pk-card h3,
html[dir="rtl"] .pk-section-title,
html[dir="rtl"] .pk-help h2 { font-family: var(--editorial-arabic-display); font-weight: 700; letter-spacing: 0; }
html[dir="rtl"] .pk-hero h1 { font-size: clamp(50px, 6.4vw, 96px); line-height: 1.2; }
html[dir="rtl"] .pk-card h3 { font-size: clamp(21px, 1.7vw, 26px); line-height: 1.35; }
html[dir="rtl"] .pk-section-title { font-size: clamp(30px, 3vw, 44px); line-height: 1.3; }
html[dir="rtl"] .pk-help h2 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.35; }
html[dir="rtl"] .pk-amount, html[dir="rtl"] .pk-addon-price { font-family: var(--editorial-arabic-display); font-weight: 700; letter-spacing: 0; }
html[dir="rtl"] .pk-kicker,
html[dir="rtl"] .pk-legend,
html[dir="rtl"] .pk-badge,
html[dir="rtl"] .pk-cta,
html[dir="rtl"] .pk-wa,
html[dir="rtl"] .pk-hero-tag,
html[dir="rtl"] .pk-cur { font-family: var(--editorial-arabic-sans); font-weight: 700; letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .pk-kicker, html[dir="rtl"] .pk-legend, html[dir="rtl"] .pk-hero-tag { font-size: 14px; font-weight: 600; }
html[dir="rtl"] .pk-badge { font-size: 13px; }
html[dir="rtl"] .pk-cta, html[dir="rtl"] .pk-wa { font-size: 15px; }
html[dir="rtl"] .pk-cur { font-size: 15px; }
html[dir="rtl"] .pk-hero-side p,
html[dir="rtl"] .pk-list li,
html[dir="rtl"] .pk-addon-name,
html[dir="rtl"] .pk-notes li,
html[dir="rtl"] .pk-help p { font-family: var(--editorial-arabic-sans); }
html[dir="rtl"] .pk-list li { font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .pk-tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .pk-card-head { min-height: 0; }
  .pk-addon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pk-hero { grid-template-columns: 1fr; padding-top: 40px; }
  .pk-legend { justify-content: flex-start; }
  .pk-tickets { grid-template-columns: 1fr; }
  /* VIP leads on phones */
  .pk-card.is-featured { order: -1; }
  .pk-addon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-addon-grid li { min-height: 130px; padding: 16px; }
  .pk-addon-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }
  .pk-notes ol { grid-template-columns: 1fr; }
  .pk-notes li:nth-last-child(2) { border-bottom: 1px solid var(--mono-line); }
  .pk-help { flex-direction: column; align-items: stretch; }
  .pk-wa { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .pk-card { animation: none; transition: none; }
}
