/* Colours and shared styles */

:root {
  --teal: #075b55;
  --deep-teal: #063f3c;
  --gold: #f4c54b;
  --cream: #fbfaf4;
  --pale-teal: #e8f1ed;
}

* {
  box-sizing: border-box;
}

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

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-underline-offset: 4px;
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

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

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 10px 16px;
  background: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}


/* Header and navigation */

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

.header-inner,
.section-heading,
.visit,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-inner {
  min-height: 84px;
}

.wordmark {
  color: var(--teal);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.2;
  text-decoration: none;
}

.wordmark strong {
  position: relative;
  font-size: 1.14em;
  font-weight: 800;
}

/* A small gold curve beneath “Smart” */
.wordmark strong::after {
  content: "";
  position: absolute;
  left: 8%;
  bottom: -5px;
  width: 75%;
  height: 6px;
  border-top: 3px solid var(--gold);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.site-header nav a {
  padding: 10px 0 7px;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  text-decoration: none;
}

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


/* Homepage banner */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--deep-teal);
  color: white;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

/* Keep the headline readable while leaving the shopper in view. */
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 48%;
  background: rgb(4 58 54 / 94%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: clamp(380px, 38vw, 540px);
  padding-block: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
}

.hero h1 {
  max-width: 46%;
  font-size: clamp(3rem, 5.5vw, 5.3rem);
  line-height: 1;
}

.button {
  display: inline-block;
  padding: 13px 23px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.button-gold {
  background: var(--gold);
  color: var(--deep-teal);
}

.button-gold:hover {
  background: #ffda70;
}


/* Featured departments */

.departments {
  padding-block: clamp(40px, 6vw, 76px);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading a,
.visit a {
  font-weight: 650;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.department-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  text-decoration: none;
}

.department-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--pale-teal);
}

.department-card span {
  display: block;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 650;
}

.department-card:hover {
  background: var(--deep-teal);
}

.department-card:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* Store visit and footer */

.visit {
  margin-bottom: 48px;
  padding: 28px 32px;
  border-left: 5px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: var(--pale-teal);
}

.visit h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.site-footer {
  padding-block: 22px;
  background: var(--deep-teal);
  color: white;
}

.footer-inner > span {
  font-weight: 700;
}


/* Tablets */

@media (max-width: 900px) {
  .site-header nav {
    gap: 18px;
  }

  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Phones */

@media (max-width: 650px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-block: 16px 8px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  /* Show the photograph above the headline on small screens. */
  .hero-photo {
    position: static;
    aspect-ratio: 16 / 9;
    height: auto;
    object-position: 70% 40%;
  }

  .hero::before {
    display: none;
  }

  .hero-inner {
    min-height: auto;
    padding-block: 28px 34px;
    gap: 20px;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.6rem, 9vw, 3.5rem);
  }

  .section-heading,
  .visit {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .visit {
    padding: 22px;
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .department-grid {
    grid-template-columns: 1fr;
  }
}

.site-header .header-inner,
.header-identity,
.site-footer .footer-inner {
  display: flex;
  align-items: center;
}

.site-header .header-inner,
.site-footer .footer-inner {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.header-identity {
  gap: 1rem;
}

.developer-credit {
  padding-inline-start: 1rem;
  border-inline-start: 1px solid currentColor;
  font-size: 0.875rem;
}

@media (max-width: 56rem) {
  .site-header .header-inner,
  .header-identity {
    flex-direction: column;
    text-align: center;
  }

  .header-identity {
    gap: 0.25rem;
  }

  .developer-credit {
    padding: 0;
    border: 0;
  }

  .site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 26rem;
    gap: 0.25rem;
  }
}

@media (max-width: 36rem) {
  .site-footer .footer-inner {
    flex-direction: column;
    gap: 0.35rem;
    text-align: center;
  }
}