/* =========================================================
   BASE STYLES, TOKENS, TYPOGRAPHY & ACCESSIBILITY
   Theme: Romantic Coquette Stationery
   ========================================================= */

:root {
  /* Core Palette */
  --color-blush: #f9dfe4;
  --color-blush-soft: #fceef0;
  --color-ivory: #fff6f7;
  --color-paper: #fffafb;
  --color-accent: #d99ba5;
  --color-accent-deep: #c47e89;

  /* Ink & Borders */
  --color-ink: #5d363e;
  --color-ink-soft: #754a53;
  --color-ink-muted: #8b6069;
  --color-rose-line: #cf97a1;
  --color-border-card: rgba(196, 126, 137, 0.38);
  --color-border-inner: rgba(207, 151, 161, 0.45);

  /* Typography */
  --font-script: "Great Vibes", "Brush Script MT", cursive;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Shadows & Radii */
  --shadow-card: 0 20px 50px rgba(128, 70, 82, 0.16), 0 6px 18px rgba(128, 70, 82, 0.08);
  --shadow-envelope: 0 24px 52px rgba(120, 62, 74, 0.2), 0 8px 20px rgba(120, 62, 74, 0.1);
  --shadow-button: 0 8px 22px rgba(176, 102, 114, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  --radius-card: 8px;
  --radius-envelope: 10px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out-silk: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.55;
  color: var(--color-ink);
  background-color: var(--color-blush-soft);
  background-image:
    radial-gradient(circle at 50% 52%, rgba(255, 248, 249, 0.55) 0%, rgba(252, 238, 240, 0) 55%),
    url("../assets/images/bg-desktop.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
dl,
dt,
dd {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-accent-deep);
  outline-offset: 4px;
}

/* Screen-reader only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared Calligraphic Headings */
.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--color-ink);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* Plush Satin Pill Button */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 50px;
  min-width: 240px;
  padding: 0.85rem 2.35rem;
  border: 1px solid rgba(183, 111, 123, 0.72);
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #e4a9b2 0%, #d4909b 52%, #c77e8a 100%);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-button);
  overflow: hidden;
  transition:
    transform 0.28s var(--ease-out-silk),
    box-shadow 0.28s var(--ease-out-silk),
    filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.38) 50%,
    transparent 100%
  );
  transition: left 0.6s var(--ease-out-silk);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(176, 102, 114, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.52);
  filter: brightness(1.03);
}

.btn-primary:hover::after {
  left: 145%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary__heart {
  font-size: 0.95em;
  line-height: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.45rem;
  border: 1px solid rgba(196, 126, 137, 0.45);
  border-radius: var(--radius-pill);
  background: rgba(255, 248, 249, 0.88);
  color: var(--color-ink-soft);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(128, 70, 82, 0.1);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s var(--ease-out-silk);
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--color-accent-deep);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 248, 249, 0.55);
  color: var(--color-ink-soft);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-link:hover {
  color: var(--color-ink);
  background: rgba(255, 248, 249, 0.85);
  transform: translateX(-2px);
}

/* Portrait Tablets & Mobile Swap to Dedicated 9:16 Floral Backdrop */
@media (max-width: 767px), (orientation: portrait) and (max-width: 900px) {
  body {
    background-image:
      radial-gradient(circle at 50% 50%, rgba(255, 248, 249, 0.52) 0%, rgba(252, 238, 240, 0) 62%),
      url("../assets/images/bg-mobile.jpg");
    background-position: center center;
  }
}
