:root {
  --bg: #f4efe7;
  --bg-soft: #ebe2d4;
  --panel: rgba(255, 250, 242, 0.78);
  --panel-strong: rgba(252, 247, 240, 0.96);
  --line: rgba(53, 37, 24, 0.1);
  --text: #1d140d;
  --muted: #6f6052;
  --brand: #a54d2d;
  --brand-2: #d29b5f;
  --accent: #8e3b2e;
  --accent-2: #d8c3a5;
  --radius: 26px;
  --shadow: 0 24px 60px rgba(59, 40, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(210, 155, 95, 0.22), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(165, 77, 45, 0.12), transparent 22%),
    linear-gradient(180deg, #f8f2ea 0%, #f4efe7 36%, #eee5d7 100%);
  overflow-x: hidden;
}

.bg-orb,
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-orb {
  width: 36rem;
  height: 36rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.45;
}

.orb-one {
  top: -10rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(210, 155, 95, 0.5), transparent 60%);
  animation: float 14s ease-in-out infinite;
}

.orb-two {
  top: 22rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(165, 77, 45, 0.22), transparent 60%);
  animation: float 18s ease-in-out infinite reverse;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(42, 28, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 28, 17, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 94%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.landing-shell,
.formatter-shell,
.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-shell {
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.72);
  backdrop-filter: blur(12px);
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff7ef;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.topnav a,
.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.topnav a:hover,
.site-footer a:hover {
  color: var(--brand-2);
}

.hero-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 42px;
  align-items: start;
  margin-top: 54px;
}

.hero-main,
.feature-ribbon,
.story-card,
.panel,
.site-footer {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-main {
  position: relative;
  overflow: hidden;
  padding: 8px 0 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  background:
    transparent;
}

.hero-main::after {
  display: none;
}

.eyebrow,
.mini-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--brand);
}

.hero-main h1,
.formatter-intro h2,
.site-footer h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
}

.hero-main h1 {
  max-width: 10.5ch;
  font-size: clamp(3.6rem, 8vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 0;
}

.hero-text {
  max-width: 560px;
  margin: 26px 0 0;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--muted);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-strip span,
.card-label,
.feature-tile p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(165, 77, 45, 0.05);
  border: 1px solid rgba(53, 37, 24, 0.08);
}

.hero-note,
.feature-ribbon,
.story-card,
.panel,
.site-footer {
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.72);
}

.story-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
}

.hero-note {
  align-self: start;
  margin-top: 82px;
  padding: 18px 0 0 24px;
  border-left: 1px solid rgba(53, 37, 24, 0.14);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
}

.hero-note p {
  margin: 0;
  max-width: 24ch;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--muted);
}

.story-card p:last-child,
.site-footer p {
  margin: 14px 0 0;
  line-height: 1.8;
  color: var(--muted);
}

.feature-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
}

.feature-tile {
  min-height: 196px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.88), rgba(249, 243, 234, 0.8));
  border: 1px solid rgba(53, 37, 24, 0.06);
}

.feature-tile h3 {
  margin: 16px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.feature-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.story-card {
  padding: 26px;
}

.story-card.accent {
  background:
    radial-gradient(circle at top left, rgba(210, 155, 95, 0.16), transparent 28%),
    rgba(255, 250, 242, 0.82);
}

.formatter-shell {
  padding: 22px 0 64px;
}

.formatter-intro {
  max-width: 740px;
  margin-bottom: 20px;
}

.formatter-intro h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
}

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

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2,
.rules h3 {
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.grow {
  flex: 1;
}

select,
textarea,
.output {
  width: 100%;
  border: 1px solid rgba(53, 37, 24, 0.08);
  border-radius: 20px;
  padding: 16px 18px;
  font: inherit;
  color: var(--text);
  background: var(--panel-strong);
}

select:focus,
textarea:focus {
  outline: 2px solid rgba(165, 77, 45, 0.14);
  border-color: rgba(165, 77, 45, 0.34);
}

textarea {
  min-height: 360px;
  resize: vertical;
  line-height: 1.7;
}

button,
.hero-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

button:hover,
.hero-link:hover {
  transform: translateY(-2px);
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff7ef;
  box-shadow: 0 18px 36px rgba(165, 77, 45, 0.16);
}

.ghost-button {
  background: rgba(255, 252, 247, 0.72);
  color: var(--text);
  border: 1px solid rgba(53, 37, 24, 0.08);
}

.hint,
.rules {
  color: var(--muted);
}

.hint {
  margin: 16px 0 0;
  line-height: 1.6;
}

.output {
  min-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  font-family: "Noto Sans Telugu", "Space Grotesk", sans-serif;
}

.rules {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(53, 37, 24, 0.08);
}

.rules ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.7;
}

.site-footer {
  margin-bottom: 26px;
  overflow: hidden;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(210, 155, 95, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(247, 240, 231, 0.94));
}

.footer-copy {
  max-width: 720px;
}

.site-footer h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.04;
}

.footer-marquee {
  display: flex;
  gap: 18px;
  width: max-content;
  margin-top: 24px;
  animation: marquee 18s linear infinite;
}

.footer-marquee span {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(53, 37, 24, 0.08);
  background: rgba(165, 77, 45, 0.05);
  font-weight: 700;
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal[data-reveal="fade-left"] {
  transform: translateX(44px);
}

.reveal[data-reveal="fade-right"] {
  transform: translateX(-44px);
}

.reveal[data-reveal="zoom-in"] {
  transform: scale(0.92);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 18px, 0);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-25%);
  }
}

@media (max-width: 980px) {
  .hero-block,
  .workspace,
  .story-grid,
  .feature-ribbon {
    grid-template-columns: 1fr;
  }

  .hero-block {
    gap: 22px;
    margin-top: 38px;
  }

  .feature-tile {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .landing-shell,
  .formatter-shell,
  .site-footer {
    width: min(100% - 18px, 1200px);
  }

  .topbar {
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    gap: 12px;
  }

  .hero-main,
  .story-card,
  .panel,
  .site-footer {
    padding: 20px;
  }

  .hero-main {
    padding: 0;
  }

  .hero-main h1 {
    max-width: none;
    font-size: clamp(2.8rem, 12vw, 4.4rem);
  }

  .hero-note {
    margin-top: 0;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(53, 37, 24, 0.14);
  }

  .footer-marquee {
    gap: 12px;
  }
}
