/* ============================================================
   rosanafixes.it — 90s JP game, kept minimal
   Dot-matrix headings, hard-edged panels, offset shadows.
   Body copy stays in a normal sans so it's actually readable.
   ============================================================ */

:root {
  /* 奶油底色和头像 GIF 的背景完全一致，所以人物能无缝融进页面 */
  --bg:        #fcf4eb;
  --bg-alt:    #f4e8da;
  --bg-dark:   #2a2328;
  --panel:     #fffaf3;

  --ink:       #2a2328;
  --ink-2:     #5a4d53;
  --ink-3:     #8b7d83;
  --line:      #2a2328;
  --line-soft: #ded0c2;

  --accent:       #e2662f;
  --accent-hover: #c8541f;
  --accent-soft:  #fbe2d2;
  --pink:         #e3899f;
  --pink-soft:    #fbe4ea;

  --on-dark:   #f6ece0;
  --on-dark-2: #b7a69b;

  --dot:  "DotGothic16", "Hiragino Maru Gothic ProN", "Courier New", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1080px;
  --gutter: 20px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

/* 像素图保持硬边，放大也不糊 */
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

h1, h2, h3 {
  font-family: var(--dot);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.section-dark { background: var(--bg-dark); color: var(--on-dark); border-top: 2px solid var(--line); }
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-dark .eyebrow { color: var(--pink); }
.section-dark a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--on-dark-2); }
.section-dark a:hover { text-decoration-color: var(--accent); }

.eyebrow {
  font-family: var(--dot);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-intro { max-width: 640px; color: var(--ink-2); font-size: 1.05rem; margin-bottom: 36px; }
.section-note { max-width: 640px; color: var(--ink-3); font-size: 0.92rem; margin-top: 26px; }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--ink-2); max-width: 620px; }

/* ---------- Buttons: retro panel buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--dot);
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.04em;
  border: 2px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .08s steps(2), box-shadow .08s steps(2), background .12s;
}
.btn:hover { text-decoration: none; background: var(--accent-soft); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--panel); }
.section-dark .btn-ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark); box-shadow: 4px 4px 0 var(--on-dark-2); }
.section-dark .btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-small { padding: 9px 15px; font-size: 0.82rem; box-shadow: var(--shadow-sm); }
.btn-small:active { transform: translate(3px, 3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 66px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--accent);
  font-family: var(--dot);
  font-size: 1.1rem;
  display: grid; place-items: center;
}
.brand-name { font-family: var(--dot); font-size: 1.02rem; letter-spacing: 0.02em; }
.brand-name em { font-style: normal; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-family: var(--dot);
  color: var(--ink-2);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  position: relative;
}
/* 选择光标：像素游戏菜单那个 ▶ */
.site-nav a:not(.btn)::before {
  content: "\25B6";
  position: absolute; left: -13px;
  color: var(--accent);
  opacity: 0;
  font-size: 0.7em;
  top: 50%; transform: translateY(-45%);
}
.site-nav a:not(.btn):hover::before,
.site-nav a[aria-current]:not(.btn)::before { opacity: 1; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.btn { color: var(--ink); }
.site-nav a.btn-small { background: var(--ink); color: var(--bg); }
.site-nav a.btn-small:hover { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  border: 2px solid var(--ink); background: var(--panel); cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 3px; background: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 84px) 0 clamp(44px, 6vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  grid-template-areas: "head sprite" "body sprite";
  column-gap: 44px;
  align-items: start;
}
.hero-head { grid-area: head; }
.hero-body { grid-area: body; }
.hero-sprite { grid-area: sprite; align-self: center; justify-self: center; }
.hero-sprite img { width: 290px; }
.hero h1 { max-width: 20ch; }
.hero .lede { margin: 18px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-points {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-top: 34px;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.hero-points li { position: relative; padding-left: 18px; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.58em;
  width: 8px; height: 8px; background: var(--accent);
}

/* ---------- Dialogue box (JRPG 对话框) ---------- */
.dialogue {
  position: relative;
  background: var(--bg-dark);
  color: var(--on-dark);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 20px 24px 22px;
  margin: 0 0 28px;
  max-width: 620px;
}
.dialogue::before {
  content: "";
  position: absolute; inset: 4px;
  border: 1px solid rgba(246,236,224,.3);
  pointer-events: none;
}
.dialogue p { margin: 0; font-size: 1rem; line-height: 1.7; color: var(--on-dark); }
.dialogue p + p { margin-top: .8em; }
.dialogue-name {
  font-family: var(--dot);
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--pink);
  margin-bottom: 8px;
  text-transform: uppercase;
}
/* 闪烁的 ▼，像等你按下一句 */
.dialogue::after {
  content: "\25BC";
  position: absolute; right: 14px; bottom: 8px;
  color: var(--accent);
  font-size: .7rem;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1 } 50.01%,100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .dialogue::after { animation: none; }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 22px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  display: flex; flex-direction: column;
}
.card-icon {
  width: 42px; height: 42px;
  border: 2px solid var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 6px; }
.card-tag { font-family: var(--dot); font-size: .92rem; color: var(--accent); margin-bottom: 12px; }
.card-tag em { font-style: normal; }
.card > p { color: var(--ink-2); font-size: .95rem; }
.card ul { list-style: none; margin: 6px 0 16px; }
.card li { position: relative; padding-left: 19px; margin-bottom: 8px; font-size: .92rem; color: var(--ink-2); }
.card li::before { content: "\25B8"; position: absolute; left: 0; color: var(--accent); }
.card .tools {
  margin-top: auto; padding-top: 14px;
  border-top: 2px dotted var(--line-soft);
  font-size: .85rem; color: var(--ink-3);
}

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 36px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border: 2px solid var(--ink);
  background: var(--accent); color: #fff;
  font-family: var(--dot); font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-2); font-size: .93rem; }

/* ---------- Case studies ---------- */
.cases { display: grid; gap: 26px; }
.case {
  display: grid; grid-template-columns: 5fr 7fr;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}
.case-media { background: var(--bg-alt); display: grid; place-items: center; padding: 30px; border-right: 2px solid var(--line); }
.case-illo { width: 100%; max-width: 360px; }
.illo-track { fill: #e0d2c2; stroke: var(--ink); stroke-width: 1.5; }
.illo-hit { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.illo-clip { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.illo-arrow { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.illo-label { font-family: var(--dot); font-size: 11px; fill: var(--ink-2); }
.case-body { padding: 28px 30px; }
.case-kicker { font-family: var(--dot); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.case h3 { font-size: 1.3rem; max-width: 26ch; }
.case-facts { margin: 20px 0 0; display: grid; gap: 15px; }
.case-facts div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; }
.case-facts dt { font-family: var(--dot); font-size: .82rem; color: var(--ink-3); padding-top: 3px; }
.case-facts dd { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.reviews:not(:has(.review)) { display: none; }
.review { margin: 0; background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); padding: 24px 24px 20px; }
.review p { font-size: 1.02rem; line-height: 1.6; color: var(--ink); }
.review footer { font-size: .88rem; color: var(--ink-2); display: grid; gap: 2px; }
.review footer strong { font-family: var(--dot); font-weight: 400; color: var(--ink); }
.review-meta { font-size: .8rem; color: var(--ink-3); }

.review-cta {
  margin-top: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--bg-dark); color: var(--on-dark);
  border: 2px solid var(--line); box-shadow: var(--shadow);
  padding: 26px 30px;
}
.review-cta h3 { color: var(--on-dark); margin-bottom: 6px; }
.review-cta p { margin: 0; color: var(--on-dark-2); font-size: .95rem; }
.review-cta strong { color: var(--pink); }

/* ---------- Notes ---------- */
.note-list { list-style: none; display: grid; gap: 0; }
.note-item { border-top: 2px dotted var(--line-soft); }
.note-item:last-child { border-bottom: 2px dotted var(--line-soft); }
.note-link { display: block; padding: 22px 0 22px 22px; color: inherit; position: relative; }
.note-link::before {
  content: "\25B6";
  position: absolute; left: 0; top: 26px;
  color: var(--accent); font-size: .7rem; opacity: 0;
  transition: opacity .12s;
}
.note-link:hover::before { opacity: 1; }
.note-link:hover { text-decoration: none; }
.note-link:hover h3 { color: var(--accent); }
.note-link h3 { font-size: 1.2rem; margin: 0 0 8px; max-width: 34ch; }
.note-meta { font-family: var(--dot); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.note-summary { color: var(--ink-2); margin: 0; max-width: 62ch; font-size: .94rem; }
.note-fallback { padding: 22px 0; }

/* ---------- Article body ---------- */
.prose { max-width: 680px; }
.prose h1 { margin-bottom: 22px; }
.prose h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.prose p { color: var(--ink-2); }
.prose .lede { color: var(--ink); margin-bottom: 26px; }
.prose ul, .prose ol { margin: 0 0 1.2em 1.1em; }
.prose li { color: var(--ink-2); margin-bottom: 12px; padding-left: 4px; }
.prose li strong { color: var(--ink); }
.prose blockquote {
  margin: 26px 0; padding: 14px 20px;
  border: 2px solid var(--line); border-left-width: 6px;
  border-left-color: var(--accent);
  background: var(--panel);
  font-size: 1.02rem; color: var(--ink);
}
.prose pre {
  background: var(--bg-dark); color: var(--on-dark);
  padding: 18px 20px; border: 2px solid var(--line);
  overflow-x: auto; font-size: .86rem; line-height: 1.55;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; background: var(--bg-alt);
  padding: 2px 6px; border: 1px solid var(--line-soft);
}
.prose pre code { background: none; padding: 0; border: 0; }
.prose figure { margin: 30px 0; }
.prose figure img { border: 2px solid var(--line); }
.prose figcaption { font-size: .86rem; color: var(--ink-3); margin-top: 10px; }
.prose .note-meta { margin-bottom: 14px; }

.note-end {
  margin-top: 44px; padding: 20px 24px;
  background: var(--bg-alt); border: 2px solid var(--line); box-shadow: var(--shadow);
}
.note-end p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.draft-banner {
  background: #fff2dc; border: 2px dashed var(--accent);
  padding: 16px 18px; margin-bottom: 30px;
  font-size: .9rem; color: #6b3a18; line-height: 1.55;
}
.draft-banner strong { display: block; margin-bottom: 4px; font-family: var(--dot); color: #a8431a; }
.draft-banner code { background: #fde6cf; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 52px; align-items: start; }
.about-photo {
  background: var(--bg);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
}
.about-photo img { width: 100%; }
.photo-placeholder {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-alt);
  display: grid; place-items: center;
  font-family: var(--dot); font-size: 4rem; color: var(--line-soft);
}
.about-grid p { color: var(--ink-2); max-width: 600px; }
.about-links { margin-top: 20px; display: flex; gap: 12px; color: var(--ink-3); font-family: var(--dot); font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.contact-grid > div > p { color: var(--on-dark-2); max-width: 460px; }
.contact-list { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; }
.contact-label { font-family: var(--dot); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-family: var(--dot); font-size: .85rem; letter-spacing: .02em; }
.form label small { font-family: var(--sans); color: var(--ink-3); }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%;
  font-family: var(--sans); font-size: 1rem;
  padding: 11px 13px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-sm); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form-note { font-family: var(--sans); font-size: .84rem; color: var(--ink-3); margin: 0; }
.section-dark .form label { color: var(--on-dark); }
.section-dark .form label small, .section-dark .form-note { color: var(--on-dark-2); }
.section-dark .form input, .section-dark .form textarea { background: #3a3137; border-color: var(--on-dark-2); color: var(--on-dark); }
.section-dark .form input:focus, .section-dark .form textarea:focus { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent); }
.section-dark .form .btn-primary { box-shadow: 4px 4px 0 var(--on-dark-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-card { background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); padding: 30px; margin-top: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rating { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.rating legend { font-family: var(--dot); font-size: .85rem; margin-bottom: 8px; padding: 0; }
.rating label { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: .95rem; }
.rating input { accent-color: var(--accent); width: 17px; height: 17px; }
.check { display: flex !important; align-items: flex-start; gap: 10px; font-family: var(--sans) !important; font-size: .95rem !important; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }

/* 提交反馈 */
.form-message { margin: 0; padding: 12px 16px; border: 2px solid var(--ink); font-size: .93rem; line-height: 1.5; box-shadow: var(--shadow-sm); }
/* 成功提示用站点底色，这样里面的像素精灵能无缝融入（它的背景就是这个色） */
.form-message-ok { background: var(--bg); color: #6b3a18; border-color: var(--accent); }
.form-message-error { background: #fbdede; color: #8a2222; }
.section-dark .form-message-ok { background: var(--accent); color: #fff; border-color: var(--on-dark); }
.section-dark .form-message-error { background: #8a2222; color: #ffe2e2; border-color: var(--on-dark); }
.form button[type="submit"][disabled] { opacity: .6; cursor: default; }

/* ---------- Narrow pages ---------- */
.page-narrow { padding: clamp(48px, 7vw, 84px) 0; }
.page-narrow .container { max-width: 720px; }
.page-narrow h1 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); }
.page-narrow .cta-row { margin-top: 26px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--line);
  padding: 24px 0;
  font-family: var(--dot);
  font-size: .82rem;
  color: var(--ink-3);
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.footer-sprite { width: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 210px; column-gap: 30px; }
  .hero-sprite img { width: 210px; }
  .cards.three { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; }
  .case-media { border-right: 0; border-bottom: 2px solid var(--line); padding: 26px; }
  .about-grid { grid-template-columns: 220px 1fr; gap: 34px; }
  .contact-grid { grid-template-columns: 1fr; gap: 38px; }
  .reviews { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute; top: 66px; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0 12px 16px; border-bottom: 1px dotted var(--line-soft); }
  .site-nav a:not(.btn)::before { left: 2px; }
  .site-nav a.btn { margin-top: 12px; justify-content: center; border-bottom: 2px solid var(--ink); padding: 13px 20px; }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "sprite" "body";
    row-gap: 4px;
  }
  .hero-sprite { justify-self: center; margin: 4px 0 12px; }
  .hero-sprite img { width: 168px; }
  .hero h1 { max-width: none; }

  .steps { grid-template-columns: 1fr; gap: 22px; }
  .case-body { padding: 22px 20px; }
  .case-facts div { grid-template-columns: 1fr; gap: 4px; }
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .about-photo { max-width: 210px; }
  .review-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .form-card { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .dialogue { padding: 18px 20px 20px; }
}

/* ---------- Thank-you sprite ---------- */
.thanks-sprite { width: 100%; max-width: 340px; margin: 0 0 8px -14px; }

.form-message { display: grid; gap: 10px; justify-items: start; }
.form-message p { margin: 0; }
.form-message-art { width: 190px; margin: 2px 0 -6px -10px; }

@media (max-width: 720px) {
  .thanks-sprite { max-width: 260px; }
  .form-message-art { width: 150px; }
}
