/* ===========================================================
   Shivalingeshwar / Open Sesame Studio — Web design system.
   Brand: warm sunset (orange + rose) on cream surfaces.
   =========================================================== */

:root {
  --bg: #fff7ed;
  --bg-deep: #fff3e7;
  --surface: #ffffff;
  --surface-soft: #fffaf4;
  --surface-tint: rgba(255, 255, 255, 0.85);
  --stroke: #fed7aa;
  --stroke-soft: #ffedd5;
  --line: #f3dcc5;

  --text: #0f172a;
  --text-strong: #111827;
  --muted: #6b7280;
  --muted-soft: #94a3b8;

  --orange: #f97316;
  --orange-dark: #c2410c;
  --orange-deep: #ea580c;
  --orange-soft: #ffedd5;
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --red: #ef4444;
  --red-dark: #dc2626;

  --sun: #fbbf24;
  --sun-soft: #fef3c7;

  --green: #16a34a;
  --green-soft: #dcfce7;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;

  --grad-brand: linear-gradient(135deg, #f97316 0%, #f43f5e 100%);
  --grad-brand-soft: linear-gradient(135deg, #fff1e6, #ffe4e6);
  --grad-warm: linear-gradient(180deg, #fff8f1 0%, #fff3e7 50%, #fff8f1 100%);

  --shadow-xs: 0 4px 10px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-brand: 0 16px 30px rgba(249, 115, 22, 0.22);

  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.75rem;
  --radius-2xl: 2rem;

  --duration: 0.22s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--grad-warm);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
code {
  background: #fff1e6;
  padding: 0.15rem 0.4rem;
  border-radius: 0.5rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.86em;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.15), transparent 28%),
    radial-gradient(circle at bottom right, rgba(244, 63, 94, 0.13), transparent 22%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ----------------- Topbar ----------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  backdrop-filter: blur(14px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  border-radius: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) ease, box-shadow var(--duration) ease;
}
.brand-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Image-based brand mark (Shivalingeshwar logo) — sits flat on the page background */
.brand-link--logo {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.brand-link--logo:hover { background: transparent; transform: translateY(-1px); }
.brand-logo-img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}
@media (max-width: 640px) {
  .brand-logo-img { height: 44px; max-width: 200px; }
}

.brand-logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.28);
}
.brand-logo-mark .i { width: 22px; height: 22px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--orange-dark);
  font-weight: 800;
}

.brand-title {
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.top-actions {
  display: flex;
  gap: 0.55rem;
}

/* ----------------- Buttons ----------------- */

.primary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.05rem;
  border-radius: 0.95rem;
  font-weight: 800;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--duration) ease, box-shadow var(--duration) ease, opacity var(--duration) ease, background var(--duration) ease;
  text-decoration: none;
}
.primary-btn:hover, .ghost-btn:hover, .danger-btn:hover { transform: translateY(-1px); }
.primary-btn:active, .ghost-btn:active, .danger-btn:active { transform: translateY(0); }
.primary-btn[disabled], .ghost-btn[disabled], .danger-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.primary-btn {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--shadow-brand);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--orange-dark);
  border: 1px solid var(--stroke);
}
.ghost-btn:hover { background: #fff; box-shadow: var(--shadow-sm); }

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.full-btn { width: 100%; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 0.92rem;
}
.btn-link:hover { color: var(--orange); text-decoration: underline; }

/* ----------------- Pills, chips, badges ----------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: #fff1e6;
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}
.pill-soft { background: #fff7ed; }
.pill-success { background: var(--green-soft); color: #166534; border: 1px solid #bbf7d0; }
.pill-rose { background: #ffe4e6; color: var(--rose-dark); border: 1px solid #fecdd3; }
.pill-sun {
  background: var(--sun-soft);
  color: #92400e;
  border: 1px solid #fde68a;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.chip-orange { background: var(--orange-soft); color: var(--orange-dark); }
.chip-rose { background: #ffe4e6; color: var(--rose-dark); }
.chip-green { background: var(--green-soft); color: #047857; }
.chip-blue { background: var(--blue-soft); color: #1d4ed8; }
.chip-violet { background: var(--violet-soft); color: #5b21b6; }
.chip-slate { background: #f1f5f9; color: #475569; }

.required-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 8px;
  background: #ffe4e6;
  color: var(--rose);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ----------------- Icons ----------------- */

.i {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
}
.i-sm { width: 0.92rem; height: 0.92rem; }
.i-lg { width: 1.35rem; height: 1.35rem; }
.i-xl { width: 1.7rem; height: 1.7rem; }
.i-2xl { width: 2.1rem; height: 2.1rem; }

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  background: var(--grad-brand-soft);
  color: var(--orange-dark);
  border: 1px solid #ffd8bf;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration) ease, box-shadow var(--duration) ease, filter var(--duration) ease;
  flex-shrink: 0;
}
.ui-icon .i { width: 1.05rem; height: 1.05rem; }
.ui-icon--sm { width: 1.55rem; height: 1.55rem; border-radius: 0.5rem; }
.ui-icon--sm .i { width: 0.85rem; height: 0.85rem; }
.ui-icon--lg { width: 2.6rem; height: 2.6rem; border-radius: 0.95rem; }
.ui-icon--lg .i { width: 1.3rem; height: 1.3rem; }
.ui-icon--xl { width: 3rem; height: 3rem; border-radius: 1rem; }
.ui-icon--xl .i { width: 1.45rem; height: 1.45rem; }

.ui-icon--brand { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--shadow-brand); }
.ui-icon--soft { background: #fff7ed; border-color: #ffddb8; color: var(--orange-dark); }
.ui-icon--green { background: var(--green-soft); border-color: #bbf7d0; color: #047857; }
.ui-icon--blue { background: var(--blue-soft); border-color: #bfdbfe; color: #1d4ed8; }
.ui-icon--rose { background: #ffe4e6; border-color: #fecdd3; color: var(--rose-dark); }
.ui-icon--sun { background: var(--sun-soft); border-color: #fde68a; color: #92400e; }
.ui-icon--violet { background: var(--violet-soft); border-color: #ddd6fe; color: var(--violet); }
.ui-icon--slate { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }

.icon-motion:hover .ui-icon,
.icon-motion:focus-visible .ui-icon {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.22);
  filter: saturate(1.05);
}

/* ----------------- Decorative blobs ----------------- */

.bg-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}
.bg-blob.blob-tl { top: -120px; left: -120px; width: 280px; height: 280px; background: rgba(251, 146, 60, 0.18); }
.bg-blob.blob-tr { top: -90px; right: -90px; width: 240px; height: 240px; background: rgba(251, 191, 36, 0.18); }
.bg-blob.blob-bl { left: -90px; bottom: 170px; width: 280px; height: 280px; background: rgba(251, 146, 60, 0.18); }
.bg-blob.blob-br { right: -110px; bottom: 10px; width: 320px; height: 320px; background: rgba(251, 113, 133, 0.16); }

/* ----------------- Cards & surfaces ----------------- */

.card-base,
.hero-card,
.glass-form,
.preview-card,
.tip-card,
.branch-card,
.metric-card,
.empty-card {
  background: var(--surface-tint);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  margin: 1rem 0 2rem;
}
.compact-hero { margin-bottom: 1.5rem; }
.hero-copy h1 {
  margin: 0.6rem 0 0.8rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}
.hero-copy h1 span { color: var(--orange); }
.hero-copy p { color: var(--muted); max-width: 60ch; font-size: 1rem; line-height: 1.7; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}
.metric-card {
  border-radius: 1.5rem;
  padding: 1.2rem;
  text-align: left;
}
.metric-card strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
}
.metric-card span { color: var(--muted); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head.small-gap { margin-bottom: 0.8rem; }
.section-head h2,
.tip-card h3,
.preview-card h3,
.branch-card h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}
.section-head p,
.tip-card p,
.preview-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.branch-card {
  padding: 1.25rem;
  border-radius: var(--radius-xl);
}
.branch-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.branch-address {
  min-height: 3.2rem;
  color: var(--muted);
  margin: 0.8rem 0;
}

.status-badge {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}
.status-default { background: var(--orange-soft); color: #9a3412; }
.status-custom { background: var(--violet-soft); color: #5b21b6; }
.meta-row { color: var(--muted); font-size: 0.92rem; margin-bottom: 1rem; }

.card-actions, .stack-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.stack-actions { flex-direction: column; }

/* ----------------- Forms ----------------- */

.form-shell {
  padding: 1.5rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 1.25rem;
}
.builder-grid, .result-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 1.25rem;
}

.glass-form, .info-panel, .preview-card, .tip-card {
  border-radius: 1.75rem;
  padding: 1.4rem;
}
.info-panel {
  background: linear-gradient(145deg, #fff7ed, #ffffff);
  border: 1px solid var(--stroke);
}
.info-panel h2 { margin: 0.75rem 0; font-size: 2rem; }
.info-panel p { color: var(--muted); line-height: 1.7; }

.field-block { margin-bottom: 1rem; }
.field-block label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: #374151;
}
.help-text { color: var(--muted); display: block; margin-top: 0.35rem; }
.field-error { color: var(--red-dark); margin-top: 0.45rem; font-size: 0.92rem; font-weight: 700; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
textarea,
select {
  font-family: inherit;
}

/* ----------------- Misc ----------------- */

.feature-list, .detail-list {
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
}
.detail-list { padding-left: 0; }
.detail-list div { margin-bottom: 0.9rem; }
.detail-list dt { font-weight: 800; color: var(--text); }
.detail-list dd { margin: 0.3rem 0 0; color: var(--muted); }

.preview-side { display: grid; gap: 1rem; }
.preview-box {
  border: 1px dashed var(--stroke);
  border-radius: 1.25rem;
  padding: 1rem;
  background: var(--surface-soft);
  min-height: 180px;
}
.preview-box img {
  margin-top: 0.8rem;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 1rem;
}
.large-preview { min-height: 280px; }
.tall-card { padding-bottom: 1.75rem; }
.result-image {
  width: 100%;
  border-radius: 1.5rem;
  border: 1px solid var(--stroke);
  background: white;
}
.sticky-card { position: sticky; top: 90px; }
.kn-text { font-family: "Noto Sans Kannada", sans-serif; }

/* ----------------- Flash ----------------- */

.flash-stack { display: grid; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.flash {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
}
.flash-success { background: var(--green-soft); color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info { background: #eff6ff; color: #1d4ed8; }

.empty-card {
  padding: 2rem;
  border-radius: 1.5rem;
  text-align: center;
  color: var(--muted);
}

/* ----------------- Responsive ----------------- */

@media (max-width: 960px) {
  .hero-card,
  .two-col-layout,
  .builder-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
  .sticky-card { position: static; }
}

@media (max-width: 680px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .brand-link { width: 100%; }
  .top-actions { justify-content: stretch; }
  .top-actions a { flex: 1; }
  .hero-card, .form-shell { padding: 1rem; }
}
