/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #1A1A1A;
  background-color: #F5F0E8;
  display: flex;
  flex-direction: row;
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; }
:focus-visible {
  outline: 3px solid #C9A84C;
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== CSS Variables ===== */
:root {
  --color-cream: #F5F0E8;
  --color-dark-brown: #2C1A0E;
  --color-red-orange: #D94A3D;
  --color-gold: #C9A84C;
  --color-charcoal: #1A1A1A;
  --color-white: #FFFFFF;
  --color-light-gray: #E0D8CE;
  --color-medium-brown: #5A3E2B;
  --color-card-shadow: rgba(44,26,14,0.08);
  --color-card-shadow-hover: rgba(44,26,14,0.16);
  --header-width: 220px;
  --header-width-tablet: 180px;
  --font-headline: 800;
  --font-body: 400;
  --radius-capsule: 24px;
  --radius-card: 12px;
  --radius-btn: 6px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s ease;
  --container-max: 1200px;
  --z-header: 100;
  --z-nav: 200;
  --z-skip: 300;
}

/* ===== Skip Link ===== */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-skip);
  background: var(--color-dark-brown);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: top 0.3s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ===== Header / Sidebar Track ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-width);
  height: 100vh;
  background-color: var(--color-dark-brown);
  z-index: var(--z-header);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.header-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 40px 20px 0;
  position: relative;
}
.brand-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 48px;
}
.brand-logo-vertical {
  writing-mode: vertical-lr;
  text-orientation: upright;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--color-white);
  line-height: 1.2;
  transition: color var(--transition-fast);
}
.brand-logo-vertical:hover {
  color: var(--color-gold);
}
.brand-tagline {
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.15em;
  margin-top: 12px;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  white-space: nowrap;
}

/* ===== Capsule Navigation ===== */
.nav-capsule {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-link {
  display: block;
  padding: 10px 20px;
  border-radius: var(--radius-capsule);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  text-align: center;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}
.nav-link:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}
.nav-link[aria-current="page"] {
  color: var(--color-white);
  background: var(--color-red-orange);
  box-shadow: 0 4px 14px rgba(217,74,61,0.3);
}
.nav-link[aria-current="page"]:hover {
  background: #c43d30;
}

/* ===== Header Decorative Slant ===== */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(135deg, var(--color-red-orange), var(--color-gold));
  clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* ===== Mobile Nav Toggle ===== */
.nav-toggle {
  display: none;
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 28px;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
  z-index: 10;
}
.toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
  transform-origin: center;
}

/* ===== Main Content Area ===== */
#main-content {
  flex: 1;
  margin-left: var(--header-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 32px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-dark-brown);
  color: rgba(255,255,255,0.8);
  padding: 40px 32px 24px;
  margin-left: var(--header-width);
}
.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.02em;
}
.footer-logo:hover {
  color: var(--color-gold);
}
.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}
.footer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}
.footer-contact-item a {
  color: var(--color-gold);
  transition: color var(--transition-fast);
}
.footer-contact-item a:hover {
  color: var(--color-red-orange);
}
.footer-links {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.footer-link {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition-fast);
  position: relative;
}
.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width var(--transition-med);
}
.footer-link:hover {
  color: var(--color-gold);
}
.footer-link:hover::after {
  width: 100%;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.footer-copyright {
  color: rgba(255,255,255,0.5);
}
.footer-icp {
  color: rgba(255,255,255,0.35);
}

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: var(--header-width);
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-red-orange));
  width: 0%;
  z-index: calc(var(--z-header) + 1);
  transition: width 0.08s linear;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .progress-bar {
    transition: none;
  }
}

/* ===== Utility: Container ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--color-medium-brown);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--color-light-gray);
  font-weight: 300;
}
.breadcrumb-item a {
  color: var(--color-medium-brown);
  transition: color var(--transition-fast);
}
.breadcrumb-item a:hover {
  color: var(--color-red-orange);
}
.breadcrumb-item[aria-current="page"] {
  color: var(--color-charcoal);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center;
}
.btn-primary {
  background: var(--color-red-orange);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(217,74,61,0.25);
}
.btn-primary:hover {
  background: #c43d30;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217,74,61,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-dark-brown);
  border: 2px solid var(--color-dark-brown);
}
.btn-outline:hover {
  background: var(--color-dark-brown);
  color: var(--color-white);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--color-gold);
  color: var(--color-dark-brown);
  box-shadow: 0 4px 14px rgba(201,168,76,0.25);
}
.btn-gold:hover {
  background: #b8963a;
  transform: translateY(-2px);
}

/* ===== Grid ===== */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== Card ===== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px var(--color-card-shadow);
  padding: 24px;
  transition: all var(--transition-med);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--color-card-shadow-hover);
}
.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-charcoal);
  margin-bottom: 8px;
}
.card-text {
  font-size: 0.95rem;
  color: var(--color-medium-brown);
  line-height: 1.6;
}
.card-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--color-red-orange);
  transition: color var(--transition-fast);
}
.card-link:hover {
  color: var(--color-gold);
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--color-light-gray);
  color: var(--color-medium-brown);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-red {
  background: var(--color-red-orange);
  color: var(--color-white);
}
.tag-gold {
  background: var(--color-gold);
  color: var(--color-dark-brown);
}

/* ===== Caption Vertical ===== */
.caption-vertical {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-medium-brown);
  letter-spacing: 0.1em;
  line-height: 1.4;
}

/* ===== Image Ratio Container ===== */
.img-ratio {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-light-gray);
}
.img-ratio::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}
.img-ratio img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-ratio-4-3::before {
  padding-bottom: 75%;
}
.img-ratio-1-1::before {
  padding-bottom: 100%;
}
.img-ratio-3-4::before {
  padding-bottom: 133.33%;
}

/* ===== Inline Decorative Elements ===== */
.divider-slant {
  height: 6px;
  background: linear-gradient(135deg, var(--color-red-orange), var(--color-gold));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 60%);
  margin: 32px 0;
  border: none;
}
.divider-line {
  height: 2px;
  background: var(--color-light-gray);
  margin: 24px 0;
  border: none;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .site-header {
    width: var(--header-width-tablet);
  }
  #main-content {
    margin-left: var(--header-width-tablet);
  }
  .site-footer {
    margin-left: var(--header-width-tablet);
  }
  .progress-bar {
    left: var(--header-width-tablet);
  }
  .header-inner {
    padding: 28px 14px 0;
  }
  .brand-logo-vertical {
    font-size: 22px;
    letter-spacing: 8px;
  }
  .nav-link {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 767px) {
  body {
    flex-direction: column;
  }
  .site-header {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 60px;
  }
  .header-inner {
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }
  .brand-rail {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
    gap: 12px;
  }
  .brand-logo-vertical {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    line-height: 1;
  }
  .brand-tagline {
    display: none;
  }
  .nav-capsule {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-dark-brown);
    z-index: calc(var(--z-nav) - 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 24px 40px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-med);
    transform: translateY(-12px);
  }
  .nav-capsule[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-list {
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
  }
  .nav-link {
    font-size: 1.05rem;
    padding: 14px 24px;
    text-align: center;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .site-header::after {
    display: none;
  }
  #main-content {
    margin-left: 0;
    padding-top: 0;
  }
  .site-main {
    padding: 28px 18px;
  }
  .site-footer {
    margin-left: 0;
    padding: 28px 18px 20px;
  }
  .footer-info {
    flex-direction: column;
    gap: 20px;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .progress-bar {
    left: 0;
  }
  .container {
    padding: 0 18px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== Typography Utilities ===== */
.h1, .h2, .h3 {
  font-weight: 800;
  color: var(--color-charcoal);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}
.h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
}
.h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}
.body-large {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-charcoal);
}
.body-small {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-medium-brown);
}
.text-gold {
  color: var(--color-gold);
}
.text-red {
  color: var(--color-red-orange);
}
.text-muted {
  color: var(--color-medium-brown);
}

/* ===== Spacing Helpers ===== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* ===== Section Highlight for Scroll ===== */
.section-marker {
  scroll-margin-top: 24px;
}

/* ===== Focus Visible Override for Nav ===== */
.nav-link:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ===== Print ===== */
@media print {
  .site-header {
    position: relative;
    width: 100%;
    height: auto;
  }
  #main-content {
    margin-left: 0;
  }
  .site-footer {
    margin-left: 0;
  }
  .progress-bar {
    display: none;
  }
  .nav-capsule {
    display: none;
  }
}
