/* ==========================================================
   Anthea Cooper – base styles
   ========================================================== */

:root {
  --green: #5b7248;
  --green-dark: #44563a;
  --ink: #121212;
  --dark: #242833;
  --text: #6f6a6c;
  --muted: #8f8180;
  --cream: #f6e7d1;
  --line: #dac6b0;
  --max: 1300px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Karla", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text);
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 400;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
  padding: 8px 12px;
  background: #fff;
  z-index: 100;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--green-dark);
}

/* ---------- Announcement ---------- */
.announcement {
  background: var(--dark);
  color: #fff;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}

.logo img {
  width: 180px;
}

.nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  background: none;
  border: 0;
  padding: 8px 0;
  font: inherit;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  cursor: pointer;
}

.has-dropdown {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 220px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.dropdown a {
  display: block;
  padding: 8px 20px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.dropdown a:hover {
  color: var(--green);
}

.has-dropdown.is-open > .dropdown {
  display: block;
}

.header-actions {
  display: flex;
  gap: 20px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-actions a {
  color: var(--ink);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 26px;
  color: var(--ink);
  cursor: pointer;
}

@media (min-width: 960px) {
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown {
    display: block;
  }
}

@media (max-width: 959px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px 20px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .dropdown {
    position: static;
    min-width: 0;
    padding: 0 0 8px 12px;
    border: 0;
    box-shadow: none;
  }

  .logo img {
    width: 150px;
  }

  .header-actions {
    gap: 12px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.3);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
}

.hero-box {
  max-width: 520px;
  padding: 48px;
  background: rgba(36, 40, 51, 0.85);
}

.hero h1 {
  color: #fff;
  font-size: 44px;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.hero p {
  margin: 0 0 24px;
  font-size: 18px;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
}

.section--cream {
  background: var(--cream);
}

.section-title {
  margin-bottom: 16px;
  text-align: center;
  font-size: 40px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-lead {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1100px) {
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .grid--3,
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .section-title { font-size: 30px; }
}

/* ---------- Tiles (showcase, gemstones, about) ---------- */
.tile {
  display: flex;
  flex-direction: column;
  text-align: center;
  text-decoration: none;
}

.tile-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  margin-bottom: 16px;
  padding: 20px;
  overflow: hidden;
  background: var(--cream);
}

.tile-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.tile-img--cover {
  padding: 0;
}

.tile-img--cover img {
  object-fit: cover;
}

.tile:hover img {
  transform: scale(1.04);
}

.tile h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tile p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Product slider ---------- */
.slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-track > * {
  flex: 0 0 calc((100% - 72px) / 4);
  scroll-snap-align: start;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.slider-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.slider-btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

@media (max-width: 960px) {
  .slider-track > * {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 560px) {
  .slider-track > * {
    flex-basis: 72%;
  }
}

/* ---------- Product card ---------- */
.product-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}

.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.product-media .img-hover {
  opacity: 0;
}

.product:hover .img-hover {
  opacity: 1;
}

.badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 4px 10px;
  background: var(--dark);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product h3 {
  margin: 14px 0 4px;
  font-size: 16px;
  line-height: 1.4;
}

.product h3 a {
  color: var(--ink);
  text-decoration: none;
}

.product h3 a:hover {
  text-decoration: underline;
}

.price {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Promises ---------- */
.promise {
  text-align: center;
}

.promise img {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 16px;
}

.promise h3 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Logos ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  align-items: center;
}

.logos img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
}

@media (max-width: 760px) {
  .logos {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 64px 20px;
  text-align: center;
  background: var(--cream);
  border-top: 1px solid var(--line);
}

.newsletter h2 {
  font-size: 36px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.newsletter p {
  margin: 12px 0 0;
}

.newsletter-form {
  display: flex;
  max-width: 520px;
  margin: 24px auto 0;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  border: 1px solid var(--line);
}

.newsletter-form button {
  padding: 14px 24px;
  border: 0;
  background: var(--green);
  color: #fff;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: var(--green-dark);
}

.form-msg {
  min-height: 24px;
  margin-top: 12px;
  color: var(--green);
}

/* ---------- Footer ---------- */
.footer {
  padding: 56px 0 24px;
  background: var(--dark);
  color: #c9c4c7;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li {
  margin-bottom: 8px;
}

.footer a {
  color: #c9c4c7;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #3a3f4c;
  font-size: 13px;
}

.payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.payments li {
  margin: 0;
  padding: 4px 8px;
  border: 1px solid #3a3f4c;
  font-size: 12px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
