/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #F5F0E8;
  background-color: #0A0A0A;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.2;
  color: #F5F0E8;
  margin-block-end: 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.2;
  margin-block-end: 24px;
}

h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.3;
  margin-block-end: 16px;
}

h3 {
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.4;
  margin-block-end: 8px;
}

h4 {
  font-size: 18px;
  line-height: 1.4;
  margin-block-end: 8px;
}

h5 {
  font-size: 16px;
  line-height: 1.5;
  margin-block-end: 8px;
}

h6 {
  font-size: 14px;
  line-height: 1.5;
  margin-block-end: 8px;
}

p {
  font-size: 16px;
  line-height: 1.6;
  margin-block-end: 16px;
}

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

small {
  font-size: 14px;
  line-height: 1.5;
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

a {
  color: #C6FF00;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1E3A5F;
}

a:focus-visible {
  outline: 2px solid #C6FF00;
  outline-offset: 2px;
}

ul,
ol {
  margin-block-end: 16px;
  padding-inline-start: 24px;
}

ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

blockquote {
  margin-block-end: 16px;
  padding-inline-start: 16px;
  border-inline-start: 2px solid #C6FF00;
  color: #B8B2A8;
}

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

hr {
  border: none;
  border-block-start: 1px solid #3A3A3A;
  margin-block: 24px;
}

code,
pre {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 14px;
  background-color: #1A1A1A;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
}

code {
  padding: 2px 6px;
}

pre {
  padding: 16px;
  overflow-x: auto;
  margin-block-end: 16px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

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

img {
  border-radius: 0;
}

figure {
  margin-block-end: 16px;
}

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

figcaption {
  font-size: 14px;
  line-height: 1.5;
  color: #B8B2A8;
  margin-block-start: 8px;
}

/* ===== Forms ===== */
form {
  margin-block-end: 0;
}

label {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: #F5F0E8;
  margin-block-end: 4px;
}

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background-color: #1A1A1A;
  color: #F5F0E8;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  transition: border-color 0.2s ease;
  margin-block-end: 16px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #C6FF00;
}

input::placeholder,
textarea::placeholder {
  color: #B8B2A8;
}

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

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-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='%23B8B2A8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-inline-end: 40px;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: auto;
  margin-inline-end: 8px;
  accent-color: #C6FF00;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  margin-block-end: 0;
}

fieldset {
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  padding: 16px;
  margin-block-end: 16px;
}

legend {
  font-size: 14px;
  line-height: 1.5;
  color: #F5F0E8;
  padding-inline: 8px;
}

/* ===== Buttons ===== */
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  display: inline-block;
  padding: 12px 24px;
  background-color: #C6FF00;
  color: #0A0A0A;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
  background-color: #1E3A5F;
  color: #F5F0E8;
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 2px solid #C6FF00;
  outline-offset: 2px;
}

button:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
input[type="button"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Containers ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 768px) {
  .container,
  .container-wide,
  }

/* ===== Surfaces ===== */
.surface-dark {
  background-color: #1A1A1A;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  padding: 24px;
}

.surface-light {
  background-color: #F5F0E8;
  color: #0A0A0A;
  border-radius: 2px;
  padding: 24px;
}

.surface-light h1,
.surface-light h2,
.surface-light h3,
.surface-light h4,
.surface-light h5,
.surface-light h6 {
  color: #0A0A0A;
}

.surface-light p,
.surface-light li,
.surface-light small,
.surface-light blockquote {
  color: #1A1A1A;
}

.surface-light a {
  color: #1E3A5F;
}

.surface-light a:hover {
  color: #0A0A0A;
}

/* ===== Cards ===== */
.card {
  background-color: #1A1A1A;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  padding: 24px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  border-color: #C6FF00;
  background-color: #1E1E1E;
}

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

/* ===== Panels ===== */
.panel {
  background-color: #1A1A1A;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  padding: 24px;
}

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

/* ===== Gallery Caption ===== */
.gallery-caption {
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  color: #B8B2A8;
  border: 1px solid #3A3A3A;
  border-radius: 2px;
  padding: 4px 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== Section Spacing ===== */
.section {
  padding-block: 64px;
}

.section-lg {
  padding-block: 96px;
}

.section-xl {
  padding-block: 128px;
}

@media (max-width: 768px) {
  .section {
    padding-block: 48px;
  }

  .section-lg {
    padding-block: 64px;
  }

  .section-xl {
    padding-block: 80px;
  }
}

/* ===== Flex Utilities ===== */
.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

.flex-nowrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
}

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

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.flex-start {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

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

.flex-end {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

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

/* ===== Grid Utility (self-contained) ===== */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid > * {
  min-width: 0;
  min-height: 0;
}

.grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}

.grid-2 > * {
  min-width: 0;
  min-height: 0;
}

.grid-3 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}

.grid-3 > * {
  min-width: 0;
  min-height: 0;
}

.grid-4 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, 1fr);
}

.grid-4 > * {
  min-width: 0;
  min-height: 0;
}

@media (max-width: 992px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===== Spacing Utilities ===== */
.mt-xs { margin-block-start: 4px; }
.mt-sm { margin-block-start: 8px; }
.mt-md { margin-block-start: 16px; }
.mt-lg { margin-block-start: 24px; }
.mt-xl { margin-block-start: 32px; }
.mt-2xl { margin-block-start: 48px; }
.mt-3xl { margin-block-start: 64px; }
.mt-4xl { margin-block-start: 96px; }

.mb-xs { margin-block-end: 4px; }
.mb-sm { margin-block-end: 8px; }
.mb-md { margin-block-end: 16px; }
.mb-lg { margin-block-end: 24px; }
.mb-xl { margin-block-end: 32px; }
.mb-2xl { margin-block-end: 48px; }
.mb-3xl { margin-block-end: 64px; }
.mb-4xl { margin-block-end: 96px; }

.pt-xs { padding-block-start: 4px; }
.pt-sm { padding-block-start: 8px; }
.pt-md { padding-block-start: 16px; }
.pt-lg { padding-block-start: 24px; }
.pt-xl { padding-block-start: 32px; }
.pt-2xl { padding-block-start: 48px; }
.pt-3xl { padding-block-start: 64px; }
.pt-4xl { padding-block-start: 96px; }

.pb-xs { padding-block-end: 4px; }
.pb-sm { padding-block-end: 8px; }
.pb-md { padding-block-end: 16px; }
.pb-lg { padding-block-end: 24px; }
.pb-xl { padding-block-end: 32px; }
.pb-2xl { padding-block-end: 48px; }
.pb-3xl { padding-block-end: 64px; }
.pb-4xl { padding-block-end: 96px; }

/* ===== Text Utilities ===== */
.text-center { text-align: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }

.text-primary { color: #F5F0E8; }
.text-secondary { color: #B8B2A8; }
.text-accent-blue { color: #1E3A5F; }
.text-accent-lime { color: #C6FF00; }

.text-small { font-size: 14px; line-height: 1.5; }
.text-display {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  color: #F5F0E8;
}

/* ===== Background Utilities ===== */
.bg-primary { background-color: #0A0A0A; }
.bg-secondary { background-color: #1A1A1A; }
.bg-surface { background-color: #F5F0E8; }

/* ===== Border Utilities ===== */
.border {
  border: 1px solid #3A3A3A;
}

.border-lime {
  border-color: #C6FF00;
}

.border-blue {
  border-color: #1E3A5F;
}

/* ===== Overlay ===== */
.overlay {
  position: relative;
}

.overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #000000CC;
  z-index: 1;
  pointer-events: none;
}

.overlay > * {
  position: relative;
  z-index: 2;
}

/* ===== Image Treatment ===== */
.img-framed {
  border: 1px solid #3A3A3A;
  border-radius: 0;
}

.img-grayscale {
  filter: grayscale(100%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.img-grayscale:hover {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* ===== Visually Hidden ===== */
.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 ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background-color: #C6FF00;
  color: #0A0A0A;
  font-weight: 600;
  border-radius: 2px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ===== Reduced Motion ===== */
@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;
  }
}