/* ═══════════════════════════════════════════════════════
   RASOI AI — Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: 'Nunito Sans', sans-serif;
  background: #FDF8F2;
  color: #1C0800;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main   { flex: 1; }
a      { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img    { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::placeholder { color: #C0A880; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --saffron:    #E07B1A;
  --saffron-dk: #C06010;
  --dark:       #1C0800;
  --cream:      #FDF8F2;
  --parchment:  #FFF8F0;
  --border:     #F0E0C8;
  --muted:      #8B5030;
  --light:      #B08060;
}

/* ── Utility ────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin   { to   { transform:rotate(360deg); } }

/* ══════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--dark);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 2px solid var(--saffron);
}
.header-inner { display:flex; align-items:center; height:64px; }
.logo         { display:flex; align-items:center; gap:10px; }
.logo-icon    {
  width:36px; height:36px; border-radius:50%;
  background:var(--saffron);
  display:flex; align-items:center; justify-content:center;
  font-size:18px; flex-shrink:0;
}
.logo-name { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:700; color:#FDF8F2; letter-spacing:.06em; }
.logo-sub  { font-size:9px; color:var(--saffron); letter-spacing:.18em; text-transform:uppercase; }
.nav       { margin-left:auto; display:flex; gap:8px; }
.nav-link  {
  color:#D0A080; padding:8px 18px; border-radius:8px;
  font-size:14px; font-weight:600; border:1px solid #4A2010;
  transition:background .2s, color .2s, border-color .2s;
}
.nav-link:hover, .nav-link.active { background:var(--saffron); color:#fff; border-color:transparent; }
.nav-link--generate { border-color:var(--saffron); color:var(--saffron); }

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.hero {
  background:linear-gradient(135deg,#1C0800 0%,#3A1400 45%,#5A2008 100%);
  padding:84px 24px 64px; text-align:center;
  position:relative; overflow:hidden;
}
.hero__content { position:relative; z-index:1; max-width:680px; margin:0 auto; }
.hero__badge   {
  display:inline-block; font-size:11px; font-weight:700; letter-spacing:.22em;
  color:var(--saffron); text-transform:uppercase;
  background:rgba(224,123,26,.10); padding:6px 20px; border-radius:20px;
  margin-bottom:26px; border:1px solid rgba(224,123,26,.22);
}
.hero__title {
  font-family:'Cormorant Garamond',serif;
  font-size:clamp(40px,8vw,64px); font-weight:700; line-height:1.1;
  color:#FDF8F2; margin-bottom:16px;
}
.hero__title em { color:var(--saffron); font-style:italic; }
.hero__sub  {
  font-size:18px; color:#C0A090; max-width:500px;
  margin:0 auto 36px; line-height:1.8; font-weight:300;
}
.hero__stats  { display:flex; justify-content:center; gap:52px; margin-top:52px; border-top:1px solid rgba(255,255,255,.07); padding-top:32px; }
.stat__num    { font-family:'Cormorant Garamond',serif; font-size:34px; font-weight:700; color:var(--saffron); }
.stat__label  { font-size:11px; color:#7B5040; text-transform:uppercase; letter-spacing:.12em; margin-top:4px; }

.mandala       { position:absolute; border-radius:50%; border:1px solid var(--saffron); opacity:.055; pointer-events:none; }
.mandala--right { width:320px; height:320px; right:-80px; top:-80px; }
.mandala--left  { width:240px; height:240px; left:-60px;  bottom:-60px; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; border:none; border-radius:50px; font-weight:700;
  transition:transform .2s, box-shadow .2s, background .2s; white-space:nowrap;
}
.btn--primary  { background:var(--saffron); color:#fff; padding:16px 48px; font-size:17px; box-shadow:0 8px 32px rgba(224,123,26,.42); }
.btn--primary:hover  { transform:translateY(-2px); box-shadow:0 12px 36px rgba(224,123,26,.52); }
.btn--secondary { background:transparent; color:var(--muted); border:1px solid var(--border); padding:14px 28px; font-size:15px; border-radius:50px; }
.btn--secondary:hover { background:var(--parchment); }
.btn--submit    { width:100%; background:var(--saffron); color:#fff; padding:17px; border-radius:12px; font-size:16px; }
.btn--submit:hover    { background:var(--saffron-dk); }
.btn--submit:disabled { background:#B07830; cursor:not-allowed; }

/* ══════════════════════════════════════════════════════════
   BADGES & DOTS
   ══════════════════════════════════════════════════════════ */
.badges { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.badge  { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; letter-spacing:.05em; }
.badge--region      { background:#FFF3E0; color:#B85010; }
.badge--region-dark { background:rgba(224,123,26,.18); color:#E8A060; border:1px solid rgba(224,123,26,.28); }
.badge--diet-vegetarian { background:#f0fdf4; color:#166534; }
.badge--diet-vegan      { background:#ecfdf5; color:#065f46; }
.badge--diet-nonveg     { background:#fef2f2; color:#991b1b; }
.badge--diet-jain       { background:#fffbeb; color:#92400e; }
.badge--diet-dark       { background:rgba(0,0,0,.28); color:#E0C090; }
.dot { width:6px; height:6px; border-radius:50%; display:inline-block; flex-shrink:0; }
.badge--diet-vegetarian .dot { background:#22c55e; }
.badge--diet-vegan      .dot { background:#10b981; }
.badge--diet-nonveg     .dot { background:#ef4444; }
.badge--diet-jain       .dot { background:#f59e0b; }
.badge--diet-dark       .dot { background:currentColor; }
.spice { display:inline-flex; align-items:center; gap:4px; margin-left:auto; }
.spice--mild     .dot { background:#22c55e; }
.spice--medium   .dot { background:#f97316; }
.spice--hot      .dot { background:#ef4444; }
.spice--very-hot .dot { background:#991b1b; }

/* ══════════════════════════════════════════════════════════
   RECIPE GRID
   ══════════════════════════════════════════════════════════ */
.grid-section { padding:60px 0 80px; }
.grid-section__header { display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:36px; }
.section-title { font-family:'Cormorant Garamond',serif; font-size:42px; font-weight:600; color:var(--dark); }
.section-sub   { color:var(--muted); font-size:15px; margin-top:6px; }
.recipe-grid   { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }

.recipe-card         { display:block; background:#fff; border-radius:16px; overflow:hidden; border:1px solid var(--border); transition:transform .22s, box-shadow .22s; animation:fadeUp .4s ease both; }
.recipe-card:hover   { transform:translateY(-5px); box-shadow:0 14px 32px rgba(140,50,0,.13); }
.recipe-card__accent { height:4px; background:linear-gradient(90deg,var(--saffron),#C05010); }
.recipe-card__body   { padding:20px 20px 15px; }
.recipe-card__title  { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:600; color:var(--dark); margin-bottom:8px; line-height:1.2; }
.recipe-card__desc   { font-size:13px; color:#6B4030; line-height:1.6; margin-bottom:14px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.recipe-card__meta   { display:flex; align-items:center; gap:14px; font-size:12px; color:#8B5E40; border-top:1px solid #F5E8D8; padding-top:11px; }

.recipe-card--empty  { background:var(--parchment); border:2px dashed #E0C8A8; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:200px; text-align:center; padding:24px; }
.recipe-card--empty:hover { border-color:var(--saffron); background:#FFF3E0; }
.empty__icon  { font-size:26px; color:#C0A070; margin-bottom:8px; display:block; }
.empty__title { font-family:'Cormorant Garamond',serif; font-size:16px; font-weight:600; color:#8B5030; }
.empty__sub   { font-size:12px; color:var(--light); margin-top:4px; }

/* ══════════════════════════════════════════════════════════
   GENERATE PAGE
   ══════════════════════════════════════════════════════════ */
.generate-page         { max-width:660px; margin:0 auto; padding:48px 24px 80px; }
.generate-page__header { text-align:center; margin-bottom:44px; }
.generate-page__header h1 { font-family:'Cormorant Garamond',serif; font-size:48px; font-weight:700; color:var(--dark); }
.generate-page__header p  { color:var(--muted); font-size:16px; margin-top:8px; }
.form-card { background:#fff; border:1px solid var(--border); border-radius:20px; padding:36px; }

.field       { margin-bottom:22px; }
.field label { display:block; font-size:11px; font-weight:700; color:#5A2800; margin-bottom:7px; letter-spacing:.1em; text-transform:uppercase; }
.optional    { color:#B09070; font-weight:400; text-transform:none; letter-spacing:0; }
.field input, .field select {
  width:100%; padding:12px 16px; border:1px solid #E0C8A8; border-radius:10px;
  font-size:15px; color:var(--dark); font-family:'Nunito Sans',sans-serif;
  background:#FFFAF5; outline:none; appearance:none; transition:border-color .2s;
}
.field input:focus, .field select:focus { border-color:var(--saffron); }
.field select { cursor:pointer; }
.field-hint  { font-size:12px; color:#B07850; margin-top:6px; }
.field-row   { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; margin-bottom:32px; }
.field-row .field { margin-bottom:0; }

.generating-msg { text-align:center; font-size:13px; color:#8B6040; margin-top:12px; }
.spinner        { display:inline-block; width:18px; height:18px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }

.error-banner { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; border-radius:10px; padding:12px 16px; font-size:14px; margin-bottom:20px; line-height:1.6; }
.back-link    { display:inline-flex; align-items:center; gap:6px; font-size:14px; color:var(--muted); margin-bottom:28px; transition:color .2s; }
.back-link:hover { color:var(--saffron); }

/* ══════════════════════════════════════════════════════════
   RECIPE DETAIL
   ══════════════════════════════════════════════════════════ */
.recipe-page    { max-width:940px; margin:0 auto; padding:40px 24px 80px; animation:fadeUp .4s ease; }
.recipe-hero    { background:linear-gradient(135deg,#1C0800,#3A1400); border-radius:20px; padding:44px 44px 36px; margin-bottom:36px; position:relative; overflow:hidden; }
.recipe-hero__content { position:relative; z-index:1; }
.recipe-hero__title { font-family:'Cormorant Garamond',serif; font-size:clamp(30px,5vw,52px); font-weight:700; color:#FDF8F2; line-height:1.1; margin:14px 0; }
.recipe-hero__desc  { color:#C0A080; font-size:17px; line-height:1.7; max-width:560px; }
.recipe-meta-strip  { display:flex; flex-wrap:wrap; gap:28px; margin-top:28px; border-top:1px solid rgba(255,255,255,.07); padding-top:24px; }
.meta-item__label   { font-size:11px; color:#7B5040; text-transform:uppercase; letter-spacing:.1em; margin-bottom:4px; }
.meta-item__val     { font-size:16px; font-weight:600; color:#FDF8F2; }

.recipe-layout      { display:grid; grid-template-columns:260px 1fr; gap:28px; }
.ingredients-sidebar { background:var(--parchment); border:1px solid var(--border); border-radius:16px; padding:24px; align-self:start; position:sticky; top:80px; }
.ingredients-sidebar h2 { font-family:'Cormorant Garamond',serif; font-size:26px; font-weight:600; color:var(--dark); margin-bottom:18px; }
.ingredients-list li { display:flex; gap:10px; padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid var(--border); font-size:14px; }
.ingredients-list li:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.ing__amount { font-weight:700; color:var(--saffron); min-width:58px; font-size:12px; padding-top:1px; flex-shrink:0; }
.ing__name   { color:#3A1800; line-height:1.5; }

.recipe-steps h2 { font-family:'Cormorant Garamond',serif; font-size:32px; font-weight:600; color:var(--dark); margin-bottom:24px; }
.steps-list      { display:flex; flex-direction:column; gap:14px; }
.step            { display:flex; gap:18px; background:#fff; border:1px solid var(--border); border-radius:14px; padding:18px 22px; }
.step__num       { width:34px; height:34px; min-width:34px; border-radius:50%; background:var(--saffron); display:flex; align-items:center; justify-content:center; font-family:'Cormorant Garamond',serif; font-size:18px; font-weight:700; color:#fff; flex-shrink:0; }
.step__text      { font-size:15px; line-height:1.8; color:#3A1800; padding-top:5px; }

.chef-tip    { margin-top:28px; background:#FFFBF0; border:1px solid #F0C860; border-radius:14px; padding:22px; }
.chef-tip h3 { font-family:'Cormorant Garamond',serif; font-size:22px; font-weight:600; color:#7B4500; margin-bottom:10px; }
.chef-tip p  { font-size:15px; color:#5A3000; line-height:1.7; }

.recipe-actions { display:flex; gap:12px; margin-top:32px; flex-wrap:wrap; }

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.site-footer  { background:var(--dark); padding:36px 24px; text-align:center; border-top:2px solid var(--saffron); }
.footer-brand { font-family:'Cormorant Garamond',serif; font-size:22px; color:#FDF8F2; margin-bottom:6px; }
.site-footer p { font-size:13px; color:#6B4030; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width:900px) {
  .recipe-grid         { grid-template-columns:repeat(2,1fr); }
  .recipe-layout       { grid-template-columns:1fr; }
  .ingredients-sidebar { position:static; }
  .field-row           { grid-template-columns:1fr 1fr; }
}
@media (max-width:600px) {
  .recipe-grid  { grid-template-columns:1fr; }
  .hero__stats  { gap:24px; }
  .field-row    { grid-template-columns:1fr; }
  .recipe-hero  { padding:28px 20px; }
  .hero         { padding:60px 20px 48px; }
  .generate-page__header h1 { font-size:36px; }
}
