/* Crisp2K — Design System
   Palette: light blues, orange highlights, occasional reddish hues, moderate contrast. */
:root {
  --blue-50:  #f0f7ff;
  --blue-100: #dbecff;
  --blue-200: #b9d8ff;
  --blue-400: #5aa6f5;
  --blue-500: #2f86e8;
  --blue-600: #1f6fd0;
  --blue-700: #1857a6;
  --orange:   #ff8a2b;
  --orange-d: #ef6f00;
  --red:      #e2483b;
  --ink:      #16263a;
  --ink-soft: #46586c;
  --line:     #d8e6f5;
  --white:    #ffffff;
  --bg:       #f6fafe;
  --ok:       #1f9d6b;
  --shadow:   0 6px 24px rgba(31,111,208,.12);
  --radius:   14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-50), var(--bg));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--orange-d); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: var(--blue-700); }
.logo span { color: var(--orange); }
.nav { display: flex; gap: 18px; align-items: center; }
.credits-pill {
  background: var(--blue-100); color: var(--blue-700);
  padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: none; cursor: pointer; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 10px; transition: .15s; text-decoration: none;
}
.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); color:#fff; }
.btn-accent { background: var(--orange); color: #fff; }
.btn-accent:hover { background: var(--orange-d); color:#fff; }
.btn-ghost { background: transparent; color: var(--blue-600); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue-400); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- Hero ---- */
.hero { padding: 64px 0 32px; text-align: center; }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 14px; letter-spacing: -1px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--blue-600), var(--orange));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 19px; color: var(--ink-soft); max-width: 620px; margin: 0 auto 26px; }

/* ---- Feature bullets ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 38px 0; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; box-shadow: var(--shadow);
}
.feature .ico { font-size: 30px; margin-bottom: 10px; }
.feature h3 { margin: 6px 0; font-size: 18px; }
.feature p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---- Before/After examples ---- */
.examples { margin: 44px 0; display: flex; flex-direction: column; gap: 30px; }
.example {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.ba-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba-box {
  position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #eef4fb, #eef4fb 12px, #e4eef9 12px, #e4eef9 24px);
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--blue-200);
}
.ba-box img { width: 100%; height: 100%; object-fit: cover; }
.ba-box .ba-label {
  position: absolute; top: 10px; left: 10px;
  background: rgba(22,38,58,.72); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; letter-spacing: .3px;
}
.ba-box.after .ba-label { background: var(--orange); }
.ba-placeholder { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 12px; }

/* ---- Pricing ---- */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 30px 0; }
.tier {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.tier.popular { border: 2px solid var(--orange); position: relative; }
.tier.popular::before {
  content: "POPULAR"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; letter-spacing: .5px;
}
.tier .imgs { font-size: 30px; font-weight: 800; color: var(--blue-700); }
.tier .res { color: var(--ink-soft); font-size: 14px; margin: 4px 0 14px; }
.tier .price { font-size: 26px; font-weight: 800; }
.tier .price small { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.tier .sub { font-size: 13px; color: var(--ink-soft); margin: 4px 0 18px; }
.tier .btn { margin-top: auto; }

/* ---- Sections ---- */
.section { padding: 30px 0; }
.section h2 { font-size: 30px; text-align: center; margin: 0 0 6px; letter-spacing: -.5px; }
.section .lead { text-align: center; color: var(--ink-soft); margin: 0 auto 24px; max-width: 560px; }

/* ---- Cards / forms ---- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); max-width: 440px; margin: 40px auto;
}
.card h2 { margin-top: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input[type=email], .field input[type=password], .field input[type=text] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: var(--font);
}
.field input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-100); }
.divider { text-align: center; color: var(--ink-soft); margin: 18px 0; position: relative; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--line);
}
.divider::before { left: 0; } .divider::after { right: 0; }

.notice {
  background: var(--blue-50); border: 1px solid var(--blue-200); border-radius: 10px;
  padding: 12px 14px; font-size: 13.5px; color: var(--blue-700); margin: 14px 0;
}
.notice.privacy { background: #fff6ef; border-color: #ffd9b3; color: var(--orange-d); font-weight: 600; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.alert.err { background: #fdeceb; color: var(--red); border: 1px solid #f6c4bf; }
.alert.ok  { background: #e9f8f1; color: var(--ok);  border: 1px solid #bfe8d4; }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-weight: 600; color: var(--ink); cursor: pointer;
}
.google-btn:hover { border-color: var(--blue-400); }
.google-btn svg { width: 18px; height: 18px; }

/* ---- Upload / app ---- */
.dropzone {
  border: 2px dashed var(--blue-200); border-radius: var(--radius); background: #fff;
  padding: 40px 20px; text-align: center; cursor: pointer; transition: .15s;
}
.dropzone.drag { border-color: var(--orange); background: #fff6ef; }
.dropzone .ico { font-size: 40px; color: var(--blue-400); }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.preview-box { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.preview-box h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.preview-box img { width: 100%; border-radius: 8px; display: block; }
.opt-row { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 14px; }
.dl-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-weight: 600; color: var(--blue-600);
}
.dl-link svg { width: 18px; height: 18px; }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.gallery-item { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.gallery-item img { width:100%; border-radius: 8px; display:block; }
.gallery-item .row { display:flex; justify-content: space-between; align-items:center; margin-top: 8px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(22,38,58,.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 720px; width: 100%;
  padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin-top: 0; }
.modal .close { float: right; cursor: pointer; font-size: 22px; color: var(--ink-soft); border: none; background: none; }

.spinner {
  width: 22px; height: 22px; border: 3px solid var(--blue-200); border-top-color: var(--blue-500);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 50px; color: var(--ink-soft); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .features, .pricing { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 560px) {
  .features, .pricing, .gallery-grid, .ba-row, .preview-grid { grid-template-columns: 1fr; }
}
