/* Cool Hunting: quiet index style */

:root {
  --bg: #f4f1ed;
  --text: #18130f;
  --muted: #62564d;
  --rule: #cbbdad;
  --link: #586b62;
  --link-hover: #33463f;
  --colour-bg: var(--bg);
  --colour-text: var(--text);
  --colour-muted: var(--muted);
  --colour-rule: var(--rule);
  --colour-red: #586b62;
  --colour-red-dark: #33463f;
  --colour-hero: #c5b6a6;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --max-width: 720px;
  --compact-hero-height: clamp(18rem, 32vh, 23rem);
  --title: Georgia, "Times New Roman", serif;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", "Gill Sans", Arial, sans-serif;
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--serif);
  line-height: 1.65;
}

.object-page--ashby {
  background: #f4efd0;
}

.object-page--cemetery {
  background: #e9efd0;
}

.object-page--maps {
  background: #f1e5cb;
}

.object-page--robot {
  background: #e5ecd7;
}

.object-page--observatory {
  background: #f3e7d2;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

.wrap,
.page {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 2rem 0 0;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover,
.site-logo:focus {
  color: var(--link-hover);
}

.site-logo__title {
  display: block;
  font-size: 1.15rem;
}

.site-logo__tagline {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-family: var(--sans);
  font-size: 1rem;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--colour-hero);
  border-bottom: 1px solid var(--colour-rule);
  --max-width: 1180px;
  --hero-media-start: max(44vw, calc((100vw - var(--max-width)) / 2 + 520px));
  --hero-fade-width: clamp(260px, 30vw, 520px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 35rem;
  padding: var(--space-lg) var(--space-xl) var(--space-lg) 0;
  background: #c5b6a6;
}

.hero-copy h1 {
  margin: 0 0 var(--space-xs);
  color: var(--colour-red);
  font-family: var(--title);
  font-size: clamp(3.5rem, 8.5vw, 7rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.86;
}

.hero-kicker {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-style: italic;
  line-height: 1.15;
}

.hero-copy .hero-kicker--home {
  font-size: clamp(1.5rem, 3vw, 2.45rem);
}

.hero-copy p {
  max-width: 28rem;
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-top: var(--space-sm);
  border-bottom: 1px solid currentColor;
  color: var(--colour-red);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-map {
  position: relative;
  min-height: 24rem;
  margin: 0;
  overflow: hidden;
}

.hero-map::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: var(--hero-fade-width);
  background: linear-gradient(90deg, var(--colour-hero) 0%, rgba(197, 182, 166, 0.84) 38%, rgba(197, 182, 166, 0) 100%);
  pointer-events: none;
}

.hero-map img {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  object-fit: cover;
  object-position: right center;
}

@media (min-width: 900px) {
  .hero-grid {
    display: flex;
    min-height: clamp(24rem, 42vh, 31rem);
    align-items: center;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  .hero-map {
    position: absolute;
    top: 0;
    right: calc(50% - 50vw);
    bottom: 0;
    left: var(--hero-media-start);
    z-index: 0;
    min-height: 0;
  }

  .hero-map img {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}

.hero--compact .hero-grid {
  min-height: var(--compact-hero-height);
}

.hero--compact {
  background: #f4f1ed;
}

.hero--compact .hero-map::before {
  background: linear-gradient(90deg, #f4f1ed 0%, rgba(244, 241, 237, 0.84) 38%, rgba(244, 241, 237, 0) 100%);
}

.hero--compact .hero-copy {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.hero--compact .hero-copy h1 {
  font-size: clamp(3.2rem, 7vw, 6rem);
}

.hero--compact .hero-kicker {
  max-width: 30rem;
  margin: var(--space-sm) 0 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.hero--plain .hero-map::before {
  display: none;
}

.hero--plain .hero-map img {
  height: var(--compact-hero-height);
  object-fit: contain;
  object-position: center center;
}

@media (min-width: 900px) and (max-width: 1080px) {
  .hero {
    --hero-media-start: clamp(430px, 50vw, 540px);
    --hero-fade-width: clamp(220px, 28vw, 360px);
  }

  .hero-map {
    left: var(--hero-media-start);
  }
}

@media (max-width: 899px) {
  .hero-copy {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .hero-map {
    position: relative;
    margin: 0;
    border-top: 1px solid var(--colour-rule);
  }

  .hero-map::before {
    display: none;
  }
}

.page {
  padding: 5rem 0 4rem;
}

.section {
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--colour-rule);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.52fr) minmax(18rem, 0.48fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.section-grid--bottom {
  align-items: end;
}

.section h2 {
  max-width: 34rem;
  margin: 0 0 var(--space-md);
  font-family: var(--title);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.section-copy p {
  max-width: 37rem;
  margin: 0 0 var(--space-md);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}

.section-copy-link {
  display: block;
  color: var(--colour-text);
  text-decoration: none;
}

.section-copy-link:hover h2,
.section-copy-link:focus h2 {
  color: var(--colour-red);
}

.intro {
  max-width: 38rem;
  margin-bottom: 4rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.intro > p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-style: italic;
}

.cards-section h2 {
  margin-bottom: var(--space-xl);
}

.object-list {
  display: grid;
  gap: 2.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.object-list li {
  background: #eee3d5;
}

.object-list li:nth-child(2) {
  background: #e1e8de;
}

.object-list li:nth-child(3) {
  background: #ead9c9;
}

.object-list li:nth-child(4) {
  background: #dce4df;
}

.object-list li:nth-child(5) {
  background: #eadfd2;
}

.object-list a {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: inherit;
  color: var(--text);
  text-decoration: none;
}

.object-list a:hover,
.object-list a:focus {
  color: var(--text);
  border-color: #a79280;
}

.object-list a:hover h2,
.object-list a:focus h2 {
  color: var(--link-hover);
}

.object-list img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.object-list li:nth-child(2) img {
  aspect-ratio: 5 / 4;
}

.object-list li:nth-child(3) img {
  aspect-ratio: 4 / 5;
}

.object-list li:nth-child(4) img {
  aspect-ratio: 6 / 5;
}

.object-list li:nth-child(5) img {
  aspect-ratio: 5 / 6;
}

.object-list h2 {
  margin: 0 0 0.25rem;
  color: var(--colour-red);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
}

.object-list p {
  max-width: 34rem;
  margin: 0 0 0.45rem;
}

.object-placeholder {
  margin: -1.4rem 0 3rem;
}

.object-placeholder img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--rule);
  object-fit: cover;
}

.object-placeholder--cemetery img {
  aspect-ratio: 5 / 4;
}

.object-placeholder--maps img {
  aspect-ratio: 4 / 5;
}

.object-placeholder--robot img {
  aspect-ratio: 6 / 5;
}

.object-placeholder--observatory img {
  aspect-ratio: 5 / 6;
}

.content {
  display: grid;
  gap: 2.2rem;
  margin-top: 3rem;
}

.content section {
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.content h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  font-weight: 400;
}

.content p {
  margin: 0 0 1rem;
}

.content ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.1rem;
}

.page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 1rem;
}

.page-nav a,
.footer-links a {
  text-decoration: none;
}

.page-nav a:hover,
.page-nav a:focus,
.footer-links a:hover,
.footer-links a:focus {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.page-nav a:nth-child(2) {
  text-align: center;
}

.page-nav a:nth-child(3) {
  text-align: right;
}

.site-footer {
  padding: 0 0 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--text);
}

@media (max-width: 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy h1 {
    font-size: clamp(3.4rem, 19vw, 5rem);
  }

  .hero-map,
  .hero-map img {
    min-height: 22rem;
  }

  .page {
    padding-top: 3.5rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .section-grid {
    width: min(var(--max-width), calc(100% - 1.25rem));
    margin-right: auto;
    margin-left: auto;
    grid-template-columns: 1fr;
  }

  .object-list a {
    grid-template-columns: 1fr;
  }

  .object-list img {
    aspect-ratio: 1 / 1;
  }

  .object-list li:nth-child(2) img {
    aspect-ratio: 5 / 4;
  }

  .object-list li:nth-child(3) img {
    aspect-ratio: 4 / 5;
  }

  .object-list li:nth-child(4) img {
    aspect-ratio: 6 / 5;
  }

  .object-list li:nth-child(5) img {
    aspect-ratio: 5 / 6;
  }
}
