/* ============================================================
 *  imade.in  —  Stylesheet
 *  Aesthetic: warm editorial / paper-like, ink-on-cream,
 *  a single confident terracotta accent.
 * ============================================================ */

:root {
  --cream:   #f6f1e7;
  --paper:   #fffdf8;
  --ink:     #1f1c18;
  --ink-soft:#5b554c;
  --line:    #e3dccb;
  --accent:  #c8552a;   /* terracotta */
  --accent-d:#a8431f;
  --olive:   #5a6347;
  --gold:    #d99b3e;
  --ok:      #2f7d51;
  --err:     #b5402b;
  --radius:  14px;
  --shadow:  0 14px 40px -18px rgba(31,28,24,.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif; font-weight: 500; font-size: .95rem;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: all .18s ease;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn-line  { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { display: flex; justify-content: center; width: 100%; }

/* ---- Header ------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,231,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; }
.logo-dot { color: var(--accent); }
.main-nav { display: flex; gap: 26px; margin-left: 8px; }
.main-nav a { font-size: .95rem; color: var(--ink-soft); transition: color .15s; }
.main-nav a:hover { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---- Flash ------------------------------------------------- */
.flash { padding: 11px 0; font-size: .92rem; font-weight: 500; }
.flash-success { background: #e4f1e8; color: var(--ok); }
.flash-error   { background: #f6e2dd; color: var(--err); }
.flash-info    { background: #f3ecd9; color: var(--olive); }

/* ---- Hero -------------------------------------------------- */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -120px; top: -80px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,155,62,.28), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); margin: 20px 0 30px; max-width: 460px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .88rem; color: var(--ink-soft); }
.hero-note strong { color: var(--ink); }

/* hero card */
.hero-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}
.hero-card .doc-line { height: 9px; border-radius: 6px; background: var(--line); margin: 9px 0; }
.hero-card .doc-line.short { width: 55%; }
.hero-card .doc-line.accent { background: var(--accent); width: 38%; height: 11px; }
.hero-card .doc-head { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.05rem; margin-bottom: 14px; }
.hero-card .doc-stamp {
  margin-top: 20px; display: inline-block; font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ok);
  border: 1.5px dashed var(--ok); padding: 5px 12px; border-radius: 6px;
}

/* ---- Stat strip -------------------------------------------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat { padding: 28px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: 'Fraunces', serif; font-size: 2rem; color: var(--accent); }
.stat .lbl { font-size: .85rem; color: var(--ink-soft); }

/* ---- Section shells ---------------------------------------- */
.section { padding: 76px 0; }
.section-head { max-width: 560px; margin-bottom: 42px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--ink-soft); margin-top: 12px; }

/* ---- Category grid ----------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 22px; }
.cat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: all .2s ease; position: relative;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: #f3ecd9; color: var(--accent); margin-bottom: 16px;
}
.cat-ico .ico { width: 24px; height: 24px; }
.cat-card h3 { font-size: 1.25rem; }
.cat-card p { font-size: .92rem; color: var(--ink-soft); margin: 8px 0 14px; }
.cat-card .cat-count { font-size: .82rem; font-weight: 600; color: var(--accent); }

/* ---- Service grid ------------------------------------------ */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.svc-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; transition: all .2s ease;
}
.svc-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.svc-tag {
  align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--olive); background: #eaecdf;
  padding: 4px 10px; border-radius: 6px; margin-bottom: 12px;
}
.svc-card h3 { font-size: 1.2rem; }
.svc-card p { font-size: .9rem; color: var(--ink-soft); margin: 8px 0 16px; flex: 1; }
.svc-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: 'Fraunces', serif; font-weight: 600; }
.price .free { color: var(--ok); }
.price .amt { color: var(--accent); }

/* ---- How it works ------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step { position: relative; padding-top: 18px; }
.step .step-num {
  font-family: 'Fraunces', serif; font-size: 2.6rem; color: var(--line);
  position: absolute; top: -12px; left: 0;
}
.step h3 { font-size: 1.15rem; margin-bottom: 6px; position: relative; }
.step p { font-size: .92rem; color: var(--ink-soft); position: relative; }

/* ---- Forms ------------------------------------------------- */
.auth-wrap { max-width: 440px; margin: 60px auto; padding: 0 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.card .sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: 'Outfit', sans-serif; font-size: .95rem;
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--cream); color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.switch-line { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--ink-soft); }
.switch-line a { color: var(--accent); font-weight: 500; }

/* ---- Page header band -------------------------------------- */
.page-band { background: var(--paper); border-bottom: 1px solid var(--line); padding: 48px 0; }
.page-band h1 { font-size: clamp(1.9rem,3.5vw,2.7rem); }
.page-band p { color: var(--ink-soft); margin-top: 8px; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 12px; }
.breadcrumb a { color: var(--accent); }

/* ---- Dashboard --------------------------------------------- */
.dash-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 40px 0; }
.dash-side { border-right: 1px solid var(--line); padding-right: 24px; }
.dash-side a {
  display: block; padding: 10px 14px; border-radius: 10px;
  font-size: .92rem; color: var(--ink-soft); margin-bottom: 4px;
}
.dash-side a:hover, .dash-side a.active { background: var(--paper); color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 28px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tile .t-num { font-family: 'Fraunces', serif; font-size: 1.9rem; color: var(--accent); }
.tile .t-lbl { font-size: .85rem; color: var(--ink-soft); }

/* ---- Table ------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: 13px 16px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.table th { background: #f3ecd9; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.badge { font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.badge-draft { background: #f3ecd9; color: var(--olive); }
.badge-paid  { background: #e4f1e8; color: var(--ok); }
.badge-completed { background: #e0e8f0; color: #3a5a7a; }

/* ---- Empty state ------------------------------------------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 8px; }

/* ---- Admin shell ------------------------------------------- */
.admin-body { background: #211f1b; color: #efe9dc; min-height: 100vh; }
.admin-top {
  display: flex; align-items: center; gap: 20px; padding: 14px 24px;
  background: #2a2722; border-bottom: 1px solid #3a352d;
}
.admin-top .logo { color: #efe9dc; }
.admin-top .logo-dot { color: var(--gold); }
.admin-nav { display: flex; gap: 18px; margin-left: 20px; }
.admin-nav a { color: #b3ac9c; font-size: .92rem; }
.admin-nav a:hover, .admin-nav a.active { color: var(--gold); }
.admin-top .admin-out { margin-left: auto; color: #b3ac9c; font-size: .9rem; }
.admin-main { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.admin-card { background: #2a2722; border: 1px solid #3a352d; border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.admin-card h2 { font-size: 1.3rem; margin-bottom: 16px; }
.admin-body .field input, .admin-body .field select, .admin-body .field textarea {
  background: #211f1b; border-color: #3a352d; color: #efe9dc;
}
.admin-body .table { background: #2a2722; border-color: #3a352d; }
.admin-body .table th { background: #322e28; color: #efe9dc; }
.admin-body .table td { border-color: #3a352d; }
.admin-login { max-width: 400px; margin: 90px auto; }

/* ---- Generator form ---------------------------------------- */
.gen-layout { display: grid; grid-template-columns: 1fr 420px; gap: 32px; padding: 40px 0; }
.gen-preview {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; font-size: .9rem; position: sticky; top: 96px; height: fit-content;
  box-shadow: var(--shadow);
}
.gen-preview h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.gen-preview .doc-body { font-family: 'Fraunces', serif; line-height: 1.7; white-space: pre-wrap; }
.gen-preview .doc-body mark { background: #f6e6c8; color: var(--ink); padding: 0 3px; border-radius: 3px; }

/* ---- Footer ------------------------------------------------ */
.site-footer { background: var(--ink); color: #cfc7b6; padding: 56px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo { color: #fff; }
.footer-brand p { font-size: .9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-family: 'Outfit', sans-serif; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: #8c8473; margin-bottom: 12px; }
.footer-col a { display: block; font-size: .9rem; margin-bottom: 7px; color: #cfc7b6; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; font-size: .82rem;
  color: #8c8473; border-top: 1px solid #3a352d; margin-top: 36px; padding-top: 20px;
}

/* ---- Animations -------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: rise .6s ease both; }
.reveal-1 { animation-delay: .08s; }
.reveal-2 { animation-delay: .16s; }
.reveal-3 { animation-delay: .24s; }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stat:nth-child(2) { border-right: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gen-layout { grid-template-columns: 1fr; }
  .gen-preview { position: static; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
  .tiles { grid-template-columns: 1fr; }
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .main-nav,
  body.nav-open .header-actions {
    display: flex; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; background: var(--paper); padding: 16px 24px;
    border-bottom: 1px solid var(--line); gap: 10px;
  }
  .form-row { grid-template-columns: 1fr; }
}
