/* ================================================================
   Tarotia first-pass static site
   Light background, black text, deep red accents.
   ================================================================ */

/* Variables */
:root {
  --colour-bg: #ffffff;
  --colour-text: #050505;
  --colour-muted: #555555;
  --colour-rule: #050505;
  --colour-red: #8f1d1b;
  --colour-red-dark: #64100f;
  --colour-hero: #e7e6d2;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --max-width: 1180px;
  --compact-hero-height: clamp(18rem, 32vh, 23rem);
  --title: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --sans: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
}

/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--colour-text);
  background: var(--colour-bg);
  font-family: var(--serif);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a {
  color: var(--colour-red);
  text-decoration: none;
}

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

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

/* Header */
.site-header {
  background: var(--colour-bg);
  border-bottom: 1px solid var(--colour-rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 1.15rem 0;
}

.tarotia-logo {
  display: grid;
  gap: 0.1rem;
}

.tarotia-logo__title {
  color: var(--colour-red);
  font-family: var(--title);
  font-size: 1.85rem;
  letter-spacing: 0;
  line-height: 1;
}

.tarotia-logo__tagline {
  color: var(--colour-text);
  font-size: 0.95rem;
  font-style: italic;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  justify-content: flex-end;
  font-family: var(--sans);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

.main-nav a {
  color: var(--colour-text);
}

.main-nav a:hover {
  color: var(--colour-red);
}

.main-nav a[aria-current="page"] {
  color: var(--colour-red);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--colour-hero);
  border-bottom: 1px solid var(--colour-rule);
  --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;
}

.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(231, 230, 210, 0.84) 38%, rgba(231, 230, 210, 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: #f8f5ed;
}

.hero--compact .hero-map::before {
  background: linear-gradient(90deg, #f8f5ed 0%, rgba(248, 245, 237, 0.84) 38%, rgba(248, 245, 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;
  }
}

/* Shared sections */
.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-grid--reverse {
  grid-template-columns: minmax(18rem, 0.44fr) minmax(0, 0.56fr);
}

.section-label {
  margin: 0 0 var(--space-sm);
  color: var(--colour-red);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.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);
}

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

/* Lower page layout */
.page-hero {
  background: #f8f5ed;
  border-bottom: 1px solid var(--colour-rule);
}

.page-hero-grid,
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(14rem, 0.38fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.page-hero-grid {
  align-items: end;
  min-height: clamp(18rem, 32vh, 23rem);
  padding: var(--space-lg) 0;
}

.page-layout {
  align-items: start;
}

.page-hero h1 {
  max-width: 42rem;
  margin: 0 0 var(--space-sm);
  color: var(--colour-red);
  font-family: var(--title);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.9;
}

.page-subtitle {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-style: italic;
  line-height: 1.2;
}

.page-aside {
  margin: 0;
}

.page-aside img {
  width: min(100%, 18rem);
  height: auto;
  margin-left: auto;
}

.page-hero-image {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  margin: 0;
}

.page-hero-image img {
  width: auto;
  max-width: 100%;
  height: 100%;
  margin-left: auto;
  object-fit: contain;
  object-position: right center;
}

.page-hero-image--wide img {
  width: 100%;
  object-fit: cover;
}

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

.prose {
  max-width: 46rem;
}

.prose .lead {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.prose p {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.prose h2 {
  margin: var(--space-xl) 0 var(--space-sm);
  color: var(--colour-red);
  font-family: var(--title);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.page-note {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--colour-rule);
  color: var(--colour-red);
  font-style: italic;
}

/* Illustration blocks */
.illustration-panel {
  border: 1px solid var(--colour-rule);
  margin: 0;
}

.illustration-panel--unframed {
  border: 0;
}

.illustration-panel img {
  width: 100%;
  height: auto;
}

/* What lives here cards */
.cards-section h2 {
  margin-bottom: var(--space-xl);
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
  align-items: flex-end;
  justify-content: flex-start;
}

.info-card {
  display: flex;
  width: clamp(12.5rem, 17vw, 15.5rem);
  min-height: 27rem;
  flex-direction: column;
  padding: 0.85rem;
  color: var(--colour-text);
  text-decoration: none;
  border: 1px solid var(--colour-rule);
  background: var(--colour-bg);
  box-shadow: 0.45rem 0.45rem 0 rgba(5, 5, 5, 0.12);
}

.info-card:hover {
  color: var(--colour-text);
  transform: translate(-0.1rem, -0.1rem);
}

.info-card:nth-child(1) {
  margin-top: 0;
  box-shadow: 0.55rem 0.55rem 0 rgba(143, 29, 27, 0.16);
}

.info-card:nth-child(2) {
  margin-top: 2rem;
}

.info-card:nth-child(3) {
  margin-top: 0.8rem;
  box-shadow: 0.4rem 0.55rem 0 rgba(5, 5, 5, 0.14);
}

.info-card:nth-child(4) {
  margin-top: 3rem;
  box-shadow: 0.55rem 0.35rem 0 rgba(143, 29, 27, 0.14);
}

.info-card img {
  width: 100%;
  height: auto;
  margin-bottom: var(--space-md);
  border: 1px solid var(--colour-rule);
}

.info-card h3 {
  margin: 0 0 var(--space-sm);
  color: var(--colour-red);
  font-family: var(--title);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.1;
}

.info-card p {
  margin: 0 0 var(--space-lg);
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Footer */
.site-footer {
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: center;
}

.footer-block p {
  margin: 0 0 0.35rem;
  color: var(--colour-red);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer-block a {
  color: var(--colour-text);
  font-size: 1.05rem;
}

.footer-block a:hover {
  color: var(--colour-red);
}

.footer-block--right {
  text-align: right;
}

.footer-emblem {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border: 1px solid var(--colour-rule);
  color: var(--colour-red);
  font-family: var(--title);
  font-size: 2.25rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--colour-rule);
  color: var(--colour-muted);
  font-family: var(--sans);
  font-size: 0.78rem;
}

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

.footer-bottom a:hover {
  color: var(--colour-red);
}

/* Responsive layout */
@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

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

  .page-hero-image img,
  .page-aside img {
    width: min(100%, 18rem);
    height: auto;
    margin-left: 0;
  }

  .page-hero-image {
    align-self: auto;
    display: block;
    margin: 0;
  }

  .card-grid {
    align-items: stretch;
  }

  .info-card,
  .info-card:nth-child(1) {
    width: calc(50% - 0.75rem);
  }

  .info-card:nth-child(n) {
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(var(--max-width), calc(100% - 1.25rem));
  }

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

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

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

  .card-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .info-card,
  .info-card:nth-child(1) {
    width: 100%;
    min-height: 0;
  }

  .illustration-panel,
  .illustration-panel img {
    min-height: 16rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-block--right {
    text-align: left;
  }

  .footer-emblem {
    order: -1;
  }
}
