/* HKTI Incorporation Japan — stylesheet
   Tokens on :root, redefined wholesale for the dark scheme. No literal
   colours in rules that sit under text. */

:root {
  --font-sans: "IBM Plex Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --ink:        #0e1620;
  --ink-2:      #3c4b5c;
  --ink-3:      #6b7a8b;
  --paper:      #ffffff;
  --paper-2:    #f3f5f7;
  --paper-3:    #e8ecf0;
  --plate:      #ffffff;
  --plate-ink:  #4a5765;
  --plate-veil: rgba(255, 255, 255, 0.86);
  --plate-rule: rgba(11, 74, 155, 0.07);
  --rule:       #d4dae1;
  --rule-soft:  #e4e9ee;

  --blue:       #0b4a9b;
  --blue-ink:   #08366f;
  --blue-soft:  #e6eef9;
  --on-blue:    #ffffff;

  --focus:      #0b4a9b;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --gutter: 1rem;
  --maxw: 1180px;

  /* Heading scale, as a multiplier on the design's own clamps — so a
     tenant who wants bigger headings keeps the responsive shape
     instead of shouting on a phone. */
  --h1-scale: 1;
  --h2-scale: 1;

  --r1: 2px;
  --r2: 4px;
  --r3: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e8edf3;
    --ink-2:      #adbac8;
    --ink-3:      #8795a4;
    --paper:      #0c1118;
    --paper-2:    #121922;
    --paper-3:    #1a2330;
    --plate:      #f4f6f8;
    --plate-ink:  #3a4653;
    --plate-veil: rgba(244, 246, 248, 0.9);
    --plate-rule: rgba(11, 74, 155, 0.1);
    --rule:       #2b3542;
    --rule-soft:  #222b36;

    --blue:       #74a9f0;
    --blue-ink:   #a8c9f7;
    --blue-soft:  #16243a;
    --on-blue:    #07101d;

    --focus:      #74a9f0;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-ink); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r1);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: var(--s3) var(--s4);
  z-index: 10;
}
.skip-link:focus { left: var(--s4); top: var(--s4); }

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-header__inner {
  display: grid;
  gap: var(--s3);
  padding-block: var(--s3);
  grid-template-columns: 1fr;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

/* The real logo, when the owner has uploaded one.

   Never squeezed into the 40x40 mark: this one is a 2.16:1 rectangle, and a
   square slot would either crop its ends off or squash the wordmark. Height
   is fixed so the header bar keeps its rhythm; width follows the file. */
.brand__logo {
  flex: none;
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  border-radius: var(--r2);
}

.brand__mark {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: var(--r2);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--blue);
}

.brand__text { display: grid; min-width: 0; }
.brand__name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.brand__sub { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); }

.header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.header-contact__item { color: var(--ink); text-decoration: none; }
.header-contact__item:hover { color: var(--blue); text-decoration: underline; }
.header-contact__item--tel::before { content: "TEL "; color: var(--ink-3); }
.header-contact__item--mail::before { content: "MAIL "; color: var(--ink-3); }

.site-nav { border-top: 1px solid var(--rule-soft); padding-top: var(--s3); }
.site-nav__list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.site-nav__link {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding-block: 2px;
}
.site-nav__link:hover { color: var(--blue); text-decoration: underline; }

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--rule); }
.hero__inner { padding-block: var(--s7) var(--s7); display: grid; gap: var(--s4); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero__title {
  font-size: calc(clamp(2rem, 7vw, 3.75rem) * var(--h1-scale));
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.hero__lede {
  font-size: clamp(1.0625rem, 2.4vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
}

.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }

.btn {
  display: inline-block;
  padding: var(--s3) var(--s5);
  border-radius: var(--r2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid var(--blue);
  min-height: 44px;
  line-height: 1.5;
}
.btn--primary { background: var(--blue); color: var(--on-blue); }
.btn--primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: var(--on-blue); }
.btn--ghost { background: transparent; color: var(--blue); font-family: var(--font-mono); font-weight: 500; }
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue-ink); }

.hero__facts {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule-soft);
}
.hero__fact-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s1);
}
.hero__fact-val { font-size: 0.9375rem; color: var(--ink); display: grid; gap: var(--s2); }

/* ---------- sections ---------- */

.section { padding-block: var(--s7); border-bottom: 1px solid var(--rule); }
.section--alt { background: var(--paper-2); }

.section__head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: 58ch; }
.section__title { font-size: calc(clamp(1.5rem, 4vw, 2.125rem) * var(--h2-scale)); letter-spacing: -0.02em; }
.section__note { color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- capabilities ---------- */

.cap-grid { display: grid; gap: var(--s5); }

.cap-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  padding: var(--s5);
  display: grid;
  gap: var(--s4);
  align-content: start;
}
.cap-card__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.cap-card__title { font-size: 1.25rem; }
.cap-card__quote {
  margin: 0;
  padding-left: var(--s4);
  border-left: 2px solid var(--blue);
  display: grid;
  gap: var(--s2);
}
.cap-card__quote p { color: var(--ink); font-size: 1rem; line-height: 1.55; }
.cap-card__source {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* ---------- products ---------- */

.product-group { margin-bottom: var(--s7); }
.product-group:last-child { margin-bottom: 0; }
.product-group__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s5);
  font-weight: 500;
}

.product-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.product {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  padding: var(--s3);
  display: grid;
  gap: var(--s3);
  grid-template-rows: auto 1fr auto;
  align-content: start;
}

.product__plate {
  aspect-ratio: 1 / 1;
  background: var(--plate);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r2);
  display: grid;
  place-items: center;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 7px,
    var(--plate-rule) 7px 8px
  );
}

.slot__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--plate-ink);
  background: var(--plate-veil);
  padding: 2px 6px;
  border-radius: var(--r1);
}

.product__name {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  align-self: start;
}

/* ---------- partnership ---------- */

.partner { display: grid; gap: var(--s5); align-items: center; }
.partner__body { display: grid; gap: var(--s4); max-width: 54ch; }
.partner__claim { font-size: 1.0625rem; color: var(--ink-2); }
.partner__claim strong { color: var(--ink); font-weight: 600; }

.partner__slot {
  aspect-ratio: 16 / 9;
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  display: grid;
  place-items: center;
  padding: var(--s4);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 7px,
    var(--plate-rule) 7px 8px
  );
}

/* ---------- news ---------- */

.news-grid { display: grid; gap: var(--s5); }

.news {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  padding: var(--s5);
  display: grid;
  gap: var(--s4);
  align-content: start;
}
.news__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.news__title { font-size: 1.1875rem; line-height: 1.25; max-width: 34ch; }
.news__body { display: grid; gap: var(--s3); color: var(--ink-2); font-size: 0.9375rem; max-width: 60ch; }

/* ---------- company ---------- */

.company { display: grid; gap: var(--s6); align-items: start; max-width: 720px; }

.spec { display: grid; border-top: 1px solid var(--rule); }
.spec__row {
  display: grid;
  gap: var(--s1) var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule-soft);
}
.spec__key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.spec__val { font-size: 0.9375rem; color: var(--ink); display: grid; gap: var(--s2); }
.addr { display: block; }
.maplink { font-family: var(--font-mono); font-size: 0.8125rem; justify-self: start; }

/* ---------- contact ---------- */

.contact { display: grid; gap: var(--s6); align-items: start; }
.contact__intro { display: grid; gap: var(--s4); }
.contact__lede { color: var(--ink-2); font-size: 1rem; }

.form {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  padding: var(--s5);
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}
.form__field { display: grid; gap: var(--s2); }
.form__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.form__input,
.form__select,
.form__textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r2);
  padding: var(--s3);
  min-height: 44px;
  width: 100%;
}
.form__textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.form__input::placeholder,
.form__textarea::placeholder { color: var(--ink-3); }
.form__input:focus-visible,
.form__select:focus-visible,
.form__textarea:focus-visible { border-color: var(--focus); }
.form__actions { display: grid; gap: var(--s3); justify-items: start; }
.form__actions .btn { cursor: pointer; }

/* ---------- footer ---------- */

.site-footer { background: var(--paper); padding-block: var(--s6); }
.site-footer__inner { display: grid; gap: var(--s5); }
.site-footer__block { display: grid; gap: var(--s2); }
.site-footer__name { font-weight: 600; }
.site-footer__addr { color: var(--ink-2); font-size: 0.875rem; max-width: 46ch; }
.site-footer__contact { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); }
.site-footer__list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.site-footer__item a { color: var(--ink-2); text-decoration: none; font-size: 0.875rem; }
.site-footer__item a:hover { color: var(--blue); text-decoration: underline; }
.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  border-top: 1px solid var(--rule-soft);
  padding-top: var(--s4);
}

/* ---------- larger screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
  .hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec__row { grid-template-columns: 180px minmax(0, 1fr); }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__field--wide, .form__actions { grid-column: 1 / -1; }
  .form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s4); }
}

@media (min-width: 900px) {
  :root { --gutter: 2rem; }
  .site-header__inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    row-gap: var(--s3);
    padding-block: var(--s4);
  }
  .header-contact { justify-self: end; }
  .site-nav { grid-column: 1 / -1; }
  .hero__inner { padding-block: var(--s9) var(--s8); }
  /* Copy and picture side by side; the facts row stays full width below. */
  .hero--figure .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: var(--s7);
    align-items: center;
  }
  .hero--figure .hero__copy { grid-column: 1; }
  .hero--figure .hero__media { grid-column: 2; grid-row: 1; }
  .hero--figure .hero__facts { grid-column: 1 / -1; }
  .section { padding-block: var(--s8); }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s7); }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s7); }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__nav { justify-self: end; }
  .site-footer__copy { grid-column: 1 / -1; }
}

/* ---------- hero photograph ---------- */

/* The hero reads as a single left-aligned column until there is room beside
   it, then the copy and the picture sit side by side and the facts stay full
   width underneath. The design shipped without a photograph because the only
   one available is a city skyline, and a generic city is worse than nothing —
   so the slot renders only when it is filled, and the hero keeps its original
   single-column shape when it is not. */
.hero__figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  background: var(--paper-2);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Biased upward: the skyline and the sky are the subject, the rooftop in
     the foreground is not. */
  object-position: center 35%;
}

.hero__caption {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

/* ---------- a filled slot ---------- */

/* Empty, each plate is the labelled frame the design shipped. Filled, it holds
   an <img> that must take the PLATE's shape rather than its own: the plates
   carry an aspect-ratio, and without object-fit the browser squashes the
   picture into it. The striped backing belongs to the empty state, so a filled
   plate paints over it.

   `contain`, not `cover`, for both: every product shot is 700x700 on white and
   the partner lockup is two logos — cropping either would cut the subject. */
.product__img,
.partner__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--plate);
}
