:root {
  --color-gallery-white: #FAF9F6;
  --color-warm-limestone: #E8E1D7;
  --color-sage-green: #82917B;
  --color-sage-green-dark: #6B7A64;
  --color-terracotta-clay: #C78B73;
  --color-terracotta-clay-dark: #B57A62;
  --color-champagne-brass: #B69A72;
  --color-deep-graphite: #303532;

  --font-heading: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", Courier, monospace;

  --text-display-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  --text-h1-size: clamp(2rem, 3.5vw + 0.75rem, 3rem);
  --text-h2-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.25rem);
  --text-h3-size: clamp(1.5rem, 1.5vw + 0.5rem, 1.75rem);
  --text-h4-size: 1.25rem;
  --text-body-size: 1rem;
  --text-small-size: 0.875rem;
  --text-mono-size: 0.875rem;

  --text-display-line-height: 1.1;
  --text-h1-line-height: 1.2;
  --text-h2-line-height: 1.3;
  --text-h3-line-height: 1.4;
  --text-h4-line-height: 1.5;
  --text-body-line-height: 1.6;
  --text-small-line-height: 1.5;
  --text-mono-line-height: 1.5;

  --text-heading-letter-spacing: 0.02em;
  --text-body-letter-spacing: 0;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;
  --space-9: 8rem;

  --container-max-width: 1440px;
  --container-padding-mobile: 1.5rem;
  --container-padding-desktop: 3rem;
  --section-padding-desktop: 6rem;
  --section-padding-mobile: 4rem;

  --border-width-thin: 1px;
  --border-width-thick: 2px;
  --border-color-default: var(--color-warm-limestone);
  --border-color-focus: var(--color-sage-green);
  --border-color-premium: var(--color-champagne-brass);

  --shadow-elevated: 0 4px 12px rgba(48, 53, 50, 0.08);

  --radius-button: 4px;
  --radius-card: 8px;
  --radius-image: 8px;

  --transition-duration: 200ms;
  --transition-easing: ease-in-out;

  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-ring-color: var(--color-sage-green);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: var(--text-body-line-height);
  letter-spacing: var(--text-body-letter-spacing);
  color: var(--color-deep-graphite);
  background-color: var(--color-gallery-white);
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

a {
  color: var(--color-sage-green);
  text-decoration: none;
  transition: color var(--transition-duration) var(--transition-easing);
}

a:hover {
  color: var(--color-sage-green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul,
ol {
  list-style-position: inside;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: var(--text-heading-letter-spacing);
  color: var(--color-deep-graphite);
  line-height: var(--text-h1-line-height);
  margin-block-end: var(--space-4);
}

h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
}

h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line-height);
}

h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
}

h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-line-height);
  letter-spacing: 0;
}

h5 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: 0;
}

h6 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  letter-spacing: 0;
}

p {
  margin-block-end: var(--space-4);
  line-height: var(--text-body-line-height);
}

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

blockquote {
  margin-block: var(--space-5) var(--space-5);
  padding-inline-start: var(--space-4);
  border-inline-start: var(--border-width-thick) solid var(--color-champagne-brass);
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  letter-spacing: var(--text-heading-letter-spacing);
  color: var(--color-deep-graphite);
}

blockquote p {
  margin-block-end: 0;
}

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

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

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

figcaption {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  color: var(--color-deep-graphite);
  margin-block-start: var(--space-2);
}

hr {
  border: none;
  border-top: var(--border-width-thin) solid var(--color-warm-limestone);
  margin-block: var(--space-6);
}

address {
  font-style: normal;
}

small {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: var(--text-mono-size);
  line-height: var(--text-mono-line-height);
}

pre {
  background-color: var(--color-warm-limestone);
  padding: var(--space-3);
  border-radius: var(--radius-card);
  overflow-x: auto;
  margin-block-end: var(--space-4);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-block-end: var(--space-4);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
}

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

th,
td {
  padding: var(--space-2) var(--space-3);
  text-align: start;
  border-bottom: var(--border-width-thin) solid var(--color-warm-limestone);
}

th {
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0;
}

caption {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  margin-block-end: var(--space-2);
  text-align: start;
}

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

@media (min-width: 768px) {
  .container {
    padding-inline: var(--container-padding-desktop);
  }
}

.section {
  padding-block: var(--section-padding-mobile);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--section-padding-desktop);
  }
}

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

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

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

.surface-graphite h1,
.surface-graphite h2,
.surface-graphite h3,
.surface-graphite h4,
.surface-graphite h5,
.surface-graphite h6 {
  color: var(--color-gallery-white);
}

.surface-graphite a {
  color: var(--color-champagne-brass);
}

.surface-graphite a:hover {
  color: var(--color-gallery-white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body-size);
  line-height: 1.2;
  letter-spacing: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-button);
  border: var(--border-width-thick) solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-duration) var(--transition-easing),
              border-color var(--transition-duration) var(--transition-easing),
              color var(--transition-duration) var(--transition-easing),
              transform var(--transition-duration) var(--transition-easing);
  min-height: 44px;
}

.btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.btn-primary {
  background-color: var(--color-sage-green);
  color: var(--color-gallery-white);
  border-color: var(--color-sage-green);
}

.btn-primary:hover {
  background-color: var(--color-sage-green-dark);
  border-color: var(--color-sage-green-dark);
  color: var(--color-gallery-white);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-sage-green);
  border-color: var(--color-sage-green);
}

.btn-secondary:hover {
  background-color: var(--color-sage-green);
  color: var(--color-gallery-white);
  text-decoration: none;
}

.btn-terracotta {
  background-color: var(--color-terracotta-clay);
  color: var(--color-gallery-white);
  border-color: var(--color-terracotta-clay);
}

.btn-terracotta:hover {
  background-color: var(--color-terracotta-clay-dark);
  border-color: var(--color-terracotta-clay-dark);
  color: var(--color-gallery-white);
  text-decoration: none;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-deep-graphite);
  border-color: var(--color-warm-limestone);
}

.btn-ghost:hover {
  background-color: var(--color-warm-limestone);
  border-color: var(--color-warm-limestone);
  color: var(--color-deep-graphite);
  text-decoration: none;
}

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

.btn-large {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-h4-size);
  min-height: 52px;
}

label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: 0;
  margin-block-end: var(--space-2);
  color: var(--color-deep-graphite);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: 0;
  color: var(--color-deep-graphite);
  background-color: var(--color-gallery-white);
  border: var(--border-width-thin) solid var(--color-warm-limestone);
  border-radius: var(--radius-button);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  transition: border-color var(--transition-duration) var(--transition-easing),
              box-shadow var(--transition-duration) var(--transition-easing);
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-sage-green);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--color-sage-green);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-deep-graphite);
  opacity: 0.6;
}

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

select {
  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='%23303532' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-inline-end: var(--space-5);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-sage-green);
  cursor: pointer;
  flex-shrink: 0;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

fieldset {
  border: var(--border-width-thin) solid var(--color-warm-limestone);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-block-end: var(--space-4);
}

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

legend {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  letter-spacing: 0;
  padding-inline: var(--space-2);
  color: var(--color-deep-graphite);
}

.form-group {
  margin-block-end: var(--space-4);
}

.form-group:last-child {
  margin-block-end: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
}

.form-row > * {
  flex: 1 1 200px;
  min-width: 0;
}

.form-hint {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  color: var(--color-deep-graphite);
  opacity: 0.7;
  margin-block-start: var(--space-1);
}

.form-error {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  color: var(--color-terracotta-clay-dark);
  margin-block-start: var(--space-1);
}

.card {
  background-color: var(--color-gallery-white);
  border: var(--border-width-thin) solid var(--color-warm-limestone);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}

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

.card-premium {
  border-color: var(--color-champagne-brass);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-small-size);
  line-height: 1.2;
  letter-spacing: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-button);
  background-color: var(--color-terracotta-clay);
  color: var(--color-gallery-white);
  white-space: nowrap;
}

.badge-sage {
  background-color: var(--color-sage-green);
}

.badge-brass {
  background-color: var(--color-champagne-brass);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono-size);
  line-height: var(--text-mono-line-height);
  letter-spacing: 0;
}

.text-small {
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

.text-display {
  font-family: var(--font-heading);
  font-size: var(--text-display-size);
  line-height: var(--text-display-line-height);
  letter-spacing: var(--text-heading-letter-spacing);
  font-weight: 400;
  color: var(--color-deep-graphite);
  margin-block-end: var(--space-4);
}

.text-display:last-child {
  margin-block-end: 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-3);
  z-index: 10000;
  background-color: var(--color-sage-green);
  color: var(--color-gallery-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-duration) var(--transition-easing);
}

.skip-link:focus {
  top: var(--space-3);
  color: var(--color-gallery-white);
  text-decoration: none;
  outline: var(--focus-ring-width) solid var(--color-gallery-white);
  outline-offset: var(--focus-ring-offset);
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

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

@media (max-width: 767px) {
  .text-display {
    font-size: 2.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .section {
    padding-block: var(--section-padding-mobile);
  }
}