/* Colours and shared styles */

:root {
  --cream: #fbf7f0;
  --white: #ffffff;
  --cocoa: #39251f;
  --muted: #65534c;
  --berry: #84394b;
  --berry-dark: #682b3a;
  --blush: #f5e7e4;
  --border: #ddcfc4;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--cocoa);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

main {
  flex: 1;
}

.container {
  width: 92%;
  max-width: 1120px;
  margin-inline: auto;
}

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

h1,
h2,
h3,
p,
dl,
dd,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.4rem;
}

p + p {
  margin-top: 0.8rem;
}

a {
  color: var(--berry);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--berry-dark);
}

a:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--white);
}


/* Header and navigation */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  color: var(--cocoa);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: bold;
  line-height: 1.15;
  text-decoration: none;
}

.developer-details {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  border-top: 1px solid var(--border);
}

.main-nav a {
  padding-block: 0.7rem;
  border-bottom: 3px solid transparent;
  color: var(--cocoa);
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--berry);
  border-bottom-color: var(--berry);
}


/* Buttons */

.button {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--berry);
  border-radius: 5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  background: var(--berry);
  color: var(--white);
}

.button-primary:hover {
  background: var(--berry-dark);
  border-color: var(--berry-dark);
  color: var(--white);
}

.button-secondary {
  color: var(--berry);
  background: transparent;
}

.button-secondary:hover {
  background: var(--white);
  color: var(--berry-dark);
}


/* Home, About, and Custom Orders introductions */

.hero {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-content p {
  max-width: 56ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-content > .button {
  margin-top: 1.5rem;
}

.hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}


/* Product categories and catalogue */

.products-section,
.contact-section,
.order-details {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.products-section {
  background: var(--white);
}

.page-intro {
  max-width: 65ch;
  margin-bottom: 2rem;
}

.page-intro p {
  margin-top: 0.9rem;
  color: var(--muted);
}

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

.products-section h2 + .product-grid {
  margin-top: 1.5rem;
}

.product-card,
.contact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}

.product-card {
  scroll-margin-top: 1rem;
}

.product-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px 7px 0 0;
}

.product-card-content,
.contact-card {
  padding: 1.4rem;
}

.product-card h2,
.product-card h3,
.contact-card h2 {
  font-size: 1.55rem;
}

.product-card-content p {
  margin-top: 0.65rem;
  color: var(--muted);
}

.product-list,
.contact-details {
  margin-top: 1rem;
}

.product-list dt,
.contact-details dt {
  font-weight: 700;
}

.product-list dd,
.contact-details dd {
  margin-top: 0.2rem;
  color: var(--muted);
}

.product-list dt:not(:first-child),
.contact-details dt:not(:first-child) {
  margin-top: 1rem;
}


/* Custom cake enquiries */

.custom-order-section {
  padding-block: 2.5rem;
  background: var(--blush);
}

.custom-order-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.custom-order-inner p {
  max-width: 65ch;
  margin-top: 0.65rem;
}

.custom-order-inner .button {
  flex-shrink: 0;
}

.order-details {
  background: var(--white);
}

.order-checklist {
  max-width: 72ch;
  padding-left: 1.3rem;
  margin: 1.25rem 0 2rem;
}

.order-checklist li + li {
  margin-top: 0.75rem;
}

.order-details blockquote {
  max-width: 72ch;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--berry);
  background: var(--cream);
}


/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-card address {
  margin-top: 1rem;
  font-style: normal;
}

.contact-card p,
.contact-card h3 {
  margin-top: 1rem;
}

.contact-card h3 + p {
  margin-top: 0.4rem;
}


/* Footer */

.site-footer {
  padding-block: 1.5rem;
  background: var(--cocoa);
  color: var(--white);
}

.footer-inner,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-inner {
  justify-content: space-between;
}

.footer-details p + p {
  margin-top: 0.2rem;
  color: var(--blush);
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--white);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  text-decoration-thickness: 2px;
}


/* Tablets and smaller screens */

@media (max-width: 800px) {
  .header-top {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }

  .main-nav {
    justify-content: center;
    column-gap: 1.25rem;
  }

  .hero-inner {
    gap: 1.5rem;
  }

  .product-grid {
    gap: 1rem;
  }

  .product-card-content {
    padding: 1rem;
  }
}


/* Phones and narrow tablets */

@media (max-width: 640px) {
  .main-nav {
    justify-content: space-between;
    gap: 0 0.5rem;
  }

  .main-nav a {
    font-size: 0.9rem;
  }

  .hero-inner,
  .product-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-image {
    max-height: 320px;
  }

  .custom-order-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .main-nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    column-gap: 0.25rem;
  }

  .main-nav a {
    font-size: clamp(0.75rem, 3.5vw, 0.9rem);
    white-space: nowrap;
  }
}