:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* OmniWhen calculator styles */
.calculators {
  text-align: left;
  max-width: 900px;
  margin: 1.25rem auto;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.calculators h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.field-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.field-row label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.field-row input[type="datetime-local"],
.field-row input[type="number"] {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.12);
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.delta label {
  min-width: 90px;
}

.result {
  margin-top: 0.75rem;
  color: #bbb;
  font-size: 0.95rem;
  text-align: left;
}

.calculators hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin: 1rem 0;
}

/* Parallax hero styles */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
  margin-bottom: 2.5rem;

  /* Primary hero background — use the image directly on the hero as a robust fallback */
  background-image: url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0b1220;
  background-blend-mode: overlay;
}

/* immersive full-bleed hero visuals */
.hero__layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  will-change: transform, opacity;
  transform: translateZ(0);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: transform 0.2s linear;
}
.hero__layer.hero__bg {
  /* large photographic/abstract background for immersive hero (Option B) */
  background-color: #1a1228; /* fallback color while image loads */
  background-image: url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2000&q=80') !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  opacity: 1;
  filter: brightness(0.56) contrast(1.06) saturate(1.05);
}

.hero__layer.hero__mid {
  background-image:
    radial-gradient(circle at 20% 25%, rgba(100,108,255,0.12) 0px, transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(255,183,77,0.08) 0px, transparent 40%);
  opacity: 0.32;
}

/* overlay for depth */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(2,6,23,0.1) 0%, rgba(2,6,23,0.5) 100%);
  z-index: 4;
}

/* hero content refined */
.hero__content {
  position: relative;
  z-index: 6;
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 980px;
}

.hero__content h1 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 14px 40px rgba(2,6,23,0.85);
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0.6rem 0 1.4rem 0;
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}

/* CTA emphasis */
.cta {
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(20,30,60,0.45);
}

/* compact calculator card centered below hero */
.main-content {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: -2rem; /* slightly overlap hero */
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.calc-card {
  width: 100%;
  max-width: 760px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(2,6,23,0.65);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.calc-card .card-header {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  text-align: left;
}
.calc-card .card-sub {
  margin: 0.25rem 0 0 0;
  color: rgba(255,255,255,0.75);
}

.calc-card .card-body {
  padding: 1.2rem 1.6rem 1.6rem 1.6rem;
  text-align: left;
}
.calc-card .card-section h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.1rem;
}

.calc-card .card-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(255,255,255,0.01));
}

/* Overrides: hide any stray Vite / TypeScript logos and force hero to be full-bleed */
.logo,
.vite-logo,
.ts-logo,
img[src*="vite"],
img[src*="typescript"],
img[alt*="Vite"],
img[alt*="TypeScript"] {
  display: none !important;
}

/* Ensure hero renders full-bleed at the top when body centers content */
.hero {
  position: relative;
  left: 0;
  margin-left: 0;
  width: 100%;
  min-height: 70vh;
  padding: 4rem 0;
  box-sizing: border-box;
  /* keep the designed background image from the original styles */
  background-image: url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0b1220;
}

/* Additional overrides — aggressively hide any Vite / TypeScript logo elements or links that may be injected */
body > img,
header > img,
.logo,
.vite-logo,
.ts-logo,
.vite,
.typescript,
.ts {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Hide elements with inline background-images that reference vite or typescript */
div[style*="vite"],
div[style*="typescript"],
*[style*="vite"],
*[style*="typescript"] {
  background-image: none !important;
  display: none !important;
}

/* Hide links that point at vite/typescript resources */
a[href*="vite"],
a[href*="typescript"],
a[href*="ts"] {
  display: none !important;
  pointer-events: none !important;
}

/* Hide fixed-position small branding often injected at top-right */
*[style*="position:fixed"][style*="top:0"][style*="right:0"],
*[style*="position: fixed"][style*="top: 0"][style*="right: 0"] {
  display: none !important;
}

/* Last-resort: hide very small images that look like badges (<=48px) */
img[width="32"],
img[width="24"],
img[height="32"],
img[height="24"],
img[width="48"],
img[height="48"] {
  display: none !important;
}
