/* readability fixes from the Impeccable critique
   Loads after the template CSS. Inline style="" colours/sizes on the
   template's markup (and the template's own !important rules) are the only reason for the !important flags below. */

:root {
  --rd-maroon: #721022;          /* 10.7:1 on blush */
  --rd-rose: #8b3a4b;            /* 6.9:1 on blush */
  --rd-gold-ink: #6f510a;        /* antique gold, 6.6:1 on #fff4ee, ~5.5:1 on the pink paper texture */
  --rd-terracotta-ink: #8f5230;  /* 5.7:1 on blush */
  --rd-gold-ornament: #a9792c;   /* decorative only */
  --rd-cream: #fffdf8;
  --rd-placeholder: #7d6158;     /* 5.6:1 on #fffefc */
  --rd-ring: #721022;
}

/* ------------------------------------------------------------------
   1. Browser surfaces themed from the palette
   ------------------------------------------------------------------ */
::selection { background: #f1d3b0; color: #4a0c18; }
html { accent-color: var(--rd-maroon); caret-color: var(--rd-maroon); scrollbar-color: #c9a55d transparent; }
input, textarea, select { caret-color: var(--rd-maroon); }
/* focused fields scroll clear of the fixed music button */
html { scroll-padding-bottom: 96px; }

/* ------------------------------------------------------------------
   2. Contrast: gold / terracotta text darkened to an antique ink
   ------------------------------------------------------------------ */
/* Great Vibes eyebrows: 24px (19.2px on phones) #b8860b = 3.0:1 -> 30px antique gold */
html body .im-couple-profile__eyebrow,
html body .im-gold-scratch__eyebrow,
html body .im-gallery-coverflow__eyebrow,
html body .im-banana-leaf__eyebrow,
html body .im-guest-rsvp .im-guest-rsvp__eyebrow {
  color: var(--rd-gold-ink) !important;
  font-size: 30px !important;
  line-height: 1.3;
}

/* "The Groom" / "The Bride": inline 11px #b8860b (3.0:1) */
html body .im-couple-profile__label {
  color: var(--rd-gold-ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: .32em;
}

/* "February 2027" on the scratch card #b8893f on #ffe4db = 2.6:1 */
html body .im-gold-scratch .im-gold-scratch__month { color: var(--rd-gold-ink) !important; }

/* #ForeverTogether #c27d58 = 3.05:1 */
html body .im-hashtag__tag[style*="#c27d58"] { color: var(--rd-terracotta-ink) !important; }

/* Ganesh shloka: 12px #b4673f = 3.9:1 */
html body .im-wording .im-wording__shloka {
  color: var(--rd-terracotta-ink) !important;
  font-size: 15px !important;
  line-height: 1.75;
}

/* cover ampersand #b8862f = 2.75:1 */
html body .im-hero-video-nc .im-hero-video-nc__ampersand { color: var(--rd-gold-ink) !important; }

/* wedding quote: Great Vibes #b8860b = 3.0:1 */
html body .im-wedding-quote .im-wedding-quote__text { color: var(--rd-gold-ink) !important; }

/* cover "Scroll" cue: 12px at 60% opacity */
html body .im-hero-video-nc__scroll span { font-size: 13px; }

/* RSVP placeholders #a08f87 on #fffefc = 3.1:1 */
html body .im-guest-rsvp { --im-rsvp-placeholder: var(--rd-placeholder); }
html body .im-guest-rsvp .im-guest-rsvp__field input::placeholder { color: var(--rd-placeholder); opacity: 1; }

/* ------------------------------------------------------------------
   3. No gradient text: solid ink, keep the template's colours
   ------------------------------------------------------------------ */
html body .im-couple-profile__name--gilded,
html body .im-gallery-coverflow__name--gilded,
html body .im-guest-rsvp .im-guest-rsvp__eyebrow,
html body .im-wedding-quote .im-wedding-quote__text,
html body .im-love-footer .im-love-footer__names {
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

/* ------------------------------------------------------------------
   4. Tiny text (11px) raised to 12-13px
   ------------------------------------------------------------------ */
html body .im-banana-leaf .im-banana-leaf__dress-label { font-size: 12px; }
@media (max-width: 640px) {
  html body .im-hero-video-nc.is-opened .im-hero-video-nc__eyebrow { font-size: 12.5px !important; }
}
@media (max-width: 600px) {
  html body .wedding-marquee .marquee-content span:not(.star) { font-size: 12px; }
}
@media (max-width: 480px) {
  html body .im-gold-scratch .im-gold-scratch__unit-label { font-size: 12px; letter-spacing: .12em; }
}

/* ------------------------------------------------------------------
   5. Line breaks: no single-word last lines
   ------------------------------------------------------------------ */
html body :is(p, li, figcaption, label) { text-wrap: pretty; }
html body :is(h1, h2, h3, h4,
  .im-couple-profile__parent-info,
  .im-couple-profile__center-text,
  .im-couple-profile__subtitle,
  .im-gallery-coverflow__subtitle,
  .im-gold-scratch__subtitle,
  .im-guest-rsvp__subtitle,
  .im-wedding-quote__text,
  .im-love-footer__thank-you,
  .im-wording__shloka) { text-wrap: balance; }

/* ------------------------------------------------------------------
   6. Visible keyboard focus, palette-coloured
   ------------------------------------------------------------------ */
html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--rd-ring);
  outline-offset: 3px;
}
/* cover: the button is the whole screen, so ring the pill */
html body .im-hero-video-nc .im-hero-video-nc__tap:focus-visible { outline: none; }
html body .im-hero-video-nc .im-hero-video-nc__tap:focus-visible .im-hero-video-nc__tap-pill {
  outline: 2px solid var(--rd-ring);
  outline-offset: 4px;
  border-radius: 999px;
}
html body .im-hero-video-nc .im-hero-video-nc__scroll:focus-visible { outline: 2px solid var(--rd-ring); outline-offset: 2px; border-radius: 8px; }
/* RSVP controls that set outline:none with no replacement */
html body .im-guest-rsvp .im-guest-rsvp__field input:focus-visible,
html body .im-guest-rsvp .im-guest-rsvp__step:focus-visible {
  outline: 2px solid var(--rd-ring);
  outline-offset: 2px;
}
html body .im-guest-rsvp .im-guest-rsvp__stepper input:focus-visible { outline-offset: -2px; border-radius: 8px; }
html body .im-guest-rsvp .im-guest-rsvp__phone select:focus-visible,
html body .im-guest-rsvp .im-guest-rsvp__phone input:focus-visible {
  outline: 2px solid var(--rd-ring);
  outline-offset: -3px;
  border-radius: 10px;
}
html body .im-gallery-polaroid__card:focus-visible { outline: 2px solid var(--rd-ring); outline-offset: 4px; }
html body .im-music-toggle .im-music-toggle__btn:focus-visible { outline: 2px solid var(--rd-ring); outline-offset: 3px; }
/* lightbox sits on a dark scrim: cream ring */
html body .im-gallery-coverflow__lightbox :is(button, a):focus-visible { outline: 2px solid var(--rd-cream); outline-offset: 3px; }

/* ------------------------------------------------------------------
   7. Tap targets >= 44px
   ------------------------------------------------------------------ */
html body .im-guest-rsvp .im-guest-rsvp__step { width: 44px; height: 44px; }
html body .im-guest-rsvp .im-guest-rsvp__stepper { padding: 3px; }
html body .im-guest-rsvp .im-guest-rsvp__stepper input { min-height: 44px; }
html body .im-guest-rsvp .im-guest-rsvp__event-option { min-height: 44px; }
html body .im-gallery-coverflow__lightbox .im-gallery-coverflow__lightbox-nav { width: 44px; height: 44px; }
html body .im-hero-video-nc .im-hero-video-nc__scroll { min-width: 44px; min-height: 44px; }

/* iOS zooms into fields under 16px */
html body .im-guest-rsvp .im-guest-rsvp__field input,
html body .im-guest-rsvp .im-guest-rsvp__phone select,
html body .im-guest-rsvp .im-guest-rsvp__phone input { font-size: 16px; }

/* ------------------------------------------------------------------
   8. Ornament glyphs (❖ ✦ ❦ ✿) have no web font and turn into boxes
      on many phones: hide the glyph, draw the same ornament as SVG.
   ------------------------------------------------------------------ */
:root {
  --rd-orn-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C12.9 7.6 16.4 11.1 24 12 16.4 12.9 12.9 16.4 12 24 11.1 16.4 7.6 12.9 0 12 7.6 11.1 11.1 7.6 12 0Z'/%3E%3C/svg%3E");
  --rd-orn-lozenge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .5 15 9 12 11.2 9 9ZM23.5 12 15 15 12.8 12 15 9ZM12 23.5 9 15 12 12.8 15 15ZM.5 12 9 9 11.2 12 9 15Z'/%3E%3C/svg%3E");
  --rd-orn-leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.6 17.9 3 14.3 3.6 10.2 4.1 6.9 8.4 5.6 12 9.6 15.6 5.6 19.9 6.9 20.4 10.2 21 14.3 17.4 17.9 12 22Z'/%3E%3Cpath d='M12 9.6C11.4 6 9.8 3.6 6.8 2.2' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --rd-orn-flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='translate(12 12)'%3E%3Cellipse cy='-6.2' rx='3.6' ry='5.2'/%3E%3Cellipse cy='-6.2' rx='3.6' ry='5.2' transform='rotate(72)'/%3E%3Cellipse cy='-6.2' rx='3.6' ry='5.2' transform='rotate(144)'/%3E%3Cellipse cy='-6.2' rx='3.6' ry='5.2' transform='rotate(216)'/%3E%3Cellipse cy='-6.2' rx='3.6' ry='5.2' transform='rotate(288)'/%3E%3C/g%3E%3C/svg%3E");
}

/* glyph spans: the glyph is pushed out of its own clipped box and the
   ornament is a masked ::before in the template's ornament colour */
html body .wedding-marquee .marquee-content .star,
html body .im-banana-leaf__divider > span,
html body .im-banana-leaf .im-banana-leaf__ornament,
html body .im-love-footer .im-love-footer__floral-glyph,
html body .im-preview-loader__divider-glyph {
  display: inline-block;
  position: relative;
  width: 1em;
  height: 1em;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 200%;
  color: var(--rd-maroon);
}
html body .wedding-marquee .marquee-content .star::before,
html body .im-banana-leaf__divider > span::before,
html body .im-banana-leaf .im-banana-leaf__ornament::before,
html body .im-love-footer .im-love-footer__floral-glyph::before,
html body .im-preview-loader__divider-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--rd-orn-color, var(--rd-gold-ornament));
  -webkit-mask: var(--rd-orn, var(--rd-orn-star)) center / contain no-repeat;
  mask: var(--rd-orn, var(--rd-orn-star)) center / contain no-repeat;
}
html body .wedding-marquee .marquee-content .star { --rd-orn: var(--rd-orn-star); --rd-orn-color: #d9b878; font-size: 12px; color: #fff4ee; }
html body .im-banana-leaf__divider > span { --rd-orn: var(--rd-orn-lozenge); --rd-orn-color: #b8893f; font-size: 12px; }
html body .im-banana-leaf .im-banana-leaf__ornament { --rd-orn: var(--rd-orn-lozenge); --rd-orn-color: #b8893f; display: block; margin: 10px auto 0; }
html body .im-love-footer .im-love-footer__floral-glyph { --rd-orn: var(--rd-orn-leaf); --rd-orn-color: var(--rd-rose); }
html body .im-love-footer .im-love-footer__floral-glyph--flower,
html body .im-preview-loader__divider-glyph { --rd-orn: var(--rd-orn-flower); }
html body .im-love-footer .im-love-footer__floral-glyph--flower { font-size: 16px; }
/* the second hedera leaf faces the other way, like ❦ mirrored */
html body .im-love-footer .im-love-footer__floral-glyph--flower + .im-love-footer__floral-glyph { transform: scaleX(-1); }

/* scratch card hint ornament: the ✦ is a bare text node between two rules */
html body .im-gold-scratch .im-gold-scratch__ornament {
  color: var(--rd-maroon);
  -webkit-text-fill-color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a9792c' d='M12 0C12.9 7.6 16.4 11.1 24 12 16.4 12.9 12.9 16.4 12 24 11.1 16.4 7.6 12.9 0 12 7.6 11.1 11.1 7.6 12 0Z'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

/* ------------------------------------------------------------------
   9. Decoration stays behind the words
   ------------------------------------------------------------------ */
/* falling petals (fixed, z-index 30) pass behind text blocks instead of over them */
html body .im-wording .im-wording__wrap,
html body .im-couple-profile .im-couple-profile__heading,
html body .im-couple-profile .im-couple-profile__card-reveal,
html body .im-couple-profile .im-couple-profile__center-text,
html body .im-gold-scratch .im-gold-scratch__heading,
html body .im-gold-scratch .im-gold-scratch__wrap,
html body .im-gold-scratch .im-gold-scratch__countdown,
html body .im-gallery-coverflow .im-gallery-coverflow__heading,
html body .im-banana-leaf .im-banana-leaf__inner,
html body .im-guest-rsvp .im-guest-rsvp__heading,
html body .im-guest-rsvp .im-guest-rsvp__card,
html body .im-guest-rsvp .im-guest-rsvp__map-card,
html body .im-wedding-quote,
html body .im-love-footer .im-love-footer__inner {
  position: relative;
  z-index: 31;
}

/* footer hearts were painted in the same maroon as the date and venue */
html body .im-love-footer .im-love-footer__floating-heart svg { fill: #e6b9bd; stroke: #e6b9bd; }

/* the last lines of the footer can scroll clear of the music button */
@media (max-width: 767px) {
  html body .im-love-footer { padding-bottom: 96px; }
}

/* Why "Send RSVP" is disabled (text set by assets/js/a11y.js) */
.im-guest-rsvp__hint {
  margin: 10px 0 0;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #6e4a3f;
}
