/* ==========================================================
   FILE: style.css
   NVO987 AI – Prompt Library (India)
   Luxury UI / consistent typography / mobile-first responsive
   + DID footer support (identity.nvo987.us)
   + MOBILE SAFE AREA FIX (logo not cut on left)
   + INDIA EDITION OVERLAY (india.png watermark + saffron/green accents)
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap");

/* ==========================================================
   ROOT VARIABLES
   ========================================================== */
:root {
  --bg: #f6f1e9;
  --bg2: #efe7dd;

  --text: #161616;
  --muted: rgba(22, 22, 22, 0.65);

  --card: rgba(255, 255, 255, 0.86);
  --card2: rgba(255, 255, 255, 0.94);

  --navy: #0c1e3b;
  --burgundy: #7a1f2b;

  --gold: #d4af37;
  --gold2: #f3e2a3;

  --radius: 18px;
  --radius2: 22px;

  --shadowSoft: 0 10px 28px rgba(0, 0, 0, 0.08);
  --shadowStrong: 0 20px 60px rgba(0, 0, 0, 0.18);

  --fontBody: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fontTitle: "Playfair Display", Georgia, "Times New Roman", serif;

  /* INDIA EDITION COLORS (SUBTLE) */
  --india-saffron: #ff9933;
  --india-green: #138808;
  --india-navy: #000080;
}

/* ==========================================================
   RESET + BASE
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--fontBody);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;

  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.12), transparent 45%),
    radial-gradient(circle at bottom right, rgba(122,31,43,0.12), transparent 50%),
    linear-gradient(180deg, var(--bg), var(--bg2));

  position: relative;
  overflow-x: hidden;
}

/* INDIA EDITION WATERMARK (SAFE, DOES NOT BREAK CONTENT) */
body::before {
  content: "";
  position: fixed;
  top: -160px;
  right: -220px;
  width: 900px;
  height: 900px;

  background-image: url("/india.png");
  background-repeat: no-repeat;
  background-size: contain;

  opacity: 0.05;
  pointer-events: none;
  z-index: -1;

  filter: grayscale(100%);
}

body::after {
  content: "";
  position: fixed;
  bottom: -260px;
  left: -260px;
  width: 900px;
  height: 900px;

  background-image: url("/india.png");
  background-repeat: no-repeat;
  background-size: contain;

  opacity: 0.03;
  pointer-events: none;
  z-index: -1;

  filter: grayscale(100%);
  transform: rotate(180deg);
}

/* Global typography consistency */
p, li, span, label {
  font-family: var(--fontBody);
  font-weight: 600;
  color: rgba(22,22,22,0.88);
}

h1, h2, h3 {
  font-family: var(--fontTitle);
  font-weight: 900;
  color: var(--navy);
}

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

/* ==========================================================
   CONTAINER
   ========================================================== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================
   TOPBAR (FIXED MOBILE NAV + SAFE AREA FIX)
   ========================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 2500;

  background: rgba(246, 241, 233, 0.92);
  backdrop-filter: blur(14px);

  border-bottom: 2px solid rgba(255, 153, 51, 0.22);
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);

  /* SAFE AREA FIX (prevents logo cut on left/right on mobile) */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;

  /* extra inner padding for mobile browsers */
  padding-left: 10px;
  padding-right: 10px;
}

/* Brand */
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--fontTitle);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--burgundy);
}

.brand-tag {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(12,30,59,0.65);
  letter-spacing: 0.02em;
}

/* Nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  color: var(--navy);

  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.08);

  transition: 0.22s ease;
  white-space: nowrap;
}

.nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 153, 51, 0.14);
  border-color: rgba(255, 153, 51, 0.55);
  color: var(--burgundy);
  box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}

/* ==========================================================
   HERO (MOBILE FIXED HEIGHT + BETTER TEXT)
   ========================================================== */
.hero {
  margin: 20px auto;
  border-radius: var(--radius2);
  overflow: hidden;

  background-image: url("banner.jpg");
  background-size: cover;
  background-position: center;

  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: var(--shadowStrong);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(212,175,55,0.65);
  border-radius: var(--radius2);
  pointer-events: none;
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;

  text-align: center;
  width: 92%;
  max-width: 820px;

  padding: 22px 18px;

  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.30);

  border-radius: 18px;
  backdrop-filter: blur(14px);

  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
}

.hero-text h1 {
  font-family: var(--fontTitle);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.15;

  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,0.65);

  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 4px solid rgba(255, 153, 51, 0.28);
}

.hero-sub {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.hero-note {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.90);
}

/* ==========================================================
   MAIN LAYOUT
   ========================================================== */
.main {
  padding: 20px 0 70px 0;
}

.section {
  margin-bottom: 50px;
}

/* ==========================================================
   SECTION HEADER
   ========================================================== */
.section-header {
  margin-bottom: 18px;
  padding: 18px 18px;

  border-radius: 18px;
  background: rgba(255,255,255,0.40);
  border: 1px solid rgba(212,175,55,0.20);

  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  position: relative;
}

.section-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 153, 51, 0.95),
    rgba(19, 136, 8, 0.65)
  );
}

.section-header h2 {
  font-size: 32px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-header p {
  margin-top: 10px;
  color: rgba(12,30,59,0.65);
  font-size: 14px;
  font-weight: 600;
  max-width: 860px;
}

/* ==========================================================
   CONTROLS
   ========================================================== */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.controls input,
.controls select {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.10);

  border-radius: 14px;
  padding: 12px 14px;

  font-size: 14px;
  font-weight: 700;

  outline: none;
  transition: 0.22s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.controls input {
  flex: 1;
  min-width: 200px;
}

.controls select {
  min-width: 160px;
}

.controls input:focus,
.controls select:focus {
  border-color: rgba(255, 153, 51, 0.70);
  box-shadow: 0 0 0 4px rgba(255, 153, 51, 0.18);
}

/* ==========================================================
   GRID (MOBILE-FIRST)
   ========================================================== */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ==========================================================
   CARDS
   ========================================================== */
.place-card {
  position: relative;
  overflow: hidden;

  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(0,0,0,0.08);

  border-radius: 20px;
  padding: 18px;

  box-shadow: var(--shadowSoft);

  display: flex;
  flex-direction: column;
  gap: 12px;

  min-height: 220px;
  transition: 0.22s ease;
}

.place-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(0,0,0,0.14);
  border-color: rgba(255, 153, 51, 0.40);
}

.place-type {
  display: inline-block;
  width: fit-content;

  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--navy);

  padding: 6px 12px;
  border-radius: 999px;

  background: rgba(255, 153, 51, 0.14);
  border: 1px solid rgba(255, 153, 51, 0.28);
}

.place-card h3 {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--navy);
}

.place-desc {
  font-size: 14px;
  font-weight: 600;
  color: rgba(22,22,22,0.88);
  flex: 1;
}

/* Buttons inside card */
.place-actions {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================
   PROMPT TAGS
   ========================================================== */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.10);

  color: rgba(12,30,59,0.75);
}

.pill.highlight {
  background: rgba(255, 153, 51, 0.18);
  border: 1px solid rgba(255, 153, 51, 0.32);
  color: var(--burgundy);
}

/* ==========================================================
   PROMPT BOX
   ========================================================== */
.prompt-box {
  width: 100%;
  min-height: 260px;
  padding: 16px;

  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.92);

  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: rgba(12,30,59,0.95);

  outline: none;
  resize: vertical;
}

/* ==========================================================
   BUTTON ROW
   ========================================================== */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  text-align: center;

  font-weight: 900;
  font-size: 13px;

  padding: 12px 16px;
  border-radius: 14px;

  color: var(--navy);
  background: linear-gradient(180deg, rgba(243,226,163,0.95), rgba(212,175,55,0.95));
  border: 1px solid rgba(0,0,0,0.15);

  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition: 0.22s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(19, 136, 8, 0.85), rgba(255, 153, 51, 0.92));
  color: #fff;
  border-color: rgba(19, 136, 8, 0.45);
}

.btn.secondary {
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(0,0,0,0.14);
  color: var(--navy);
}

.btn.secondary:hover {
  background: rgba(255, 153, 51, 0.12);
  border-color: rgba(255, 153, 51, 0.35);
  color: var(--burgundy);
}

/* ==========================================================
   STATUS BOX
   ========================================================== */
.status {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;

  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(212,175,55,0.25);

  box-shadow: 0 12px 28px rgba(0,0,0,0.06);

  font-weight: 900;
  font-size: 14px;
  color: var(--navy);
}

.status.info { opacity: 0.95; }
.status.warn { border-color: rgba(220, 160, 50, 0.40); }
.status.error { border-color: rgba(200, 60, 60, 0.40); }
.status.success { border-color: rgba(60, 160, 90, 0.35); }

/* ==========================================================
   LEGAL + SOURCES CARDS
   ========================================================== */
.legal-card,
.sources-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  border: 1px solid rgba(0,0,0,0.08);

  border-radius: 22px;
  padding: 24px;

  box-shadow: var(--shadowSoft);
  overflow: hidden;
}

.legal-card h3,
.sources-card h3 {
  font-family: var(--fontTitle);
  font-size: 19px;
  font-weight: 900;

  margin-top: 22px;
  margin-bottom: 10px;
  color: var(--navy);
}

.legal-card h3:first-child,
.sources-card h3:first-child {
  margin-top: 0;
}

.legal-card p,
.sources-card p {
  font-size: 14px;
  font-weight: 600;
  color: rgba(22,22,22,0.90);
  margin-bottom: 12px;
}

.legal-card ul,
.sources-card ul {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.legal-card li,
.sources-card li {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(22,22,22,0.90);
}

/* ==========================================================
   LINKS
   ========================================================== */
a {
  text-decoration: none;
  font-weight: 900;
  color: var(--burgundy);
}

a:hover {
  color: var(--navy);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  margin-top: 45px;
  padding: 36px 0;

  background: rgba(246,241,233,0.80);
  border-top: 2px solid rgba(19, 136, 8, 0.18);
}

.footer-inner {
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  color: rgba(22,22,22,0.85);
  line-height: 1.85;
}

/* --- DID / Identity footer block (SAFE, DOES NOT BREAK DESIGN) --- */
.footer-identity {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.footer-identity a {
  font-weight: 900;
  color: var(--navy);
  text-decoration: none;
}

.footer-identity a:hover {
  color: var(--burgundy);
}

.did-pill {
  display: inline-block;
  max-width: 100%;

  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.10);

  font-size: 12px;
  font-weight: 900;
  color: rgba(12,30,59,0.90);

  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

/* ==========================================================
   HELPERS
   ========================================================== */
.muted {
  color: rgba(12,30,59,0.65);
}

.small-note {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 750;
  color: rgba(12,30,59,0.60);
}

/* ==========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================== */
@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-text h1 {
    font-size: 48px;
  }

  .section-header h2 {
    font-size: 36px;
  }

  .footer-identity {
    flex-direction: row;
  }

  .did-pill {
    font-size: 12px;
  }
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-text h1 {
    font-size: 56px;
  }
}

/* ==========================================================
   MOBILE NAV FIX (MOST IMPORTANT)
   ========================================================== */
@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;

    /* extra safety padding for logo cut issue */
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    padding-left: 2px;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav a {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 10px 12px;
  }

  .hero {
    min-height: 250px;
    margin: 16px auto;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 12px;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .did-pill {
    width: 100%;
    max-width: 460px;
  }
}
