:root {
  --bg-base: #1a0f0a;
  --bg-surface: #2d1a10;
  --bg-elevated: #3a2418;
  --border-gold: #c9a227;
  --text-primary: #f5efe6;
  --text-secondary: #d4c5a9;
  --accent-gold: #e0b84c;
  --accent-felt: #1e5c3a;
  --text-on-accent: #1a0f0a;

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --text-display: clamp(2.5rem, 5vw, 3.5rem);
  --text-h1: clamp(2rem, 3.5vw, 2.5rem);
  --text-h2: clamp(1.625rem, 2.5vw, 2rem);
  --text-h3: clamp(1.25rem, 2vw, 1.5rem);
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-caption: 0.75rem;

  --leading-display: 1.1;
  --leading-h1: 1.2;
  --leading-h2: 1.3;
  --leading-h3: 1.4;
  --leading-body: 1.6;
  --leading-small: 1.5;
  --leading-caption: 1.4;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  --container-max: 1200px;
  --container-gutter: 24px;

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

  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-deep: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 16px rgba(201, 162, 39, 0.25);

  --transition-fast: 0.2s ease;
}

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

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

body {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--border-gold);
  text-decoration: underline;
  text-decoration-color: var(--border-gold);
  text-underline-offset: 4px;
}

ul,
ol {
  list-style: none !important;
}

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

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

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

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

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

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

blockquote {
  margin-block-end: var(--space-4);
  padding-inline-start: var(--space-4);
  border-inline-start: 2px solid var(--border-gold);
  color: var(--text-secondary);
  font-style: italic;
}

ul,
ol {
  margin-block-end: var(--space-4);
  padding-inline-start: var(--space-4);
}

li {
  line-height: var(--leading-body);
}

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

dt {
  font-weight: 600;
  color: var(--text-primary);
}

dd {
  margin-block-end: var(--space-2);
  color: var(--text-secondary);
}

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

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

hr {
  border: none;
  border-block-start: 1px solid var(--border-gold);
  margin-block: var(--space-6);
  opacity: 0.5;
}

code,
pre {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9em;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

code {
  padding: 2px 6px;
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
  margin-block-end: var(--space-4);
}

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

th,
td {
  padding: var(--space-3);
  text-align: start;
  border-block-end: 1px solid var(--border-gold);
}

th {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--accent-gold);
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

mark {
  background-color: var(--accent-gold);
  color: var(--text-on-accent);
  padding: 2px 4px;
  border-radius: 2px;
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

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

.surface {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

.surface-elevated {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-deep);
}

.surface-felt {
  background-color: var(--accent-felt);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  background-color: var(--accent-gold);
  color: var(--text-on-accent);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.btn:hover {
  background-color: #f0c95e;
  border-color: #f0c95e;
  color: var(--text-on-accent);
  text-decoration: none;
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--accent-gold);
  border-color: var(--border-gold);
}

.btn-secondary:hover {
  background-color: var(--bg-elevated);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--bg-elevated);
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2);
  background: none;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--accent-gold);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  background-color: var(--bg-base);
  color: var(--text-primary);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(224, 184, 76, 0.2);
}

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

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

label {
  display: block;
  margin-block-end: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

fieldset {
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-block-end: var(--space-4);
}

legend {
  padding-inline: var(--space-2);
  color: var(--accent-gold);
  font-family: var(--font-heading);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
  margin-inline-end: var(--space-2);
  accent-color: var(--accent-gold);
}

input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

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

::selection {
  background-color: var(--accent-gold);
  color: var(--text-on-accent);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 5px;
  border: 2px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-gold);
}

@media (max-width: 768px) {
  :root {
    --container-gutter: 16px;
  }

  .container {
    padding-inline: var(--container-gutter);
  }

  .surface,
  .surface-elevated,
  .surface-felt {
    padding: var(--space-4);
  }

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

  h2 {
    margin-block-end: var(--space-3);
  }

  p {
    margin-block-end: var(--space-3);
  }

  blockquote {
    margin-block-end: var(--space-3);
  }

  ul,
  ol {
    margin-block-end: var(--space-3);
  }

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

  hr {
    margin-block: var(--space-5);
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@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, body {
  overflow-x: clip;
  max-width: 100%;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}
