/* English pages only (built by tools/i18n/build_en.py, loaded last). The design is the Japanese pages' own; this file
   only gives English what it needs: Latin letters in the Top's serif, and room where English runs longer. */

/* The Top's serif with Latin letters (tools/fonts/en_serif.py): the Japanese subsets hold no Latin, so the English
   was drawn in Times / Hiragino Mincho. Same font (Noto Serif JP), same weight; these rules come last, so they win. */
@font-face {
  font-family: "Home Serif";
  src: url("/assets/noto-serif-jp-en-1d480b94c5.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Editorial Serif";
  src: url("/assets/noto-serif-jp-en-1d480b94c5.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Top, the mission in English brush lettering: pattern 04 of the twelve (owner 2026-11-16: 「筆文字は04のかすれで」).
   The two images are the one artwork cut stroke by stroke (tools/i18n/en_lettering.py); each line still rises on its
   own in the intro (top/intro.css). Ids win over the Japanese rules at every width (top/page.css,
   top/scenery/style.css).
   Phone: two lines as in the mock it was chosen from; these widths and the small overlap lay the lines back where the
   brush put them, a little wider than the Japanese block so the letters keep a size near the Japanese characters.
   From 761px: one line, as the Japanese (owner 2026-11-16: 「別にデスクトップは日本語同様で1行でいいのでは？」), centred in
   the Japanese line's box, min(84%, 1130px). The two images at one scale (991 and 1454 wide), a word space of 24 between
   them (the flourish of "on" runs to its image's edge), and the second set 48 lower so the baselines meet (measured from the strokes: 216 and 168 from each top). */
#mission {
  display: block;
}
#mission > .mission-first {
  flex: none;
  width: 68.1568%;
}
#mission > .mission-second {
  flex: none;
  width: 100%;
  margin: -0.4127% 0 0;
}
@media (min-width: 761px) {
  #mission {
    display: flex;
    align-items: flex-start;
    left: 50%;
    width: min(84%, 1130px);
    transform: translateX(-50%);
  }
  #mission > .mission-first {
    width: 40.1377%;
  }
  #mission > .mission-second {
    width: 58.8902%;
    margin: 1.9441% 0 0 0.9721%;
  }
}
@media (max-width: 760px) {
  .home-intro #mission {
    width: min(96%, 410px);
  }
}
@media (max-width: 760px) and (max-height: 650px) {
  .home-intro #mission {
    width: min(92%, 342px);
  }
}
@media (min-width: 600px) and (max-width: 760px) and (max-height: 500px) {
  .home-intro #mission {
    width: min(100%, 250px);
  }
}

/* Top, desktop: the caption in the white corner. English runs to three or four lines, so the corner is cut a little
   deeper (top/fluid.js reads --desktop-corner-depth) and the type a step smaller; the line breaks follow the width. */
@media (min-width: 761px) {
  .stage {
    --desktop-corner-depth: 206px;
  }
  .home-caption p {
    font-size: 14.5px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-wrap: pretty;
  }
  .home-caption .caption-wide br {
    display: none;
  }
}

/* Top, the menu between phone and desktop: the English words run a third longer than the Japanese, so a step smaller,
   and at the narrowest widths a little smaller again, set a few pixels right of centre between the logo and the switch
   (site-shared.css makes the buttons on the right narrower). */
@media (min-width: 761px) and (max-width: 1000px) {
  .header .nav-links a {
    padding-inline: 7px;
    font-size: 11px;
  }
}
@media (min-width: 761px) and (max-width: 800px) {
  .header .nav-links a {
    padding-inline: 5px;
    font-size: 10.5px;
  }
  .header .navigation {
    transform: translate(calc(-50% + 6px), -50%);
  }
}

/* Top, phone: the description under the lettering, and the menu's words (English is three times as long) */
@media (max-width: 760px) {
  .home-description {
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: 0.01em;
  }
  .stage > .navigation .nav-links a,
  .stage > .navigation .nav-links a:hover,
  .stage > .navigation .nav-links a[aria-current="page"],
  .stage > .navigation .nav-links a[aria-current="page"]:hover {
    font-family: "Editorial Serif", serif;
    font-size: clamp(22px, 7.4vw, 30px);
    letter-spacing: 0.01em;
  }
}

/* Policies: the note that the Japanese version prevails (owner's item 10), above the signature */
.policy-language-note {
  color: inherit;
  opacity: 0.72;
  font-size: 13px;
  line-height: 1.8;
}

/* EC, OUR SERVICES: the headlines are set for Japanese (one line each, tracking -.075em). English needs its word
   spaces back, and on narrow screens it may wrap instead of running off the edge. */
.service-campaign-headline {
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.service-campaign-headline > span {
  white-space: normal;
}
.service-campaign-content .service-campaign-headline {
  font-size: clamp(40px, 3.7vw, 64px);
  line-height: 1.2;
}
.service-campaign-content .service-campaign-headline > span {
  display: inline;
}
.service-campaign-more .service-campaign-headline {
  letter-spacing: -0.03em;
}
@media (max-width: 760px) {
  .service-campaign-content .service-campaign-headline {
    font-size: 31px;
    line-height: 1.25;
    letter-spacing: -0.03em;
  }
}
@media (max-width: 359px) {
  .service-campaign-content .service-campaign-headline {
    font-size: 27px;
  }
}

/* EC fees (2026-11-16, kept for structure 2): yen amounts run longer than 「30万円〜」. Sizes that keep
   "From ¥2,000,000" on one line in every card; "incl. tax" may go to the next line. The Japanese names and lines are
   tracked wide for slow reading; Latin letters get their usual spacing back. */
@media (min-width: 1101px) {
  .plan-amount {
    font-size: 42px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .plan-amount {
    font-size: 26px;
  }
}
@media (max-width: 760px) {
  .plan-amount {
    font-size: 30px;
  }
  .plan-unit {
    font-size: 15px;
  }
}
.plan-name {
  letter-spacing: 0.005em;
}
.offer-notes p {
  letter-spacing: 0.01em;
}

/* Policies: "Established …" and "Revised …" take two lines on phones; Revised starts its own line and the title rises
   by one line of the dates, so the two never meet (owner 2026-11-17: 「ポリシーのタイトル被ってる」). */
@media (max-width: 480px) {
  .policy-cover .cover-rev {
    display: block;
    margin-left: 0;
  }
  .policy-cover:has(.cover-rev) h1 {
    bottom: calc(52px + 13px * 1.9);
  }
}
