/* InnoVerse 詠學創新 — shared styles */
:root {
  --ink: #0f2747;
  --ink-soft: #2a3f5f;
  --teal: #17968a;
  --mint: #3dbb94;
  --paper: #f7f5ef;
  --paper-deep: #efece3;
  --card: #fcfbf7;
  --line: #d9d5c8;
  --muted: #5d6878;
  --grad: linear-gradient(120deg, #123a6b 0%, #17968a 60%, #3dbb94 100%);
  --serif: "Source Serif 4", "Noto Serif TC", "Songti TC", serif;
  --sans: "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  min-height: 72px;
  background: rgba(247, 245, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: auto; }
.brand-name { font-family: var(--sans); font-weight: 500; font-size: 20px; letter-spacing: 0.04em; line-height: 1.1; }
.brand-name small { display: block; font-size: 11px; letter-spacing: 0.42em; color: var(--muted); font-weight: 400; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.nav-links a { position: relative; padding: 6px 0; color: var(--ink-soft); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--teal); transition: width .3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--ink); }
.lang-btn {
  font: inherit; font-size: 13px; letter-spacing: 0.08em; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--ink);
  padding: 5px 14px; border-radius: 999px; transition: all .25s;
}
.lang-btn:hover { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 6px auto; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.35; letter-spacing: 0.02em; }
h1 { font-size: clamp(36px, 5.4vw, 62px); }
h2 { font-size: clamp(26px, 3.2vw, 38px); }
h3 { font-size: 21px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--teal); }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 36em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 28px; border-radius: 999px; font-size: 15px; letter-spacing: 0.06em;
  border: 1px solid var(--ink); transition: all .25s; cursor: pointer; font-family: inherit;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--teal); border-color: var(--teal); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.text-link { color: var(--teal); border-bottom: 1px solid currentColor; padding-bottom: 2px; font-size: 15px; }
.text-link:hover { color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 104px 0; }
.section-head { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-bottom: 56px; align-items: start; }
.section-no { font-family: var(--serif); font-size: 15px; color: var(--teal); letter-spacing: 0.1em; padding-top: 12px; border-top: 1px solid var(--ink); }
.section-head p { margin-top: 14px; color: var(--muted); max-width: 40em; }
.alt { background: var(--paper-deep); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 120px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15, 39, 71, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 28px; }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-art img { width: 62%; position: relative; z-index: 2; }
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit .spin { transform-origin: 50% 50%; animation: spin 48s linear infinite; }
.orbit .spin.rev { animation-duration: 70s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15, 39, 71, 0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(100deg, transparent 55%, #000 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 55%, #000 100%);
}
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 50px); margin-bottom: 20px; }

/* ---------- Cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.svc {
  padding: 34px 26px 38px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .3s; display: flex; flex-direction: column;
}
.svc:last-child { border-right: 0; }
.svc:hover { background: var(--card); }
.svc .no { font-family: var(--serif); font-size: 13px; color: var(--muted); letter-spacing: 0.1em; }
.svc svg { width: 46px; height: 46px; margin: 26px 0 22px; }
.svc h3 { margin-bottom: 10px; }
.svc p { font-size: 15px; color: var(--muted); flex: 1; }
.svc .text-link { margin-top: 22px; align-self: flex-start; border: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 64px; }
.who { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 20px; }
.who h3 { font-size: 19px; }
.who p { color: var(--muted); font-size: 15px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.belief { border-top: 1px solid var(--ink); padding-top: 22px; }
.belief .no { font-family: var(--serif); color: var(--teal); font-size: 14px; letter-spacing: 0.1em; }
.belief h3 { margin: 12px 0 10px; }
.belief p { color: var(--muted); font-size: 15px; }

/* ---------- Dark band ---------- */
.band { background: #0c2140; color: #eef2f1; position: relative; overflow: hidden; }
.band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 380px at 85% 20%, rgba(61, 187, 148, 0.22), transparent 70%),
              radial-gradient(500px 340px at 10% 100%, rgba(23, 150, 138, 0.18), transparent 70%);
}
.band .wrap { position: relative; }
.band .eyebrow { color: var(--mint); }
.band .eyebrow::before { background: var(--mint); }
.band .lead { color: #c3cfd6; }
.band .btn { border-color: #eef2f1; color: #eef2f1; }
.band .btn:hover { background: #eef2f1; color: #0c2140; }
.band-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center; }
.badge { display: inline-block; font-size: 12px; letter-spacing: 0.2em; border: 1px solid var(--mint); color: var(--mint); padding: 4px 14px; border-radius: 999px; margin-bottom: 22px; }

/* phone mock */
.phone { width: 230px; margin-inline: auto; aspect-ratio: 9 / 18.5; border: 1.5px solid rgba(238, 242, 241, 0.6); border-radius: 34px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: rgba(255, 255, 255, 0.04); }
.phone .bar { height: 5px; width: 60px; border-radius: 9px; background: rgba(238, 242, 241, 0.4); margin: 0 auto 10px; }
.phone .q { border: 1px solid rgba(238, 242, 241, 0.3); border-radius: 12px; padding: 12px; font-size: 12px; line-height: 1.6; color: #d6e0e2; }
.phone .opt { border: 1px solid rgba(238, 242, 241, 0.25); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: #c3cfd6; }
.phone .opt.on { border-color: var(--mint); color: #fff; background: rgba(61, 187, 148, 0.18); }
.phone .prog { margin-top: auto; height: 4px; border-radius: 4px; background: rgba(238, 242, 241, 0.18); overflow: hidden; }
.phone .prog i { display: block; width: 62%; height: 100%; background: linear-gradient(90deg, #17968a, #3dbb94); }

/* ---------- Service detail ---------- */
.detail { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 24px 48px; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.detail:first-of-type { border-top: 1px solid var(--ink); }
.detail .no { font-family: var(--serif); color: var(--teal); letter-spacing: 0.1em; font-size: 15px; }
.detail h2 { font-size: 28px; margin-bottom: 14px; }
.detail p { color: var(--ink-soft); }
.detail .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { font-size: 12px; letter-spacing: 0.08em; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--card); }
.detail ul li { padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; color: var(--ink-soft); }
.detail ul li::before { content: ""; position: absolute; left: 2px; top: 24px; width: 12px; height: 1px; background: var(--teal); }

/* ---------- Prose / about ---------- */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
.prose p { margin-bottom: 1.3em; color: var(--ink-soft); font-size: 17px; }
.quote { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.7; border-left: 2px solid var(--teal); padding-left: 26px; }
.name-card { background: var(--card); border: 1px solid var(--line); padding: 34px; }
.name-card dt { font-family: var(--serif); font-size: 26px; margin-top: 22px; }
.name-card dt:first-child { margin-top: 0; }
.name-card dd { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: 112px 0; }
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--muted); max-width: 34em; margin-inline: auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; }
.info-item { padding: 22px 0; border-top: 1px solid var(--line); }
.info-item:first-child { border-top: 1px solid var(--ink); }
.info-item span { display: block; font-size: 12px; letter-spacing: 0.24em; color: var(--teal); text-transform: uppercase; margin-bottom: 4px; }
.info-item a, .info-item strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.info-item a:hover { color: var(--teal); }
form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink-soft); padding: 10px 2px; border-radius: 0; width: 100%;
}
textarea { min-height: 130px; resize: vertical; border: 1px solid var(--line); padding: 12px; background: var(--card); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 1px 0 var(--teal); }
.form-note { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
#site-footer { border-top: 1px solid var(--ink); padding: 56px 0 34px; font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot h4 { font-size: 12px; letter-spacing: 0.26em; color: var(--teal); text-transform: uppercase; margin-bottom: 14px; font-weight: 500; }
.foot li { margin-bottom: 6px; }
.foot a:hover { color: var(--teal); }
.foot p { color: var(--muted); max-width: 26em; margin-top: 14px; }
.copy { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; letter-spacing: 0.08em; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit .spin { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .hero-grid, .band-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { max-width: 230px; width: 100%; order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .svc:nth-child(2n) { border-right: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section-no { width: 80px; }
  .detail { grid-template-columns: 1fr; gap: 20px; padding: 48px 0; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }

  .menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 24px 24px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .lang-btn { margin-top: 10px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .svc { border-right: 0; }
  .who { grid-template-columns: 1fr; gap: 6px; }
  .row-2 { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
}
