:root {
  --oxblood: #642822;
  --oxblood-dark: #421713;
  --coffee: #2a1b14;
  --leather: #7f4b2b;
  --saddle: #ad7a45;
  --brass: #c7a369;
  --parchment: #f3ead6;
  --paper: #fbf7ee;
  --ink: #2b2b25;
  --muted: #6b6255;
  --line: rgba(70, 38, 24, 0.18);
  --shadow: 0 18px 45px rgba(46, 24, 14, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--parchment);
  color: var(--ink);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
.button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.top-rail {
  height: 8px;
  background: var(--oxblood);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(20px, 5vw, 70px);
  background: rgba(234, 215, 180, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand img {
  width: 185px;
  max-height: 82px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--coffee);
  font-weight: 700;
}

.main-nav a {
  border-bottom: 2px solid transparent;
  padding: 8px 0;
}

.main-nav a:hover {
  border-color: var(--oxblood);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.plain-button {
  background: transparent;
  color: var(--coffee);
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coffee);
  color: var(--paper);
  border-radius: 999px;
  padding: 9px 14px;
}

.cart-pill span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  background: var(--oxblood);
  border-radius: 50%;
}

.nav-toggle {
  display: none;
  background: var(--coffee);
  color: var(--paper);
  border-radius: 4px;
  padding: 8px 12px;
}

.hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: clamp(70px, 11vw, 140px) clamp(24px, 6vw, 76px);
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(46, 18, 8, 0.92) 0%, rgba(75, 25, 12, 0.66) 38%, rgba(36, 15, 8, 0.08) 70%),
    url("assets/cartwright-hero-crop.webp") center / cover no-repeat;
}

.hero-copy {
  width: 100%;
  max-width: 620px;
  min-width: 0;
}

.hero-line,
.section-label,
.product-type {
  margin: 0 0 10px;
  color: var(--brass);
  font-weight: 800;
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--coffee);
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.08;
}

.hero h1 {
  color: #fff3d8;
  font-size: clamp(44px, 7vw, 82px);
  max-width: 680px;
}

.hero h1 span {
  display: block;
}

.hero p {
  max-width: 540px;
  margin: 22px 0 0;
  color: rgba(255, 246, 225, 0.88);
  font-size: 20px;
}

.hero-actions,
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button,
.product-foot button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 3px;
  background: var(--saddle);
  color: #fff9ed;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(43, 23, 13, 0.22);
}

.button.secondary {
  background: rgba(255, 246, 225, 0.14);
  border: 1px solid rgba(255, 246, 225, 0.45);
}

.button.dark {
  background: var(--oxblood);
}

.section-pad {
  padding: clamp(64px, 8vw, 104px) clamp(22px, 5vw, 70px);
}

.section-heading {
  max-width: 1060px;
  margin: 0 auto 30px;
}

.section-heading h2,
.society-copy h2,
.portal-copy h2,
.admin-section h2,
.contact-card h2 {
  font-size: clamp(34px, 5vw, 55px);
}

.section-heading p,
.society-copy p,
.portal-copy p,
.admin-section p,
.contact-card p {
  max-width: 820px;
  color: var(--muted);
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.collection-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 18px;
}

.collection-card {
  min-height: 270px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  background: #e3d1ad;
  border: 1px solid rgba(107, 74, 39, 0.16);
}

.collection-card.large {
  grid-row: span 2;
  min-height: 560px;
}

.collection-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.collection-card:hover img {
  transform: scale(1.035);
}

.collection-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(32, 20, 12, 0.42));
}

.collection-card span {
  position: relative;
  z-index: 1;
  padding: 0 22px 22px;
  color: #0b3d31;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 25px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 246, 225, 0.52);
}

.society-band {
  max-width: 1320px;
  margin: 0 auto 0;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  padding: clamp(58px, 7vw, 84px);
  background: var(--paper);
}

.portrait-wrap {
  display: grid;
  justify-items: center;
  gap: 20px;
}

.portrait-wrap img {
  width: min(390px, 100%);
  box-shadow: var(--shadow);
}

.portrait-wrap span {
  display: inline-block;
  padding: 14px 22px;
  background: var(--saddle);
  color: var(--coffee);
  font-family: "Cinzel", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

.rule {
  width: min(440px, 100%);
  height: 2px;
  margin: 24px 0;
  background: var(--oxblood);
}

.society-copy h3 {
  color: var(--oxblood);
  font-size: 25px;
  margin-top: 10px;
}

.privilege-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 56px clamp(24px, 6vw, 92px);
  background: var(--oxblood);
  color: rgba(255, 246, 225, 0.88);
}

.privilege-strip h3 {
  color: var(--paper);
  font-size: 23px;
}

.privilege-strip h3::before {
  content: "✓ ";
  font-family: "Source Sans 3", Arial, sans-serif;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--coffee);
  font-weight: 800;
}

.filter.active {
  background: var(--coffee);
  color: var(--paper);
}

.product-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(50, 24, 12, 0.08);
}

.product-card.hidden {
  display: none;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e8d8b8;
}

.product-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.product-card h3 {
  font-size: 23px;
}

.product-card p {
  color: var(--muted);
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.product-foot span {
  color: var(--oxblood);
  font-family: "Cinzel", Georgia, serif;
  font-size: 22px;
  font-weight: 800;
}

.product-foot button {
  min-height: 40px;
  padding: 9px 14px;
  background: var(--coffee);
  font-size: 15px;
}

.product-card.locked .product-foot button {
  background: var(--oxblood);
}

.portal-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 40px;
  align-items: center;
  background: #efe1c4;
}

.portal-copy ul {
  padding-left: 22px;
  color: var(--muted);
}

.portal-card {
  padding: 30px;
  background: var(--coffee);
  color: rgba(255, 246, 225, 0.86);
  box-shadow: var(--shadow);
}

.portal-card img {
  width: 210px;
  margin: 0 auto 22px;
}

.portal-card h3 {
  color: #fff4dc;
  font-size: 30px;
}

.admin-section {
  padding: clamp(64px, 8vw, 104px) clamp(22px, 5vw, 70px);
  background: var(--oxblood-dark);
  color: rgba(255, 246, 225, 0.88);
}

.admin-section h2,
.admin-section h3 {
  color: var(--paper);
}

.admin-section > div:first-child {
  max-width: 960px;
  margin: 0 auto 28px;
}

.admin-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.admin-grid article {
  padding: 24px;
  border: 1px solid rgba(255, 246, 225, 0.2);
  background: rgba(255, 246, 225, 0.06);
}

.admin-grid span {
  color: var(--brass);
  font-family: "Cinzel", Georgia, serif;
  font-size: 28px;
  font-weight: 800;
}

.contact-card {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: center;
  padding: clamp(28px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.contact-card img {
  border: 10px solid #fff;
  box-shadow: var(--shadow);
}

.socials a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--coffee);
  font-weight: 800;
}

.side-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: end;
  background: rgba(25, 15, 9, 0.45);
}

.side-panel.open {
  display: flex;
}

.panel-inner {
  width: min(480px, 100%);
  height: 100%;
  overflow: auto;
  padding: 28px;
  background: var(--paper);
  box-shadow: -18px 0 42px rgba(0, 0, 0, 0.22);
}

.close-panel {
  float: right;
  background: var(--coffee);
  color: var(--paper);
  border-radius: 3px;
  padding: 8px 12px;
}

#panelContent h2 {
  margin-top: 46px;
  font-size: 34px;
}

.panel-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.panel-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 32px clamp(24px, 5vw, 70px);
  background: var(--coffee);
  color: rgba(255, 246, 225, 0.78);
}

.site-footer img {
  width: 160px;
}

.site-footer a {
  color: var(--brass);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .header-actions {
    justify-self: end;
  }

  .collection-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .privilege-strip,
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header {
    gap: 12px;
  }

  .brand img {
    width: 140px;
    max-height: 74px;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .main-nav,
  .header-actions {
    display: none;
  }

  .site-header.nav-open .main-nav,
  .site-header.nav-open .header-actions {
    display: flex;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    min-height: 580px;
    padding: 42px 28px 56px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(46, 18, 8, 0.94), rgba(46, 18, 8, 0.7)),
      url("assets/cartwright-hero-crop.webp") center / cover no-repeat;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(36px, 10vw, 40px);
    overflow-wrap: anywhere;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-line {
    font-size: 16px;
    max-width: 300px;
  }

  .button {
    width: 100%;
  }

  .section-heading.split,
  .society-band,
  .portal-section,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .society-copy h2,
  .portal-copy h2,
  .admin-section h2,
  .contact-card h2 {
    font-size: clamp(28px, 8vw, 31px);
    overflow-wrap: anywhere;
  }

  .collection-grid,
  .product-grid,
  .privilege-strip,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .collection-card.large {
    min-height: 390px;
  }

  .collection-card {
    min-height: 310px;
  }

  .society-band {
    padding: 32px 22px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}
