/* =========================================================
   Rome — small-loan landing page (clean rebuild base)
   Design tokens ported from the original Astra theme.
   Content is placeholder; replace freely.
   ========================================================= */

:root {
  --navy: #1e293b;        /* hero / footer background, headings */
  --navy-2: #28344d;      /* hero gradient end */
  --slate: #67768e;       /* nav hover */
  --gold: #ffcd57;        /* primary CTA / accents */
  --green: #00d084;       /* LINE button */
  --green-dark: #06b36f;
  --ink: #1f2937;         /* body text */
  --muted: #6b7280;       /* secondary text */
  --line: #e5e7eb;        /* borders */
  --bg: #ffffff;
  --bg-soft: #f2f5f7;     /* section background */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
  --maxw: 1120px;
  --font-body: "Inter", "Noto Sans TC", system-ui, -apple-system, "Microsoft JhengHei", sans-serif;
  --font-head: "Plus Jakarta Sans", "Noto Sans TC", var(--font-body);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* room for fixed bottom bar */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  cursor: pointer; border: 2px solid transparent; transition: .18s ease;
  white-space: nowrap;
}
.btn-gold-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-gold-outline:hover { background: var(--gold); color: #3a2d00; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 20px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; }
.brand-keywords { color: var(--muted); font-size: 13px; letter-spacing: .5px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.main-nav a { font-weight: 600; color: var(--navy); }
.main-nav a:hover { color: var(--slate); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; overflow: hidden;
}
.hero .container {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px;
  padding-top: 56px; padding-bottom: 56px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; }
.hero-sub { margin: 20px 0 28px; font-size: clamp(15px, 2vw, 18px); color: #cdd5e3; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art img { margin-left: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }

/* ---------- features ---------- */
.features { padding: 56px 0; }
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feature {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; background: #fff;
  transition: .18s ease;
}
.feature:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature img { height: 54px; width: auto; margin: 0 auto 14px; }
.feature h3 { font-size: 18px; color: var(--navy); }
.feature p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- plans ---------- */
.plans { padding: 0 0 56px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.plan { position: relative; }
.plan > img { width: 100%; height: auto; border-radius: var(--radius); }
/* bottom/width keep the button inside the blank lower area of the plan art */
.plan-apply {
  position: absolute; left: 50%; bottom: 7%; width: 60%;
  transform: translateX(-50%); transition: transform .2s ease;
}
.plan-apply:hover, .plan-apply:focus-visible { transform: translateX(-50%) scale(1.05); }
.plan-apply img { width: 100%; height: auto; }

/* ---------- image sections (steps / vs / cases / fraud) ---------- */
.image-section { padding: 40px 0; }
.image-section:nth-of-type(even) { background: var(--bg-soft); }
.image-section img { width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius); }

/* ---------- case cards (case.jpg laid over the six cards baked into cases.jpg) ---------- */
.case-board { position: relative; }
/* left/top/width are the baked cards' 424×202 boxes at x 11/426/841, y 166/366 in cases.jpg (1280×640) */
.case-card {
  position: absolute; width: 33.125%; border-radius: 7% / 14.7%;
  aspect-ratio: 1280 / 611; container-type: inline-size;
  background: url("./images2/case.jpg") center / 100% 100% no-repeat;
  color: var(--navy); font-weight: 700;
}
.case-card:nth-child(3n+1) { left: 0.859%; }
.case-card:nth-child(3n+2) { left: 33.281%; }
.case-card:nth-child(3n) { left: 65.703%; }
.case-card:nth-child(-n+3) { top: 25.938%; }
.case-card:nth-child(n+4) { top: 57.188%; }
/* percentages position each element on the matching shape in case.jpg (1280×611) */
.case-card p { margin: 0; }
.case-card .case-avatar {
  position: absolute; left: 8.4%; top: 11.5%; width: 26.6%; height: auto;
  aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0;
}
.case-reason, .case-amount {
  position: absolute; display: flex; align-items: center; justify-content: center;
}
.case-reason {
  left: 41.4%; top: 15.5%; width: 49.6%; height: 21.3%;
  color: #fff; font-size: 8cqw; letter-spacing: .1em;
}
.case-check {
  position: absolute; left: 11.7%; top: 78.6%; transform: translate(-50%, -50%);
  color: var(--navy); font-size: 6cqw;
}
.case-name {
  position: absolute; left: 17.6%; right: 29%; top: 78.6%; transform: translateY(-50%);
  text-align: center; font-size: 5.6cqw; white-space: nowrap;
}
.case-name span { font-size: 6.4cqw; }
.case-amount { left: 72.3%; top: 70.4%; width: 21.9%; height: 17.2%; font-size: 6.4cqw; }

/* ---------- footer ---------- */
.site-footer {
  background: #141c2e; color: #c7d0e0; text-align: center;
  padding: 28px 0; font-size: 14px;
}
.site-footer a { color: var(--gold); }

/* ---------- fixed bottom contact bar ---------- */
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #0f1626; color: #e5e9f2; border-top: 2px solid var(--gold);
}
.contact-bar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; font-size: 14px;
}
.contact-bar .item { display: flex; align-items: center; gap: 8px; }
.contact-bar .label { color: var(--gold); font-weight: 600; }
.contact-bar a { color: #e5e9f2; }
.to-top {
  margin-left: 8px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); color: #3a2d00; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; flex: none;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-art img { margin: 0 auto; max-width: 420px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-bar .container { flex-wrap: wrap; font-size: 12.5px; gap: 8px 16px; }
}
@media (max-width: 600px) {
  .main-nav { gap: 14px; }
  .brand-keywords { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .plans .container, .image-section .container { padding: 0; }
  .plan > img, .image-section img { border-radius: 0; }
  body { padding-bottom: 96px; }
}
