/* ==========================================================================
   Variables
   ==========================================================================
*/

:root {
  /* Colors */
  --color-background: #f8f6f2; /* creamy white */
  --color-surface: #ffffff;
  --color-text: #2f3432; /* soft charcoal */
  --color-text-muted: #6e746f;

  --color-primary: #8aa58b; /* soft sage green */
  --color-primary-soft: rgba(138, 165, 139, 0.12);

  --color-success: #88b38a;
  --color-warning: #d6a96b; /* warm sand / ochre */
  --color-danger: #c56c68; /* muted terracotta */

  --color-accent-sand: #e2c9a5; /* warm sand */
  --color-accent-lavender: #d9c7df; /* pale lavender */
  --color-accent-terracotta: #c57d6b; /* muted terracotta */

  --gray-50: #f9faf9;
  --gray-100: #f0f2f1;
  --gray-200: #dfe3e1;
  --gray-300: #c7ceca;
  --gray-400: #a3aca7;
  --gray-500: #7e8882;
  --gray-600: #636b66;
  --gray-700: #4a514d;
  --gray-800: #343936;
  --gray-900: #242826;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", "Georgia", serif; /* For headings / accents */

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 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.15;
  --line-height-snug: 1.3;
  --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-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows (soft, airy) */
  --shadow-xs: 0 4px 10px rgba(20, 24, 22, 0.04);
  --shadow-sm: 0 8px 20px rgba(20, 24, 22, 0.06);
  --shadow-md: 0 14px 40px rgba(20, 24, 22, 0.08);

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

  /* Layout */
  --layout-max-width: 1120px;
}

/* ==========================================================================
   Reset / Normalize
   ==========================================================================
*/

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

img {
  height: auto;
}

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

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

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

:focus {
  outline: none;
}

/* ==========================================================================
   Motion & Accessibility
   ==========================================================================
*/

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

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

/* ==========================================================================
   Base Styles
   ==========================================================================
*/

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

p:last-child {
  margin-bottom: 0;
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

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

/* Headings: elegant, airy, with serif accent */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--line-height-snug);
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.875rem, 3.2vw, 2.25rem);
}

h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.875rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Links: minimalist, calm */

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--transition-normal), text-decoration-color var(--transition-normal), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

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

/* Lists */

ul, ol {
  margin-top: 0;
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
}

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

/* Layout container */

.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 960px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* Flex helpers */

.flex {
  display: flex;
}

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

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

.flex-row {
  flex-direction: row;
}

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

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.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-6);
}

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

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

/* Alignment & spacing */

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

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

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.py-6 {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.py-10 {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

/* 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: calm pill shapes, subtle hover */

.button,
button.button,
input[type="submit"].button,
input[type="button"].button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--color-primary);
  color: #ffffff!important;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-fast), opacity var(--transition-fast);
}

.button:hover {
  background: #7a957c;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

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

.button--ghost {
  background: transparent;
  color: var(--color-text)!important;
  border-color: var(--gray-300);
}

.button--ghost:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.button--secondary {
  background: var(--color-accent-sand);
  color: var(--color-text)!important;
}

.button--secondary:hover {
  background: #d8bc95;
}

/* Form controls: soft borders, calm focus */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background-color: rgba(255, 255, 255, 0.9);
  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-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), 0 10px 25px rgba(20, 24, 22, 0.06);
  background-color: #ffffff;
}

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

label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* Card: airy surface for imagery & content */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.card--muted {
  background: linear-gradient(145deg, rgba(217, 199, 223, 0.18), rgba(226, 201, 165, 0.18));
}

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

.card__title {
  margin-bottom: var(--space-1);
}

.card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

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

.card__footer {
  margin-top: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Media wrappers for immersive imagery */

.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.media-frame img,
.media-frame picture,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badges / pills for schedule & labels */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background-color: var(--color-primary-soft);
  color: var(--color-text);
}

.badge--accent {
  background-color: rgba(197, 125, 107, 0.16);
  color: var(--color-accent-terracotta);
}

.badge--soft {
  background-color: rgba(217, 199, 223, 0.2);
  color: var(--color-accent-lavender);
}

/* Helper: subtle section backgrounds */

.section-soft {
  background: radial-gradient(circle at top left, rgba(217, 199, 223, 0.25), transparent 55%),
              radial-gradient(circle at bottom right, rgba(226, 201, 165, 0.25), transparent 60%),
              var(--color-background);
}
