/* ============================================================
   features.css — overwrite layer, loaded last.

   Contains the pieces that the current design iteration needs
   on top of style.css / mobile-first.css:
     01  tokens
     02  navbar (dock) rebuilt
     03  hero wordmark (original SVG ghost)
     04  hero name second line in white on its blue pill
     05  hero gallery (shadcn Gallery 4 grid)
     06  firman cards in the hero right flank
     07  firman section (QS. Al-Isra' 24-27)
     08  music pill
     09  ucapan / RSVP form and wish wall
     10  responsive
   ============================================================ */

/* ---------------------------------------------------------- 01 tokens */
:root {
  --brand-blue: #2563eb;
  --brand-blue-dark: #1d4ed8;
  --brand-blue-ink: #1e3a8a;
  --brand-blue-soft: #eff6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #475569;
  --line: #e2e8f0;
  --surface: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 6px 24px -12px rgba(15, 23, 42, .22);
  --shadow-lg: 0 24px 60px -32px rgba(37, 99, 235, .38);
}

/* ============================================================
   Minimal top bar — one wrapped pill: music + CTA together.

   style.css gives `main { position: relative; z-index: 1 }`. The
   header also carried z-index: 1, and on a tie the later DOM node
   wins — so <main> painted OVER the fixed nav and swallowed every
   tap (elementsFromPoint returned wish-card, not the button). The
   header therefore needs its own stacking context ABOVE main; the
   nav's z-index only orders it against its siblings inside header,
   it cannot escape its parent's context.
   ============================================================ */
/* Must beat mobile-first.css `body > main, body > header { z-index: 1 }`,
   which wins on specificity (0,0,1,1) over a bare `header` (0,0,0,1).
   A tie with <main> would put main on top, because it comes later in the DOM. */
body > header {
  position: relative;
  z-index: 1000 !important;
}

.nav-min {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(37, 99, 235, .18);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .10);
}

.nav-min-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #2563eb;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.nav-min-sep {
  width: 1px;
  height: 18px;
  flex: 0 0 auto;
  background: rgba(37, 99, 235, .2);
}

.nav-min-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease;
}

.nav-min-cta:hover { background: #1d4ed8; }
.nav-min-btn:hover { background: rgba(37, 99, 235, .1); }
.nav-min-btn:active, .nav-min-cta:active { transform: translateY(1px); }

.nav-min-btn[aria-pressed="true"] {
  background: var(--brand-blue-soft);
  color: var(--brand-blue-dark);
}

.nav-min-icon { width: 14px; height: 14px; }

@media (max-width: 480px) {
  .nav-min { top: 8px; right: 8px; padding: 4px; gap: 4px; }
  .nav-min-btn { height: 30px; padding: 0 10px; font-size: 11px; gap: 5px; }
  .nav-min-cta { height: 30px; padding: 0 11px; font-size: 11px; }
}

/* ============================================================
   04 HERO NAME — "Harun Rasyid." sits on the blue block, so its
   text must be white, not dark blue.
   ============================================================ */
.hero-name-sub {
  color: #fff !important;
}

.hero-name {
  color: var(--ink) !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
}

/* whatever wrapper paints the blue block behind the second line */
.hero-name-sub,
.hero-name .name-highlight,
.hero-name mark {
  background: linear-gradient(135deg, var(--brand-blue), #3b82f6);
  -webkit-background-clip: initial;
  background-clip: initial;
  padding: .04em .18em .1em;
  border-radius: .18em;
  color: #fff !important;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.accent-blue-dot { color: var(--brand-blue) !important; }

/* ============================================================
   05 HERO GALLERY — shadcn-studio "Gallery 4".
   4-column grid on desktop, 2 on mobile. The first cell is a 2x2
   hero tile, the two middle cells are singles, and the last cell
   spans two columns capped at 15rem. Every tile is clipped by a
   rounded frame and the photo scales up on hover.

   The source block is React + Tailwind; the same geometry is
   expressed here in plain CSS so the page stays build-free.
   ============================================================ */
.hero-tilted-wrap,
.hero-center-col.hero-tilted-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100% !important;
  margin-inline: 0 !important;
  align-self: center;
  justify-self: center;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;                  /* gap-6 */
  width: 100%;
  /* Explicit rows rather than aspect-ratio: the 2x2 hero tile then spans two
     real rows instead of being squeezed by the container ratio on phones. */
  grid-auto-rows: clamp(120px, 20vw, 200px);
}

.hero-gallery-cell {
  position: relative;
  margin: 0;
  min-height: 0;
  overflow: hidden;             /* overflow-hidden */
  border-radius: 10px;          /* rounded-lg */
  background: var(--brand-blue-soft);
}

.hero-gallery-cell--hero {
  grid-column: span 2;          /* col-span-2 */
  grid-row: span 2;             /* row-span-2 */
}

.hero-gallery-cell--wide {
  grid-column: span 2;          /* col-span-2 */
  max-height: 15rem;            /* max-h-60 */
}

.hero-gallery-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;  /* keep faces in frame on tall crops */
  transform: scale(1);
  transition: transform 300ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-gallery-cell:hover img { transform: scale(1.05); }   /* hover:scale-105 */

@media (min-width: 768px) {
  .hero-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(190px, 17vw, 270px);
  }
}

/* Motion-sensitive guests get no zoom flourish. */
@media (prefers-reduced-motion: reduce) {
  .hero-gallery-cell img { transition: none; }
  .hero-gallery-cell:hover img { transform: none; }
}

/* ============================================================
   06 FIRMAN CARDS in the hero right flank
   ============================================================ */
.hero-firman .hud-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.hero-firman .hud-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hero-firman .hud-idx {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--brand-blue-dark);
  text-transform: uppercase;
}

.hero-firman .hud-tag {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue-dark);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.hud-arab {
  margin: 0 0 8px;
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 17px;
  line-height: 2;
  direction: rtl;
  text-align: right;
  color: var(--ink);
}

.hero-firman .hud-card-desc {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-3);
}

.hero-firman .hud-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.hero-firman .tech-tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  border: 1px solid #dbeafe;
  color: var(--brand-blue-dark);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
}

/* ============================================================
   07 FIRMAN SECTION
   ============================================================ */
.firman-section { background: linear-gradient(180deg, #fff, #f8fafc); }

.firman-intro {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-3);
}

.firman-list {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.firman-verse {
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.firman-verse-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.firman-verse-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue-dark);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.firman-verse-ref {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-blue-dark);
}

.firman-arab {
  margin: 0 0 16px;
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: clamp(20px, 5.4vw, 26px);
  line-height: 2.05;
  direction: rtl;
  text-align: right;
  color: var(--ink);
}

.firman-latin {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--brand-blue-ink);
}

.firman-id {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-3);
}

.firman-closing {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--brand-blue-soft);
  border: 1px solid #dbeafe;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--brand-blue-ink);
  text-align: center;
}

/* ============================================================
   08 MUSIC pill state (already styled above, fade helper)
   ============================================================ */

/* ============================================================
   Section header atoms used by the Firman-derived layout.
   These classes exist in index.html but had no rules anywhere,
   so the eyebrows and subtitles rendered as raw body text.
   ============================================================ */
.section-head {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--brand-blue-soft);
  border: 1px solid #dbeafe;
  color: var(--brand-blue-dark);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.section-head .section-title { margin: 0 0 10px; }

.grad-text { color: var(--brand-blue); }

.section-head .section-sub {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ============================================================
   09 UCAPAN / RSVP
   Selectors here mirror the classes actually present in
   index.html: .form-field, .attend-group, .attend-option,
   .attend-box, .wish-list-head, .wish-list-title.
   ============================================================ */
.ucapan-section { background: #f8fafc; }

.ucapan-section .section-head { margin-bottom: 30px; }

.rsvp-form {
  max-width: 620px;
  margin: 0 auto 34px;
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field > label,
.form-field > .field-label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.form-field input[type="text"]::placeholder,
.form-field textarea::placeholder { color: #94a3b8; }

.form-field input[type="text"]:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.form-field textarea {
  min-height: 118px;
  resize: vertical;
}

/* ---------- attendance: two big tappable options ---------- */
.attend-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attend-option {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.attend-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.attend-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-2);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.attend-box svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.attend-option input:checked + .attend-box {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  color: var(--brand-blue-dark);
}

.attend-option input:focus-visible + .attend-box {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* ---------- submit ---------- */
.rsvp-submit {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand-blue);
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s ease, transform .12s ease, opacity .2s ease;
}

.rsvp-submit:hover { background: var(--brand-blue-dark); }
.rsvp-submit:active { transform: scale(.99); }
.rsvp-submit:disabled { opacity: .65; cursor: progress; }

.rsvp-submit .submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rsvp-spin .7s linear infinite;
}

.rsvp-submit.loading .submit-spinner { display: inline-block; }
@keyframes rsvp-spin { to { transform: rotate(360deg); } }

.form-note {
  min-height: 18px;
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--ink-3);
}

.form-note.ok { color: #047857; }
.form-note.err { color: #b91c1c; }

/* ---------- wish wall header ---------- */
.wish-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto 14px;
}

.wish-list-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}

.wish-count {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.wish-list {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 12px;
}

.wish-card {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.wish-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.wish-name {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.wish-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.wish-badge.yes { background: #dcfce7; color: #15803d; }
.wish-badge.no { background: #f1f5f9; color: #475569; }

.wish-time {
  margin-left: auto;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11px;
  color: #64748b;
}

.wish-text {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.wish-empty {
  padding: 22px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink-3);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

/* Pager under the wish wall. Only one page of cards is in the DOM at a time,
   so the section keeps a predictable height no matter how many guests wrote. */
.wish-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 820px;
  margin: 16px auto 0;
  padding: 0;
}

.wish-pager[hidden] { display: none; }

.wish-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-blue-dark);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}

.wish-pager-btn svg { width: 16px; height: 16px; flex: none; }

.wish-pager-btn:hover:not(:disabled) {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.wish-pager-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.wish-page-info {
  min-width: 108px;
  text-align: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-3);
}

@media (max-width: 420px) {
  .wish-pager { gap: 8px; }
  .wish-pager-btn { padding: 0 12px; font-size: 12.5px; }
  .wish-pager-btn span { display: none; }
  .wish-pager-btn svg { width: 18px; height: 18px; }
  .wish-page-info { min-width: 96px; font-size: 12px; }
}

/* ============================================================
   10 RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .brand-label { font-size: 10px; letter-spacing: .1em; }
  .dock-cta { height: 32px; padding: 0 13px; font-size: 10.5px; }

  .wordmark-text { font-size: clamp(44px, 15vw, 72px); }


  .hud-arab { font-size: 15px; line-height: 1.95; }
  .hero-firman .hud-card-desc { font-size: 12px; }

  .firman-verse { padding: 20px 16px; border-radius: var(--radius-md); }
  .firman-arab { font-size: 20px; }

  .rsvp-form { padding: 18px 16px; border-radius: var(--radius-md); }
  .rsvp-submit { width: 100%; justify-content: center; }
  .wish-card { padding: 14px; }
}

@media (max-width: 380px) {
  .dock-cta { display: none; }
  .attend-group { grid-template-columns: 1fr; }
}