/* ==========================================================================
   Unified Prime Equation — Sulphur Yellow on Deep Violet
   Author: Bahbouhi Bouchaib
   File: style.css
   ========================================================================== */

:root{
  /* Palette */
  --violet-900:#1c0033;      /* deepest background */
  --violet-800:#250040;      /* header/footer */
  --violet-700:#2e004f;      /* panels/cards */
  --violet-600:#3a0064;      /* accents, borders */
  --violet-500:#4a0080;      /* hover bg */
  --yellow-500:#ffe600;      /* sulphur yellow (primary text/accent) */
  --yellow-400:#fff066;      /* lighter hover */
  --white-80:rgba(255,255,255,.8);
  --white-60:rgba(255,255,255,.6);
  --black-80:rgba(0,0,0,.8);

  /* Typography */
  --font-serif:"Merriweather", ui-serif, Georgia, serif;
  --font-mono:"Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Sizing */
  --radius-lg:16px;
  --radius-md:12px;
  --radius-sm:8px;
  --shadow-1:0 6px 24px rgba(0,0,0,.35);
  --shadow-2:0 12px 36px rgba(0,0,0,.45);

  /* Layout */
  --container:1120px;
  --gap:24px;
}

/* Base reset-ish */
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  background: radial-gradient(1200px 800px at 20% -10%, #36006b 0%, var(--violet-900) 55%) fixed;
  color:var(--yellow-500);
  font-family:var(--font-serif);
  line-height:1.6;
  letter-spacing:.1px;
  text-rendering:optimizeLegibility;
}

/* Links */
a{
  color:var(--yellow-500);
  text-decoration:none;
  transition:color .18s ease, background-color .18s ease, opacity .18s ease;
}
a:hover{color:var(--yellow-400)}
a:focus-visible{
  outline:2px solid var(--yellow-400);
  outline-offset:3px;
  border-radius:6px;
}

/* Utility */
.mono{font-family:var(--font-mono)}
.muted{color:var(--white-80)}
.small{font-size:.92rem}

/* Header / Nav */
.site-header{
  background: linear-gradient(180deg, var(--violet-800), rgba(37,0,64,.0));
  padding-bottom:16px;
}
.nav{
  max-width:var(--container);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--gap);
  padding:16px clamp(16px, 3vw, 24px);
}
.brand{
  font-weight:700;
  letter-spacing:.8px;
  font-size:1.05rem;
  padding:10px 14px;
  border-radius:var(--radius-sm);
  background:linear-gradient(180deg,var(--violet-700),transparent);
  box-shadow:inset 0 0 0 1px rgba(255,230,0,.2);
}
.nav-links a{
  margin-inline:10px;
  padding:8px 12px;
  border-radius:10px;
  opacity:.95;
}
.nav-links a:hover{
  background:var(--violet-600);
  opacity:1;
}

/* Hero */
.hero{
  max-width:var(--container);
  margin:0 auto;
  padding:24px clamp(16px, 3vw, 24px) 40px;
  text-align:center;
}
.hero h1{
  margin:8px 0 10px;
  font-size:clamp(2rem, 4vw, 3rem);
  line-height:1.15;
  letter-spacing:.6px;
  text-shadow:0 3px 0 rgba(0,0,0,.25);
}
.subtitle{
  max-width:860px;
  margin:0 auto 22px;
  color:var(--white-80);
}
.cta-row{
  display:flex; gap:14px; justify-content:center; flex-wrap:wrap;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px;
  border-radius:14px;
  font-weight:700;
  letter-spacing:.3px;
  box-shadow:var(--shadow-1);
  border:1px solid rgba(255,230,0,.18);
}
.btn-primary{
  background:linear-gradient(180deg, #ffd900, #ffb800);
  color:#22003f;
}
.btn-primary:hover{filter:brightness(1.06)}
.btn-ghost{
  background:transparent;
  color:var(--yellow-500);
  border:1px solid rgba(255,230,0,.35);
}
.btn-ghost:hover{
  background:var(--violet-600);
}

/* Cards section */
.cards{
  max-width:var(--container);
  margin:18px auto;
  padding:0 clamp(16px, 3vw, 24px);
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:var(--gap);
}
.card{
  background:linear-gradient(180deg, rgba(74,0,128,.55), rgba(37,0,64,.55));
  border:1px solid rgba(255,230,0,.18);
  border-radius:var(--radius-lg);
  padding:18px 18px 20px;
  box-shadow:var(--shadow-1);
  backdrop-filter: blur(6px);
}
.card h3{
  margin:6px 0 8px;
  font-size:1.15rem;
}
.card p{color:var(--white-80)}

/* Calculator */
.calc{
  max-width:var(--container);
  margin:22px auto 10px;
  padding:0 clamp(16px, 3vw, 24px) 10px;
}
.calc h2{
  margin:2px 0 6px;
  font-size:clamp(1.5rem, 3vw, 2rem);
}
.calc-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:var(--gap);
  margin-top:14px;
}
.panel{
  background:linear-gradient(180deg, rgba(46,0,79,.8), rgba(28,0,51,.85));
  border:1px solid rgba(255,230,0,.18);
  border-radius:var(--radius-lg);
  padding:18px;
  box-shadow:var(--shadow-2);
}
.panel-title{
  margin:0 0 12px;
  font-size:1.05rem;
  letter-spacing:.3px;
}

.mode-row{
  display:flex; gap:12px; flex-wrap:wrap; margin:4px 0 14px;
}
.mode{
  display:flex; align-items:center; gap:10px;
  background:rgba(255,230,0,.08);
  border:1px solid rgba(255,230,0,.2);
  padding:8px 12px; border-radius:12px;
}
.mode input{accent-color:var(--yellow-500)}

.field{display:flex; flex-direction:column; gap:6px; margin:12px 0}
.label{font-size:.92rem; color:var(--white-80)}
.input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,230,0,.28);
  background:rgba(255,230,0,.07);
  color:var(--yellow-500);
  font-family:var(--font-mono);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.input::placeholder{color:rgba(255,255,200,.5)}
.input:focus{
  border-color:var(--yellow-400);
  box-shadow:0 0 0 3px rgba(255,230,0,.22);
  background:rgba(255,230,0,.1);
}

.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:12px}

.btn-row{display:flex; gap:10px; margin-top:6px}

.results{
  min-height:180px;
  background:linear-gradient(180deg, rgba(255,230,0,.06), rgba(255,230,0,.02));
  border:1px dashed rgba(255,230,0,.28);
  border-radius:12px;
  padding:14px;
}
.placeholder p{margin:8px 0}
.placeholder .small{color:var(--white-80)}

.details{
  margin-top:14px;
  background:rgba(255,230,0,.06);
  border:1px solid rgba(255,230,0,.22);
  border-radius:12px;
  padding:10px 14px;
}
.details > summary{
  cursor:pointer; font-weight:700;
}
.details > summary:hover{color:var(--yellow-400)}
.details ul{margin:8px 0 6px 18px}

/* Callouts */
.callouts{
  max-width:var(--container);
  margin:18px auto 40px;
  padding:0 clamp(16px, 3vw, 24px);
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--gap);
}
.callout{
  background:linear-gradient(180deg, rgba(255,230,0,.08), rgba(255,230,0,.04));
  border:1px solid rgba(255,230,0,.26);
  border-radius:var(--radius-lg);
  padding:16px 18px;
  box-shadow:var(--shadow-1);
}
.callout h3{margin:6px 0 8px}
.callout p{color:var(--white-80)}

/* Footer */
.site-footer{
  margin-top:26px;
  background:var(--violet-800);
  border-top:1px solid rgba(255,230,0,.15);
  padding:18px clamp(16px, 3vw, 24px) 26px;
}
.foot-grid{
  max-width:var(--container);
  margin:0 auto;
  display:flex; align-items:flex-start; justify-content:space-between; gap:var(--gap);
}
.foot.brand{font-weight:800}
.foot-links a{
  display:inline-block;
  margin:4px 10px 0 0;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,230,0,.18);
}
.foot-links a:hover{background:var(--violet-600)}

/* Code blocks (if any markdown is rendered on-page) */
pre, code, kbd, samp{
  font-family:var(--font-mono);
}
pre{
  background:rgba(255,230,0,.06);
  border:1px solid rgba(255,230,0,.2);
  border-radius:14px;
  padding:14px 16px;
  overflow:auto;
  color:var(--yellow-500);
}

/* Responsive */
@media (max-width: 980px){
  .cards{grid-template-columns:1fr; gap:18px}
  .calc-grid{grid-template-columns:1fr}
  .callouts{grid-template-columns:1fr}
}
@media (max-width: 560px){
  .nav{flex-direction:column; align-items:flex-start}
  .cta-row{flex-direction:column}
  .grid-2{grid-template-columns:1fr}
}

/* Fancy focus & selection */
::selection{
  background:var(--yellow-500);
  color:#24003f;
}
:focus-visible{
  scroll-margin-top:90px;
}

/* Optional scrollbar styling (WebKit) */
*::-webkit-scrollbar{height:10px;width:10px}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, #ffd900, #ffb800);
  border-radius:12px;
  border:2px solid var(--violet-700);
}
*::-webkit-scrollbar-track{
  background:rgba(255,230,0,.08);
  border-radius:12px;
}
```0
