/* AstroWin palette: burgundy, rose and warm ivory */
:root {
  --page: #F7F2E9;
  --header: #56192E;
  --page-deep: #EDE0DF;
  --surface: #FFFFFF;
  --accent: #BA8793;
  --accent-soft: #F1E3E5;
  --section-dark: #56192E;
  --kumkum: #8B1E3F;
  --kumkum-hover: #731633;
  --ink: #3B0F24;
  --ink-soft: #6E4A55;
  --line: rgba(59, 15, 36, 0.12);
  --glass: rgba(247, 242, 233, 0.88);
  --shadow: 0 18px 40px -22px rgba(59, 15, 36, 0.45);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Mukta", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
  background: var(--page);
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(139, 30, 63, 0.4);
  outline-offset: 3px;
}

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) clamp(16px, 5vw, 64px) 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.brand {
  position: relative;
  display: block;
  flex: 0 0 92px;
  width: 92px;
  height: 50px;
  overflow: hidden;
  border-radius: 8px;
}

.brand img {
  position: absolute;
  left: -26px;
  top: -44px;
  width: 144px;
  height: 144px;
  max-width: none;
  display: block;
  filter: grayscale(1) brightness(0.7) contrast(20);
  mix-blend-mode: screen;
}

.masthead nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--page);
  color: var(--kumkum);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
}

.masthead nav a:hover {
  background: var(--accent-soft);
}

/* hero: text directly on the warm mosaic */
#hero {
  position: relative;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: #FFE3A3;
}

#sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.intro-copy {
  position: absolute;
  left: clamp(16px, 5vw, 72px);
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  width: min(34rem, calc(100vw - 32px));
  padding: 22px 0 24px;
  opacity: 0;
  animation: settle 0.9s 0.5s ease-out forwards;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--kumkum);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.intro-copy h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
  text-wrap: balance;
}

.intro-copy p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: #4A162C;
  max-width: 30em;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  margin-top: 18px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--kumkum);
  color: #fff;
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 500;
  box-shadow: 0 10px 22px -12px rgba(139, 30, 63, 0.8);
  transition: background 0.15s, transform 0.1s;
}

.cta:hover {
  background: var(--kumkum-hover);
}

.cta:active {
  transform: scale(0.98);
}

/* reading rail along the bottom of the hero */
.rail-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 3vh, 32px);
  padding: 0 clamp(16px, 5vw, 72px);
}

.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rail-title {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
}

.rail-nav {
  display: flex;
  gap: 8px;
}

.rail-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--kumkum);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}

.rail-nav button:hover {
  background: var(--accent-soft);
}

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  touch-action: pan-x;
}

.rail::-webkit-scrollbar {
  display: none;
}

.card {
  flex: 0 0 clamp(150px, 15vw, 196px);
  display: block;
  text-decoration: none;
  color: var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover, .card:focus-visible {
  box-shadow: 0 0 0 2px var(--kumkum), var(--shadow);
  transform: translateY(-2px);
  outline: none;
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 34 / 31;
}

.card-art img, .cell-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card-cap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 12px;
}

.card-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.15;
  color: var(--ink);
}

.card-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--kumkum);
}

.card-price s, .cell .price s {
  font-weight: 400;
  color: var(--ink-soft);
  opacity: 0.7;
  margin-right: 0.35em;
}

/* Reading chart and mobile cards */
.readings {
  padding: clamp(56px, 10vh, 112px) 16px;
  background: var(--page);
}

.chart {
  --cell: min(190px, calc((100vw - 32px) / 4));
  --tile: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: var(--tile);
  width: calc(var(--cell) * 4);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: var(--tile);
  background: var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.cell {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  outline: none;
}

.cell-art {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.cell-art img {
  transition: transform 0.3s;
}

.cell:hover .cell-art img, .cell:focus-visible .cell-art img {
  transform: scale(1.05);
}

.cell .txt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  padding: calc(var(--cell) * 0.2) calc(var(--cell) * 0.07) calc(var(--cell) * 0.06);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.97) 45%, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.cell .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: max(11px, calc(var(--cell) * 0.105));
  line-height: 1.08;
  color: var(--ink);
  transition: color 0.25s;
}

.cell .description {
  display: none;
}

.cell .price {
  font-size: max(10px, calc(var(--cell) * 0.07));
  font-weight: 600;
  color: var(--kumkum);
}

.cell:hover .name, .cell:focus-visible .name {
  color: var(--kumkum);
}

.cell:focus-visible {
  box-shadow: inset 0 0 0 3px var(--kumkum);
}

/* empty corner houses carry a small kolam-style diamond */
.corner {
  position: relative;
  border-radius: 10px;
  background: var(--page-deep);
}

.corner::before {
  content: "";
  position: absolute;
  inset: 30%;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.corner::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--kumkum);
}

.center {
  grid-area: 2 / 2 / 4 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--cell) * 0.15);
  border-radius: 10px;
  background: var(--page);
}

.center h2 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0 0 0.35em;
  font-size: max(20px, calc(var(--cell) * 0.24));
  line-height: 1;
  color: var(--ink);
}

.center p {
  margin: 0;
  max-width: 22em;
  font-size: max(11px, calc(var(--cell) * 0.08));
  line-height: 1.5;
  color: var(--ink-soft);
}

/* how it works */
.after {
  background: var(--section-dark);
  color: var(--page);
  padding: clamp(56px, 10vh, 120px) clamp(16px, 5vw, 64px);
}

.after-inner {
  max-width: 960px;
  margin: 0 auto;
}

.after h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 1em;
  color: var(--page);
}

.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.steps li {
  counter-increment: s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--kumkum);
  color: #fff;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1;
}

.steps strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
}

.steps span {
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-height: 760px) {
  .intro-copy p {
    display: none;
  }
}

@media (max-width: 640px) {
  .intro-copy {
    top: calc(env(safe-area-inset-top, 0px) + 76px);
    padding: 18px 0 20px;
  }
  .intro-copy h1 {
    font-size: 2rem;
  }
  .intro-copy p {
    font-size: 1rem;
  }
  .cta {
    height: 48px;
    margin-top: 14px;
  }
  .rail-nav {
    display: none;
  }
  .readings {
    padding: 36px 16px 48px;
  }
  .chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    aspect-ratio: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  .chart .corner {
    display: none;
  }
  .chart .center {
    order: -1;
    padding: 0 0 4px;
    text-align: left;
    align-items: flex-start;
    background: transparent;
  }
  .center h2 {
    font-size: 2rem;
    margin-bottom: 8px;
  }
  .center p {
    font-size: 1rem;
    max-width: 30em;
  }
  .cell {
    grid-area: auto !important;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 8px 24px -20px rgba(59, 15, 36, 0.45);
  }
  .cell-art {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 3;
  }
  .cell .txt {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 12px;
    padding: 16px 18px 18px;
    background: var(--surface);
  }
  .cell .name {
    font-size: 1.35rem;
    line-height: 1.15;
  }
  .cell .description {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--ink-soft);
  }
  .cell .price {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    grid-column: 2;
    grid-row: 1;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
  }
  .cell .price s {
    margin: 3px 0 0;
    font-size: 0.8rem;
  }
}

.no-gl #sky {
  display: none;
}

.no-gl .stage {
  background: radial-gradient(circle at 50% 55%, #FFB000, #FFE3A3 40%, #FFF8E5 80%);
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-copy {
    animation: none;
    opacity: 1;
  }
  html {
    scroll-behavior: auto;
  }
  .card, .cell-art img, .cta {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}
