/* =========================================================
   i4 — Product landing pages (shared)
   Used by /ai-ocr/ and /ai-chatbot/ on top of style.css.
   Page-specific parts live in each page's own stylesheet.
   ========================================================= */

.lp {
  --scan: #5ef0ff;
  --ok: #34d399;
  --warn: #ff9a3c;
  --ng: #ff6474;
}
.o-brand { font-size: 12px; letter-spacing: .2em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); }
/* break Japanese headings at phrase boundaries instead of leaving one character alone */
.lp h3, .lp .lead { word-break: auto-phrase; text-wrap: pretty; }
.lp h3 { text-wrap: balance; }

/* ---------- Hero ---------- */
.o-hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  color: #eef3ff;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  display: flex; align-items: center;
}
.o-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 80% 40%, rgba(32, 96, 220, .38), transparent 60%),
    radial-gradient(50% 60% at 10% 90%, rgba(30, 160, 200, .16), transparent 60%),
    linear-gradient(180deg, #050b18 0%, #071230 100%);
}
.o-hero__bg::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(150, 185, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 185, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 60% 40%, #000, transparent);
}
.o-hero__bg::after {
  content: ''; position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(180deg, transparent, rgba(94, 240, 255, .07), transparent);
  animation: o-sweep 7s linear infinite;
}
@keyframes o-sweep { to { top: 100%; } }
.o-hero__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.o-hero__title { font-family: var(--f-serif-jp); font-weight: 700; font-size: clamp(36px, 4vw, 66px); line-height: 1.22; letter-spacing: .01em; margin: 22px 0 26px; }
.o-grad { font-style: normal; }
.o-grad .char, .o-grad { background: linear-gradient(120deg, #b6f2ff 0%, #5ab8ff 40%, #2f6dff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.o-hero__lead { color: rgba(222, 232, 255, .8); font-size: clamp(15px, 1.15vw, 17px); line-height: 2.05; max-width: 34em; }
.o-hero__lead strong { color: #fff; font-weight: 700; }
.o-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.o-hero .btn--ghost { color: #eef3ff; border-color: rgba(150, 185, 255, .3); background: rgba(6, 13, 29, .35); }
.o-hero .btn--ghost::before { background: #eef3ff; }
.o-hero .btn--ghost:hover { color: #060d1d; }
.o-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 30px; font-size: 13px; color: rgba(214, 226, 255, .8); }
.o-badges li { display: flex; align-items: center; gap: 8px; }
.o-badges svg { width: 18px; height: 18px; fill: none; stroke: var(--scan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.o-hero__scroll { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(214, 226, 255, .5); }
.o-hero__scroll i { width: 1px; height: 40px; background: linear-gradient(var(--scan), transparent); }

/* ---------- Generic sections ---------- */
.o-sec { padding: clamp(110px, 15vh, 180px) 0; position: relative; }
.o-note { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 18px; max-width: 70em; }

/* Problem */
.o-pains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.o-pain { padding: 30px 26px 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -45px rgba(10, 22, 48, .4); }
.o-pain__num { color: var(--accent); }
.o-pain h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 20px; line-height: 1.5; margin: 18px 0 10px; }
.o-pain p { color: var(--muted); font-size: 14px; line-height: 1.95; }
@media (max-width: 1080px) { .o-pains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .o-pains { grid-template-columns: 1fr; } }

/* ---------- Checklists / tables / small cards ---------- */
.o-check { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; }
.o-check li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; }
.o-check li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.o-table-wrap { margin-top: 48px; overflow-x: auto; }
.o-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; }
.o-table caption { text-align: left; color: var(--muted); margin-bottom: 14px; }
.o-table th, .o-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.o-table thead th { font-weight: 700; color: var(--fg); font-size: 15px; border-bottom: 1px solid var(--fg); }
.o-table tbody th { color: var(--muted); font-weight: 500; width: 26%; }
.o-table td { color: var(--fg); }
.o-table td.is-good { color: var(--scan); font-weight: 700; }

.o-mini { padding: 24px 24px 22px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.o-mini h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.o-mini p { color: var(--muted); font-size: 14px; line-height: 1.9; }

/* ---------- Features / Cases ---------- */
.o-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.o-feat-card { padding: 28px 24px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background-color .4s; }
.o-feat-card:hover { background: var(--panel); }
.o-feat-card::before { content: ''; position: absolute; left: 24px; top: 0; width: 28px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(.4); transition: transform .5s var(--ease-out); }
.o-feat-card:hover::before { transform: scaleX(1); }
.o-feat-card h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 18px; margin: 8px 0 10px; }
.o-feat-card p { color: var(--muted); font-size: 14px; line-height: 1.9; }
@media (max-width: 1080px) { .o-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .o-feats { grid-template-columns: 1fr; } }

.o-cases { padding-top: 0; }
.o-case-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.o-case { padding: 24px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.o-case__tag { color: var(--accent); }
.o-case h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 18px; line-height: 1.5; margin: 12px 0 8px; }
.o-case p { color: var(--muted); font-size: 13.5px; line-height: 1.85; }
@media (max-width: 1200px) { .o-case-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .o-case-list { grid-template-columns: 1fr; } }

/* ---------- ROI ---------- */
.o-roi__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; }
.o-roi__panel, .o-roi__result { border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 3vw, 44px); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); }
.o-roi__panel { display: grid; gap: 30px; align-content: start; }
.o-roi__result { position: relative; overflow: hidden; display: grid; gap: 26px; align-content: start; }
.o-roi__result::before { content: ''; position: absolute; width: 420px; height: 420px; right: -160px; top: -200px; background: radial-gradient(circle, rgba(94, 240, 255, .25), transparent 65%); pointer-events: none; }
.o-roi__kicker { color: var(--muted); }
.o-roi__big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.o-roi__big b { font-family: var(--f-serif-en); font-weight: 600; font-size: clamp(56px, 6.4vw, 100px); line-height: 1.05; background: linear-gradient(120deg, #b6f2ff, #5ab8ff 45%, #2f6dff); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; padding-bottom: .06em; }
.o-roi__big span { color: var(--muted); }
.o-roi__bars { display: grid; gap: 10px; }
.o-roi__bar { display: grid; grid-template-columns: 54px 1fr 70px; align-items: center; gap: 12px; }
.o-roi__bar .mono { font-size: 10px; color: var(--muted); }
.o-roi__bar i { height: 16px; border-radius: 6px; background: repeating-linear-gradient(135deg, #7d8fb5 0 5px, #5b6d93 5px 10px); transform-origin: left; transform: scaleX(var(--w, 1)); transition: transform .8s var(--ease-out); }
.o-roi__bar.is-after i { background: linear-gradient(90deg, #8fd3ff, #2f80ff); box-shadow: 0 0 18px rgba(90, 168, 255, .6); }
.o-roi__bar b { font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-align: right; }
.o-roi__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.o-roi__stats > div { padding: 20px 14px 0 0; }
.o-roi__stats > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.o-roi__stats dt { font-size: 12.5px; color: var(--muted); }
.o-roi__stats dd { margin: 4px 0 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.o-roi__stats dd b { font-family: var(--f-serif-en); font-size: clamp(28px, 2.6vw, 38px); font-weight: 600; font-variant-numeric: tabular-nums; }
.o-roi__stats dd span { font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .o-roi__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .o-roi__stats { grid-template-columns: 1fr; } .o-roi__stats > div, .o-roi__stats > div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Timeline / Plans / FAQ ---------- */
.o-timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.o-timeline li { position: relative; padding: 30px 20px 10px 0; }
.o-timeline li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.o-timeline li::before { content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.o-timeline li + li::before { left: -5px; }
.o-timeline .mono { color: var(--accent); }
.o-timeline h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 19px; margin: 8px 0 8px; }
.o-timeline p { color: var(--muted); font-size: 13.5px; line-height: 1.85; }
@media (max-width: 960px) {
  .o-timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); }
  .o-timeline li, .o-timeline li + li { padding: 0 0 26px 26px; border-left: 0; }
  .o-timeline li::before, .o-timeline li + li::before { top: 6px; left: -5px; }
}

.o-plans { padding-top: 0; }
.o-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.o-plan { display: flex; flex-direction: column; padding: 32px 30px 30px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -45px rgba(10, 22, 48, .4); }
.o-plan--trial { background: linear-gradient(160deg, #0d2152, #071230); color: #eef3ff; border-color: transparent; box-shadow: 0 40px 80px -40px rgba(31, 95, 224, .7); }
.o-plan--trial .o-check { color: rgba(238, 243, 255, .9); }
.o-plan__kicker { color: var(--accent); }
.o-plan--trial .o-plan__kicker { color: var(--scan); }
.o-plan h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: clamp(20px, 2vw, 26px); margin: 8px 0 4px; white-space: nowrap; }
.o-plan__price { font-size: 15px; color: var(--muted); }
.o-plan--trial .o-plan__price { color: rgba(214, 226, 255, .7); }
.o-plan .o-check { margin: 22px 0 28px; flex: 1; }
.o-plan .btn { align-self: flex-start; }
.o-options { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 20px 24px; border-radius: 18px; border: 1px dashed var(--line); }
.o-options .mono { color: var(--accent); }
.o-options ul { display: flex; flex-wrap: wrap; gap: 8px; }
.o-options li { padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); font-size: 13px; font-weight: 500; }
@media (max-width: 960px) { .o-plan-grid { grid-template-columns: 1fr; } }

.o-faq { padding-top: clamp(80px, 10vh, 120px); }
.o-faq__grid { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 90px); align-items: start; }
.o-faq__list { border-top: 1px solid var(--fg); }
.o-faq__list details { border-bottom: 1px solid var(--line); }
.o-faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 4px; font-family: var(--f-serif-jp); font-weight: 600; font-size: clamp(16px, 1.4vw, 19px); }
.o-faq__list summary::-webkit-details-marker { display: none; }
.o-faq__list summary::after { content: ''; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: linear-gradient(var(--fg), var(--fg)) center / 12px 1.5px no-repeat, linear-gradient(var(--fg), var(--fg)) center / 1.5px 12px no-repeat; transition: transform .4s var(--ease-out), background-color .3s; }
.o-faq__list details[open] summary::after { transform: rotate(45deg); }
.o-faq__list details > div { padding: 0 4px 26px; }
.o-faq__list details > div p { color: var(--muted); font-size: 15px; line-height: 2; max-width: 46em; }
.o-faq__list details[open] > div { animation: o-faqIn .45s var(--ease-out); }
@keyframes o-faqIn { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 900px) { .o-faq__grid { grid-template-columns: 1fr; } }

/* ---------- Apply form ---------- */
.o-apply { position: relative; overflow: hidden; }
.o-apply::before { content: ''; position: absolute; width: 900px; height: 900px; left: -300px; bottom: -500px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 95, 224, .28), transparent 65%); pointer-events: none; }
.o-apply__grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 5vw, 90px); align-items: start; }
.o-apply__points { display: grid; gap: 10px; margin-top: 30px; font-size: 14.5px; color: var(--muted); }
.o-apply__points li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.o-apply__points b { color: var(--fg); font-weight: 700; }
.o-form { gap: 22px; }
.o-form__type legend, .o-form .form__topics legend { font-size: 13px; color: var(--muted); margin-bottom: 12px; padding: 0; }
.o-form__type legend em, .o-consent em { font-style: normal; color: var(--accent); }
.o-form .chip { height: 38px; font-size: 13.5px; }
.o-form__more { display: grid; gap: 22px; }
.o-select { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.o-select select { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--fg); font: inherit; font-size: 15px; padding: 0 40px 0 14px; text-overflow: ellipsis; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.o-select select:focus { outline: none; border-color: var(--accent); }
.o-select select option { color: #0a1630; }
.o-consent { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.o-consent input { width: 18px; height: 18px; accent-color: var(--blue-500); }
.o-consent.is-invalid { color: #ff8a98; }
.o-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.o-form.is-sending .btn[type="submit"] { opacity: .6; pointer-events: none; }
.o-privacy { grid-column: 2; font-size: 13px; color: var(--muted); }
.o-privacy summary { cursor: pointer; margin-bottom: 8px; }
.o-privacy p { line-height: 1.9; }
@media (max-width: 960px) { .o-apply__grid { grid-template-columns: 1fr; } .o-privacy { grid-column: 1; } }

/* ---------- Floating CTA (mobile) ---------- */
.o-fab { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translate(-50%, 140%); transition: transform .5s var(--ease-out); display: none; }
.o-fab.is-on { transform: translate(-50%, 0); }
@media (max-width: 760px) { .o-fab { display: inline-flex; } }

/* ---------- Hero responsive ---------- */
@media (max-width: 1180px) {
  .o-hero { align-items: flex-start; }
  .o-hero__grid { grid-template-columns: 1fr; }
  .o-hero__copy { max-width: 760px; }
}
@media (max-width: 640px) { .o-hero__scroll { display: none; } }

/* Cormorant's default old-style "1" reads like a capital I — use lining figures for all numbers */
.o-roi__big b, .o-roi__stats dd b { font-variant-numeric: lining-nums tabular-nums; }
