:root {
  --color-azure: #007FFF;
  --color-tomato: #FF6347;
  --color-cream: #FFFDD0;
  --color-moss: #98FB98;
  --color-hazel: #A0522D;
  --color-hazel-dark: #6B3A1F;
  --color-hazel-light: rgba(160, 82, 45, 0.2);
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-overlay: rgba(0, 0, 0, 0.55);
  --color-overlay-light: rgba(0, 0, 0, 0.35);
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-focus: #007FFF;
  --color-success: #98FB98;
  --color-error: #FF6347;
  --color-warning: #FF6347;
  --color-info: #007FFF;

  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;

  --text-display: clamp(2.25rem, 5vw, 3.5rem);
  --text-h1: clamp(2rem, 4vw, 2.5rem);
  --text-h2: clamp(1.625rem, 3vw, 2rem);
  --text-h3: clamp(1.25rem, 2vw, 1.5rem);
  --text-body-large: 1.125rem;
  --text-body: 1rem;
  --text-caption: 0.875rem;

  --leading-display: 1.15;
  --leading-h1: 1.2;
  --leading-h2: 1.25;
  --leading-h3: 1.3;
  --leading-body: 1.6;
  --leading-caption: 1.5;

  --tracking-heading: -0.01em;
  --tracking-body: 0.01em;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --container-max: 1200px;
  --container-padding: var(--space-lg);

  --surface-cream: #FFFDD0;
  --surface-white: #FFFFFF;
  --surface-hazel: #A0522D;
  --surface-hazel-dark: #6B3A1F;
  --surface-moss-tint: rgba(152, 251, 152, 0.25);
  --surface-azure-tint: rgba(0, 127, 255, 0.08);
  --surface-tomato-tint: rgba(255, 99, 71, 0.08);

  --border-light: 1px solid rgba(160, 82, 45, 0.2);
  --border-medium: 1px solid rgba(160, 82, 45, 0.35);
  --border-strong: 1px solid #A0522D;

  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lifted: 0 8px 24px rgba(0, 0, 0, 0.14);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --drawer-transition: 0.4s ease-in-out;
  --card-hover-lift: -4px;
  --button-hover-scale: 1.02;
  --focus-outline: 2px solid #007FFF;
  --touch-target: 44px;
}

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

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-hazel);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-hazel);
  letter-spacing: var(--tracking-heading);
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  margin-block-end: var(--space-lg);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  margin-block-end: var(--space-md);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  margin-block-end: var(--space-sm);
}

h4,
h5,
h6 {
  font-size: var(--text-body-large);
  line-height: var(--leading-h3);
  margin-block-end: var(--space-sm);
}

p {
  margin: 0;
  margin-block-end: var(--space-md);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

p:last-child {
  margin-block-end: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

ul:not([class]),
ol:not([class]) {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-lg);
}

ul:not([class]) {
  list-style: disc;
}

ol:not([class]) {
  list-style: decimal;
}

ul:not([class]) li,
ol:not([class]) li {
  margin-block-end: var(--space-sm);
  line-height: var(--leading-body);
}

ul:not([class]) li:last-child,
ol:not([class]) li:last-child {
  margin-block-end: 0;
}

blockquote {
  margin: 0;
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-lg);
  border-inline-start: 3px solid var(--color-azure);
  font-style: italic;
  color: var(--color-hazel-dark);
}

blockquote:last-child {
  margin-block-end: 0;
}

figure {
  margin: 0;
  margin-block-end: var(--space-md);
}

figure:last-child {
  margin-block-end: 0;
}

figcaption {
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  color: var(--color-hazel-dark);
  margin-block-start: var(--space-sm);
}

a {
  color: var(--color-azure);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--color-hazel-dark);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

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

img {
  border-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  margin-block-end: var(--space-md);
}

table:last-child {
  margin-block-end: 0;
}

th,
td {
  text-align: start;
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--border-light);
}

th {
  font-weight: 700;
  color: var(--color-hazel-dark);
}

hr {
  border: none;
  border-block-start: var(--border-light);
  margin: var(--space-xl) 0;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  padding: var(--space-md);
  background-color: var(--surface-hazel-dark);
  color: var(--color-cream);
  border-radius: var(--radius-md);
  margin-block-end: var(--space-md);
}

pre:last-child {
  margin-block-end: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  letter-spacing: inherit;
  margin: 0;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  -webkit-appearance: none;
  appearance: none;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  color: var(--color-hazel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-azure);
  box-shadow: 0 0 0 3px rgba(0, 127, 255, 0.15);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(160, 82, 45, 0.6);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A0522D' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-inline-end: var(--space-xl);
}

label {
  display: inline-block;
  margin-block-end: var(--space-xs);
  font-weight: 600;
  color: var(--color-hazel-dark);
}

fieldset {
  border: var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: 0;
  margin-block-end: var(--space-md);
}

fieldset:last-child {
  margin-block-end: 0;
}

legend {
  padding: 0 var(--space-sm);
  font-weight: 700;
  color: var(--color-hazel-dark);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-3xl);
}

.section--tight {
  padding-block: var(--space-xl);
}

.section--loose {
  padding-block: calc(var(--space-3xl) * 1.5);
}

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

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

.surface-hazel {
  background-color: var(--surface-hazel);
  color: var(--color-cream);
}

.surface-hazel-dark {
  background-color: var(--surface-hazel-dark);
  color: var(--color-cream);
}

.surface-moss-tint {
  background-color: var(--surface-moss-tint);
}

.surface-azure-tint {
  background-color: var(--surface-azure-tint);
}

.surface-tomato-tint {
  background-color: var(--surface-tomato-tint);
}

.surface-hazel h1,
.surface-hazel h2,
.surface-hazel h3,
.surface-hazel h4,
.surface-hazel h5,
.surface-hazel h6,
.surface-hazel-dark h1,
.surface-hazel-dark h2,
.surface-hazel-dark h3,
.surface-hazel-dark h4,
.surface-hazel-dark h5,
.surface-hazel-dark h6 {
  color: var(--color-cream);
}

.surface-hazel a,
.surface-hazel-dark a {
  color: var(--color-moss);
}

.surface-hazel a:hover,
.surface-hazel-dark a:hover {
  color: var(--color-cream);
}

.card {
  background-color: var(--color-white);
  border: var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(var(--card-hover-lift));
  box-shadow: var(--shadow-medium);
}

.card > :last-child {
  margin-block-end: 0;
}

.panel {
  background-color: var(--color-white);
  border: var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
}

.panel > :last-child {
  margin-block-end: 0;
}

.drawer-surface {
  background-color: var(--color-white);
  border: var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
}

.drawer-surface > :last-child {
  margin-block-end: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--touch-target);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--text-body);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:hover {
  transform: scale(var(--button-hover-scale));
}

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

.btn--primary {
  background-color: var(--color-azure);
  color: var(--color-white);
  border: 1px solid var(--color-azure);
}

.btn--primary:hover {
  background-color: #0066CC;
  border-color: #0066CC;
  color: var(--color-white);
}

.btn--accent {
  background-color: var(--color-tomato);
  color: var(--color-white);
  border: 1px solid var(--color-tomato);
}

.btn--accent:hover {
  background-color: #E04A30;
  border-color: #E04A30;
  color: var(--color-white);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-hazel);
  border: 1px solid var(--color-hazel);
}

.btn--secondary:hover {
  background-color: var(--color-hazel);
  color: var(--color-cream);
  border-color: var(--color-hazel);
}

.btn--tertiary {
  background-color: transparent;
  color: var(--color-azure);
  border: none;
  padding-inline: var(--space-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn--tertiary:hover {
  color: var(--color-hazel-dark);
  background-color: transparent;
}

.btn--pill {
  border-radius: var(--radius-pill);
  padding-inline: var(--space-xl);
}

.btn--small {
  min-height: 36px;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-caption);
}

.btn--large {
  min-height: 52px;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-body-large);
}

.btn--full {
  width: 100%;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--surface-moss-tint);
  color: var(--color-hazel-dark);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag--azure {
  background-color: var(--surface-azure-tint);
  color: var(--color-azure);
}

.tag--tomato {
  background-color: var(--surface-tomato-tint);
  color: var(--color-tomato);
}

.tag--hazel {
  background-color: rgba(160, 82, 45, 0.15);
  color: var(--color-hazel);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-xl);
  color: var(--color-hazel-light);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--color-hazel-light);
}

.divider__icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-hazel);
  transform: rotate(45deg);
}

.flex {
  display: flex;
  gap: var(--space-md);
}

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

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

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

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

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

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

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

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

.flex--gap-sm {
  gap: var(--space-sm);
}

.flex--gap-lg {
  gap: var(--space-lg);
}

.flex--gap-xl {
  gap: var(--space-xl);
}

.flex > * {
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 10000;
  background-color: var(--color-azure);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-md);
  color: var(--color-white);
}

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-md);
  }

  .section {
    padding-block: var(--space-2xl);
  }

  .section--tight {
    padding-block: var(--space-lg);
  }

  .section--loose {
    padding-block: var(--space-3xl);
  }

  .card,
  .panel,
  .drawer-surface {
    padding: var(--space-md);
  }

  .btn {
    min-height: var(--touch-target);
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: var(--space-xl);
  }

  .section--tight {
    padding-block: var(--space-lg);
  }

  .section--loose {
    padding-block: var(--space-2xl);
  }
}

@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;
  }

  html {
    scroll-behavior: auto;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}