/* ==========================================================================
   Jimperan Master Site v1
   Plain CSS, no build step.
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin subset of Lora, SIL OFL) ---------- */
@font-face {
  font-family: "Jimperan Serif";
  src: url("assets/fonts/jimperan-serif-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jimperan Serif";
  src: url("assets/fonts/jimperan-serif-italic-var.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* paper & ink */
  --paper: #FCF8F3;
  --paper-deep: #F5EEE7;
  --ink: #1F2644;
  --ink-2: #545B76;
  --ink-3: #686E88;
  --line: #E6DDD4;

  /* accents, taken from the astronaut: suit pink, visor champagne, lavender */
  --pink: #E78CB7;
  --pink-soft: #F9E1EC;
  --pink-deep: #A8467A;
  --lav: #B9B5EC;
  --lav-soft: #EEEBFA;
  --lav-deep: #4F55A8;
  --gold: #E3B46E;
  --gold-soft: #F8EBD4;
  --gold-deep: #8A6428;

  --font-display: "Jimperan Serif", "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC",
                  "PingFang SC", "Microsoft YaHei", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans SC", "Noto Sans CJK SC", "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 10vw, 136px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--lav-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-block;
  font-family: "Jimperan Serif", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
/* the tittle of the i is a small champagne-gold planet */
.wm-i { position: relative; display: inline-block; }
.wm-i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.08em;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
}
.wordmark--sm { font-size: 26px; }
.wordmark--sm .wm-i::after { width: 0.22em; height: 0.22em; top: 0.04em; background: #DCA652; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 2; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}
.brand {
  display: inline-flex;
  padding: 6px 0;
  text-decoration: none;
}
.site-nav ul { display: flex; gap: clamp(16px, 3vw, 36px); }
.site-nav a {
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  background: linear-gradient(var(--pink), var(--pink)) left calc(100% - 4px) / 0 1.5px no-repeat;
  transition: color .2s ease, background-size .25s ease;
}
.site-nav a:hover { color: var(--ink); background-size: 100% 1.5px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(16px, 3vw, 40px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.hero-title { display: block; font-weight: 400; }
.wordmark--hero {
  display: block;
  font-size: clamp(72px, 11.5vw, 168px);
  letter-spacing: -0.035em;
  margin-left: -0.04em;
}
.hero-tagline {
  display: block;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.hero-en {
  margin-top: 10px;
  max-width: 30ch;
  font-family: "Jimperan Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-by {
  margin-top: 22px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding: 13px 24px 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease;
}
.hero-cta::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.hero-cta:hover { background: #2C3560; }

/* visual */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  justify-self: center;
}
.moon {
  position: absolute;
  inset: 16% 14% 14% 16%;
  border-radius: 50%;
  background: var(--lav-soft);
}
.orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.orbit--front { z-index: 2; }
.orbit-line {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .28;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.orbit-dot-fill { fill: var(--gold); }

.mascot-float {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 7%;
  width: 54%;
  transform: translateX(-50%);
}
.mascot {
  display: block;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) rotate(var(--mr, 0deg));
  transform-origin: 50% 70%;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.mascot img { width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .mascot-float { animation: arrive .9s cubic-bezier(.2, .7, .2, 1) both; }
  .mascot { animation: float 7s ease-in-out 1s infinite; }
  .orbit { animation: fade-in 1.2s ease .2s both; }
}
@keyframes arrive {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }

.section-head h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.section-en {
  margin-top: 4px;
  font-family: "Jimperan Serif", Georgia, serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink-3);
}
.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}
.section-lede {
  max-width: 34em;
  color: var(--ink-2);
}

/* ---------- About ---------- */
.about { border-top: 1px solid var(--line); }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 32px clamp(32px, 6vw, 96px);
}
.statement {
  max-width: 26em;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-wrap: pretty;
}
.qualities {
  display: flex;
  flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 48px);
}
.qualities li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-right: clamp(20px, 3vw, 40px);
  margin-right: clamp(20px, 3vw, 40px);
  border-right: 1px solid var(--line);
}
.qualities li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.q-zh { font-size: 19px; font-weight: 600; letter-spacing: 0.08em; }
.q-en { font-family: "Jimperan Serif", Georgia, serif; font-style: italic; font-size: 15px; color: var(--ink-3); }

/* ---------- Products ---------- */
.products { background: var(--paper-deep); }

.product-orbit {
  --pgap: clamp(24px, 4vw, 56px);
  --planet: 120px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pgap);
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 8px;
}
/* one shared orbit threads all three planets.
   Ellipse is centred on the middle planet; semi-axis a = 1.25 × column pitch,
   so the side planets sit 0.2 × height/2… i.e. 36px lower (their margin-top). */
.product-orbit::before {
  content: "";
  position: absolute;
  left: calc(var(--planet) / 2 - (100% + var(--pgap)) / 12);
  width: calc((100% + var(--pgap)) * 2.5 / 3);
  top: calc(8px + var(--planet) / 2);
  height: 180px;
  border-radius: 50%;
  border-top: 1.5px dashed rgba(31, 38, 68, .26);
  pointer-events: none;
}

.product { position: relative; }
.product--reading, .product--assessment { margin-top: 36px; }

.planet {
  width: 120px;
  height: 120px;
  margin-bottom: 28px;
  position: relative;
}
.planet svg { width: 100%; height: 100%; overflow: visible; }
.planet-body { stroke: none; }
.planet-glyph {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.planet-pin { fill: var(--ink); }

.product--reading .planet-body { fill: var(--lav); }
.product--reading .planet-ring { fill: none; stroke: var(--lav-deep); stroke-width: 1.6; stroke-opacity: .6; }

.product--pronunciation .planet-body { fill: var(--pink); }
.product--pronunciation .planet-ripple { fill: none; stroke: var(--pink); stroke-width: 1.6; stroke-opacity: .55; }
.product--pronunciation .planet-ripple--outer { stroke-opacity: .28; }

.product--assessment .planet-body { fill: var(--gold); }
.product--assessment .planet-ticks path { fill: none; stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; stroke-opacity: .7; }

.product-index {
  font-family: "Jimperan Serif", Georgia, serif;
  font-size: 15px;
  color: var(--ink-2);
  font-variant-numeric: lining-nums;
}
.product-name {
  margin-top: 2px;
  font-family: "Jimperan Serif", Georgia, serif;
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.product-desc { margin-top: 10px; color: var(--ink-2); }

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: default;
}
.product-status span[lang="en"] { font-family: "Jimperan Serif", Georgia, serif; font-style: italic; }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.product--reading .status-dot { color: var(--lav-deep); }
.product--pronunciation .status-dot { color: var(--pink-deep); }
.product--assessment .status-dot { color: var(--gold-deep); }

/* used once a product has a real URL */
.product-link {
  display: inline-flex;
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.product-link:hover { background: var(--ink); color: var(--paper); }

/* ---------- Why Jimperan ---------- */
.why {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #F4EEE8;
}
.why-stars {
  position: absolute;
  right: 0; top: 0;
  width: min(520px, 70%);
  fill: #F4EEE8;
  opacity: .5;
  pointer-events: none;
}
.why .section-head h2 {
  font-family: "Jimperan Serif", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(30px, 3vw, 40px);
}
.why .section-en {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 15px;
  color: rgba(244, 238, 232, .66);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid rgba(244, 238, 232, .16);
}
.principle {
  padding: 32px clamp(16px, 2vw, 28px) 8px;
  border-left: 1px solid rgba(244, 238, 232, .16);
}
.principle:first-child { border-left: 0; padding-left: 0; }
.principle-glyph {
  width: 44px; height: 44px;
  margin-bottom: 24px;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.principle-glyph .fill { stroke: none; }
.principle--read .principle-glyph { stroke: var(--lav); }
.principle--speak .principle-glyph { stroke: var(--pink); }
.principle--speak .principle-glyph circle { fill: var(--pink); stroke: none; }
.principle--understand .principle-glyph { stroke: var(--gold); }
.principle--learn .principle-glyph { stroke: #F4EEE8; stroke-opacity: .8; }
.principle--learn .principle-glyph .fill { fill: var(--gold); }

.principle h3 {
  font-family: "Jimperan Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}
.principle p {
  margin-top: 8px;
  font-size: 15px;
  color: rgba(244, 238, 232, .72);
}

/* ---------- Brand and contact additions ---------- */
/* Two primary names in one brand system; size is optically balanced across scripts. */
.hero-personal {
  display: block;
  margin-top: clamp(16px, 2vw, 28px);
  font-family: var(--font-sans);
  font-size: clamp(46px, 7.6vw, 108px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .025em;
  color: var(--ink);
}
.brand { align-items: center; gap: 12px; white-space: nowrap; }
.brand-personal, .footer-personal {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.brand-divider { color: var(--ink-3); font-size: 18px; font-weight: 400; }
.footer-personal { display: inline-block; vertical-align: baseline; }
@media (max-width: 660px) {
  .header-inner { flex-wrap: wrap; gap: 8px 24px; padding-block: 16px; }
  .site-header .site-nav { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .brand { gap: 10px; }
  .brand-personal, .footer-personal { font-size: 20px; }
  .brand-divider { font-size: 16px; }
}
.why .why-motto { margin-top: 14px; font-size: clamp(20px, 2vw, 26px); line-height: 1.5; }
.why .why-motto-en { font-family: "Jimperan Serif", Georgia, serif; font-style: italic; }
.contact { border-bottom: 1px solid var(--line); padding-block: clamp(48px, 6vw, 80px); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px clamp(32px, 6vw, 96px); }
.contact-copy { color: var(--ink-2); }
.contact-email { margin-top: 16px; color: var(--ink); overflow-wrap: anywhere; }
.owner-placeholder { font-weight: 500; }
.page-body .contact-identity { margin-top: 24px; }
@media (max-width: 960px) {
  .contact-inner { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(56px, 7vw, 80px) 40px;
  font-size: 14px;
  color: var(--ink-2);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-tagline { margin-top: 14px; color: var(--ink); }
.footer-sub { color: var(--ink-3); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a { text-decoration: none; padding: 4px 0; display: inline-block; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-3);
}
.beian a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.beian a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.beian img { width: 16px; height: 16px; }
[hidden] { display: none !important; }

/* ---------- Contact page ---------- */
.page { padding-block: clamp(40px, 6vw, 80px) var(--section-y); }
.page-inner > * { max-width: 720px; }
.page h1 {
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.page .page-en {
  margin-top: 4px;
  font-family: "Jimperan Serif", Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-3);
}
.page-body { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.page-body p + p { margin-top: 16px; }
.page-body h2 { margin: 40px 0 12px; font-size: 20px; font-weight: 600; }
.contact-list { display: grid; gap: 20px; margin-top: 8px; }
.contact-list dt { font-size: 14px; color: var(--ink-3); }
.contact-list dd { margin: 2px 0 0; font-size: 18px; }
.contact-list a { text-underline-offset: 4px; }
.back-home {
  display: inline-block;
  margin-top: 48px;
  font-size: 15px;
  color: var(--ink-2);
  text-underline-offset: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; order: -1; margin-bottom: -12px; }
  .about-inner { grid-template-columns: 1fr; }

  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle:nth-child(3) { border-left: 0; padding-left: 0; }
  .principle:nth-child(n+3) { border-top: 1px solid rgba(244, 238, 232, .16); margin-top: 24px; }
}

@media (max-width: 760px) {
  .product-orbit {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .product-orbit::before {
    left: 44px; right: auto;
    top: 44px; bottom: 44px;
    height: auto; width: 0;
    border-radius: 0;
    border-top: 0;
    border-left: 1.5px dashed rgba(31, 38, 68, .26);
  }
  .product--reading, .product--assessment { margin-top: 0; }
  .product {
    display: grid;
    grid-template-columns: 88px 1fr;
    column-gap: 24px;
    align-items: start;
  }
  .planet { width: 88px; height: 88px; margin: 0; grid-row: span 4; }
  .product-index { margin-top: 4px; }
}

@media (max-width: 560px) {
  .header-inner { min-height: 68px; }
  .wordmark--sm { font-size: 22px; }
  .site-nav ul { gap: 14px; }
  .site-nav a { font-size: 13px; }

  .hero-visual { max-width: 320px; }
  .hero-cta { margin-top: 28px; }

  .principles { grid-template-columns: 1fr; }
  .principle, .principle:nth-child(3) { border-left: 0; padding-left: 0; padding-right: 0; }
  .principle:nth-child(n+2) { border-top: 1px solid rgba(244, 238, 232, .16); margin-top: 0; }
  .principle { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; padding-block: 24px; }
  .principle-glyph { grid-row: span 2; margin: 2px 0 0; }
  .principle p { margin-top: 2px; }

  .qualities li { flex-direction: column; gap: 0; padding-right: 20px; margin-right: 20px; }
}

@media (max-width: 360px) {
  .site-nav li:nth-child(3) a { font-size: 12px; }
}

