/* =============================================
   Variables
   ============================================= */
:root {
  /* Color Palette - Luxurious Beauty Theme */
  --color-background: #faf7f6; /* soft, warm off-white */
  --color-surface: #ffffff;
  --color-text: #2b1d25; /* deep plum-brown */
  --color-text-muted: #7b6470;

  --color-primary: #9c4b6b; /* luxurious plum */
  --color-primary-soft: #f3dce4;
  --color-primary-contrast: #ffffff;

  --color-accent: #c48a7a; /* soft nude pink */
  --color-accent-mauve: #b68aa5; /* delicate mauve */

  --color-success: #2e7d5b;
  --color-warning: #b9802a;
  --color-danger: #b03a3a;

  --color-gold: #d8b26a; /* warm champagne gold */

  /* Neutral Grays */
  --gray-50: #f7f4f5;
  --gray-100: #eee7ea;
  --gray-200: #ddd0d5;
  --gray-300: #c3aeb8;
  --gray-400: #a48c99;
  --gray-500: #85707e;
  --gray-600: #695663;
  --gray-700: #4e3f49;
  --gray-800: #352833;
  --gray-900: #231822;

  /* Typography */
  --font-family-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-family-serif: "Playfair Display", "Times New Roman", serif;
  --font-family-accent: "Cormorant Garamond", "Times New Roman", serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --radius-card: 18px;

  /* Shadows - soft, luxurious depth */
  --shadow-sm: 0 6px 18px rgba(14, 5, 14, 0.06);
  --shadow-md: 0 14px 40px rgba(10, 3, 10, 0.10);
  --shadow-lg: 0 22px 70px rgba(5, 0, 8, 0.16);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: var(--space-4);
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0.001ms;
    --transition-normal: 0.001ms;
    --transition-slow: 0.001ms;
  }
}

/* =============================================
   Reset / Normalize
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
u,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

img,
video,
canvas,
svg,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
}

/* Remove default focus outlines, will restore via :focus-visible */
:focus {
  outline: none;
}

/* =============================================
   Base Styles
   ============================================= */
body {
  min-height: 100vh;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-serif);
  font-weight: 500;
  color: var(--color-text);
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
}

h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: 600;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
    text-decoration-color var(--transition-normal);
  text-decoration-color: transparent;
}

a:hover {
  color: var(--color-accent-mauve);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

small {
  font-size: var(--font-size-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--gray-100);
  margin: var(--space-6) 0;
}

::selection {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
}

/* =============================================
   Utilities
   ============================================= */

/* Layout */
.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--light {
  background-color: var(--color-surface);
}

.section--tinted {
  background: radial-gradient(circle at top left, #f5e3ea 0, #faf7f6 42%, #fdfbfa 100%);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Spacing utilities (margin + padding) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-8 { padding-top: var(--space-8); }
.pb-4 { padding-bottom: var(--space-4); }
pb-8 { padding-bottom: var(--space-8); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Screen reader only */
.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;
}

/* =============================================
   Components
   ============================================= */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-fast);
  will-change: transform, box-shadow;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0, #61233f 40%, #2f111f 100%);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: rgba(104, 72, 88, 0.3);
  backdrop-filter: blur(10px);
}

.btn--outline:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(104, 72, 88, 0.6);
}

.btn--subtle {
  background-color: rgba(244, 227, 231, 0.95);
  color: var(--color-text);
  border-color: transparent;
}

.btn--subtle:hover:not(:disabled) {
  background-color: rgba(243, 220, 228, 1);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Inputs & Form Controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(109, 82, 98, 0.25);
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(156, 75, 107, 0.25);
  outline: 2px solid rgba(216, 178, 106, 0.4);
  outline-offset: 1px;
}

input[disabled],
select[disabled],
textarea[disabled] {
  background-color: var(--gray-50);
  cursor: not-allowed;
  opacity: 0.7;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-600);
}

/* Card */
.card {
  position: relative;
  background: radial-gradient(circle at top left, #fdf6f9 0, #ffffff 38%, #faf5f6 100%);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(215, 185, 199, 0.35);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(216, 178, 106, 0.16), transparent 55%);
  mix-blend-mode: soft-light;
  opacity: 0.8;
  pointer-events: none;
}

.card__header,
.card__body,
.card__footer {
  position: relative;
  z-index: 1;
}

.card__header {
  margin-bottom: var(--space-4);
}

.card--elevated {
  box-shadow: var(--shadow-lg);
}

/* Accessible Focus Styles */
:where(button, [role="button"], [tabindex], input, select, textarea):focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
