﻿/* ============================================================
   engayged-reset.css  EnGAYged Weddings, Inc.
   Modern baseline reset, applied to all pages.
   Philosophy (vs. the 2009 Meyer reset this replaces):
   keep useful browser defaults, fix real cross-browser
   problems, and enable modern layout behaviors.  
   Notice what's not in it: no font-family, no colors, no widths — a reset defines behavior, not design. 
   Standards-only (W3C/WHATWG, no preprocessor, no framework).
   Based on Andy Bell (accessibility, simplicity, and fluid responsiveness)
   Josh Comeau (preventing layout bugs, improving rendering, and fine-tuning web app behavior)
   Replaces: new-reset.css
   ============================================================ */

/* 1. Predictable sizing everywhere.
   border-box means width = content + padding + border, so a
   350px input is actually 350px. This single rule eliminates
   most of the pixel-fudging the old fixed layouts needed. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margins only where browsers disagree or
   where we always restyle anyway. (Unlike the old reset, we do
   NOT zero padding/border/font on every element that's what
   forced all.css to rebuild everything from nothing.) */
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

/* 3. Sensible page defaults.
   - line-height 1.5 is the accessible minimum (WCAG 1.4.12).
   - No font-size on html/body: we respect the user's browser
     setting and size type in rem. (The old 62.5% trick is
     retired it forced 10px text unless overridden and
     fought user accessibility settings.)
   - text-size-adjust stops mobile browsers from inflating
     text unpredictably in landscape. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 4. Media behaves like content, not like inline text.
   Images scale down inside their container instead of blowing
   out the layout the cornerstone of responsive design. */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 5. Form controls inherit the page's typography.
   Browsers default inputs/buttons to their own UI font at
   ~13px; this makes form text match body text critical for
   us since forms ARE the product on signup pages. Also, 16px+
   input text prevents iOS Safari's auto-zoom on focus. */
input, button, textarea, select {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

/* 6. Long content can't break the layout.
   Vendor URLs, long email addresses, and German venue names
   wrap instead of overflowing on narrow screens. */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 7. Text wrapping niceties (progressive enhancement 
   ignored by browsers that don't support them).
   - balance: headings wrap into even lines, no orphan word.
   - pretty: paragraphs avoid single-word last lines. */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p, li, figcaption {
  text-wrap: pretty;
}

/* 8. Lists: keep semantics, drop bullets only when a list is
   explicitly presentational (role="list" preserves screen-
   reader announcement in Safari, which otherwise removes list
   semantics when list-style is none). Regular content lists
   keep their bullets/numbers no more re-adding them. */
ul[role=list], ol[role=list] {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 9. Focus stays VISIBLE the old reset's commented-out
   ":focus {outline: 0}" is exactly the trap; we go the other
   way and make keyboard focus obvious. :focus-visible shows
   the ring for keyboard users without flashing it on every
   mouse click. */
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

/* 10. Respect users who turn off animation (vestibular
    disorders, motion sickness). Any animation we add later is
    automatically neutralized for them. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 11. Anchor jumps (e.g., "return to top" links) don't hide
    the target under any sticky header we add later. */
:target {
  scroll-margin-block: 5ex;
}
