/* Rihla Fragrances: static page styles
   Palette taken from the logo: true black and white, with one muted brass for rules and links. */

:root {
  --black: #000000;
  --ivory: #f2efe8;
  --muted: #9d988e;
  --brass: #b39a62;
  --rule: rgba(179, 154, 98, 0.35);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ivory);
  text-decoration-color: var(--brass);
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--brass);
}

a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--ivory);
  color: var(--black);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

/* Navigation */

.site-nav nav {
  display: flex;
  justify-content: center;
  gap: 2.25rem;
  padding: 1.75rem 1.5rem 0;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ivory);
}

/* Hero: the logo is the one big moment on the page */

.hero {
  padding: 2rem 1.5rem 6rem;
  text-align: center;
}

.hero img {
  width: min(100%, 440px);
  margin: 0 auto 3rem;
  animation: reveal 1.6s ease-out both;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.2;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

@keyframes reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Sections */

.section {
  max-width: 62rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid var(--rule);
}

.section h2 {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}

.body p {
  max-width: 34rem;
  margin: 0 0 1.25rem;
}

.body p:last-child {
  margin-bottom: 0;
}

/* Collections: a ruled list rather than cards */

.list {
  margin: 0;
}

.list > div {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.list > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.list dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.2;
}

.list dd {
  margin: 0.35rem 0 0;
  max-width: 34rem;
  color: var(--muted);
}

/* Contact details */

.details {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.6rem 1rem;
  margin: 2rem 0 0;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

/* Footer */

.site-footer {
  padding: 3rem 1.5rem 3.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* Wider screens: heading on the left, content on the right */

@media (min-width: 48rem) {
  .section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding-block: 5.5rem;
  }

  .section h2 {
    margin-bottom: 0;
  }

  .hero {
    padding-bottom: 8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero img {
    animation: none;
  }
}
