
:root {
  color-scheme: light;
  --bg: #FFF9EB;
  --card: #FFFDF6;
  --blue: #2D56A8;
  --muted: #5B7BBF;
  --line: #E3D8CB;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--blue);
  font-family: "Century Gothic", "Futura", "Avenir Next",
    "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

.catalog-wrap {
  max-width: 1040px;
  margin: auto;
  padding: 32px 24px 64px;
}

/* HEADER AND LOGO */

header {
  text-align: center;
  margin-bottom: 44px;
}

.wordmark {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  text-decoration: none;
  color: var(--blue);
}

.brand-logo {
  display: block;
  width: min(360px, 85vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

header p {
  letter-spacing: .22em;
  font-size: .8rem;
  margin: 12px 0 24px;
}

nav {
  display: flex;
  gap: 28px;
  justify-content: center;
}

a {
  color: var(--blue);
  text-underline-offset: 5px;
}

nav a[aria-current] {
  font-weight: 700;
}

/* HEADINGS */

h1 {
  font: 700 clamp(30px, 5vw, 44px) Georgia, serif;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 12px;
  line-height: 1.4;
}

p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* PRODUCT INTRO */

.intro {
  max-width: 560px;
  margin-bottom: 32px;
}

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

/* PRODUCT GRID */

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

.product-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .03);
}

.product-card:hover {
  border-color: var(--blue);
}

.product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.product-copy {
  padding: 24px;
}

.product-copy p {
  color: var(--muted);
  margin: 0 0 20px;
}

.detail-link {
  font-size: .85rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* PRODUCT DETAIL PAGE */

.back-link {
  display: inline-block;
  margin-bottom: 28px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.product-detail img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--card);
}

.product-detail .summary {
  font-size: 1.15rem;
  color: var(--muted);
}

.description {
  margin: 28px 0;
  line-height: 1.8;
}

/* BUTTONS */

.button {
  display: inline-block;
  background: var(--blue);
  color: var(--bg);
  padding: 14px 26px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .08em;
}

/* MESSAGES */

.message {
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* FOOTER */

footer {
  text-align: center;
  letter-spacing: .2em;
  margin-top: 64px;
  font-size: .85rem;
}

/* ACCESSIBILITY */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}

/* TABLETS */

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-detail img {
    max-height: 480px;
  }

  .brand-logo {
    width: min(300px, 85vw);
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .catalog-wrap {
    padding: 24px 18px 48px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-copy {
    padding: 22px;
  }

  header {
    margin-bottom: 32px;
  }

  .brand-logo {
    width: min(260px, 85vw);
  }

  header p {
    font-size: .7rem;
    letter-spacing: .18em;
  }
}
