/* 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);
  --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);
}

/* LifeSign hero */
#hero {
  position: relative;
  isolation: isolate;
  background: var(--page);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-art img, .hero-art canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-art img {
  object-fit: cover;
  object-position: right center;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--page) 0%, rgba(247, 242, 233, .78) 32%, transparent 64%);
}

.hero-inner {
  width: min(1220px, calc(100% - 10vw));
  min-height: min(725px, 92svh);
  margin: auto;
  padding: 124px 0 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, .94fr);
  grid-template-areas: "copy form" "links form";
  align-content: center;
  column-gap: clamp(32px, 6vw, 90px);
  row-gap: 24px;
}

.hero-copy {
  grid-area: copy;
  align-self: end;
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 0 0 20px;
  font: 600 clamp(2.8rem, 5.35vw, 5.1rem)/1.03 var(--display);
  letter-spacing: -.045em;
  color: var(--ink);
}

html[lang="ta"] .hero-copy h1 {
  max-width: none;
  font-size: clamp(2rem, 3.6vw, 3.55rem);
  line-height: 1.24;
}

.hero-copy p {
  max-width: 28em;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.58vw, 1.38rem);
  line-height: 1.48;
}

.hero-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(18px, 2.5vw, 32px);
  align-self: start;
}

.hero-links a, .hero-fallback {
  color: var(--kumkum);
  font-weight: 600;
  text-underline-offset: .24em;
}

.hero-card {
  grid-area: form;
  align-self: center;
  min-width: 0;
  padding: clamp(20px, 2.6vw, 34px);
  background: #fffbf5;
  border: 1px solid #d4ba9e;
  border-radius: 22px;
  box-shadow: 0 22px 52px -28px rgba(102, 44, 17, .55), 0 4px 12px rgba(98, 42, 16, .09);
}

.hero-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-card-heading h2, .hero-price {
  margin: 0;
  font: 600 clamp(1.25rem, 2vw, 1.75rem)/1.22 var(--display);
}

.hero-price {
  white-space: nowrap;
}

.hero-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-field {
  min-width: 0;
}

.hero-field-wide {
  grid-column: 1 / -1;
}

.hero-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.hero-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-inline-size: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #bda994;
  border-radius: 9px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  font-size: max(16px, 1rem);
}

.hero-field input:focus-visible {
  outline: 2px solid var(--kumkum);
  outline-offset: 2px;
}

.hero-field input[aria-invalid="true"] {
  border-color: var(--kumkum);
}

.hero-error {
  display: block;
  margin: 4px 0 0;
  color: var(--kumkum);
  font-size: .95rem;
  line-height: 1.35;
}

.hero-error:empty {
  display: none;
}

.hero-submit-error:empty {
  display: block;
  margin: 0;
}

.hero-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--kumkum);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.hero-fallback:not([hidden]) {
  display: inline-block;
  margin-top: 12px;
}

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

.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-width: 820px) {
  .hero-art {
    height: min(360px, 88vw);
    mask-image: linear-gradient(#000 48%, transparent);
  }
  .hero-art::after {
    background: linear-gradient(90deg, var(--page) 0%, rgba(247, 242, 233, .82) 48%, transparent 100%);
  }
  .hero-inner {
    width: min(520px, calc(100% - 32px));
    min-height: 0;
    padding: 112px 0 36px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "form" "links";
    row-gap: 18px;
  }
  .hero-copy h1 {
    max-width: 13ch;
    margin-bottom: 10px;
    font-size: clamp(2.15rem, 7.9vw, 3.35rem);
  }
  .hero-copy p {
    font-size: 1.05rem;
  }
  .hero-card {
    padding: 18px;
    border-radius: 17px;
  }
  .hero-card-heading {
    margin-bottom: 16px;
  }
  .hero-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .hero-submit {
    margin-top: 16px;
  }
  .hero-links {
    row-gap: 4px;
  }
  .hero-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .masthead.home-masthead {
    display: flex;
    flex-wrap: nowrap;
    padding-inline: 16px;
  }
  .masthead.home-masthead nav {
    display: flex;
    flex-wrap: nowrap;
  }
  .home-masthead .home-nav-contact {
    display: none;
  }
  .hero-inner {
    padding-top: calc(env(safe-area-inset-top, 0px) + 100px);
  }
  .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;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cell-art img {
    transition: none;
  }
}
