/* ==========================================================================
   SHIBEHASU — 株式会社シベハス
   Corporate site stylesheet
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */

:root {
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;

  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --text: #14161a;
  --text-muted: #5b6472;
  --text-faint: #8a929e;
  --line: #e3e7ec;
  --line-strong: #d3d9e0;
  --accent: #23456e;
  --accent-hover: #16304f;
  --focus: #2f6fd0;

  --maxw: 1040px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 10px;
  --section-y: clamp(3.5rem, 9vw, 6.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --bg-subtle: #141920;
    --surface: #141920;
    --text: #e9ecf1;
    --text-muted: #a3adbb;
    --text-faint: #7d8794;
    --line: #242b35;
    --line-strong: #303945;
    --accent: #9dbde3;
    --accent-hover: #bcd3f0;
    --focus: #7fb0ff;
  }
}

/* --- Base --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

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

/* --- Layout helpers ----------------------------------------------------- */

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

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}

.section--subtle {
  background: var(--bg-subtle);
}

.section__head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__title {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 4rem;
  padding-block: 0.75rem;
}

.brand {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* On narrow screens the nav wraps to a second line; a sticky header would then
   eat close to a third of the viewport, so let it scroll away instead. */
@media (max-width: 46rem) {
  .site-header {
    position: static;
  }

  .site-header__inner {
    min-height: 0;
    gap: 0.25rem 1rem;
  }

  .nav {
    gap: 0.25rem 1.25rem;
  }

  html {
    scroll-padding-top: 1rem;
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding-block: clamp(4rem, 12vw, 8rem) clamp(3.5rem, 9vw, 6.5rem);
}

.hero__eyebrow {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.hero__title {
  font-size: clamp(2.75rem, 10vw, 4.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.hero__tagline {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  max-width: 34ch;
  color: var(--text);
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero__lead {
  margin-top: 1.75rem;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1rem;
}

.hero__lead + .hero__lead {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}

/* --- Prose -------------------------------------------------------------- */

.prose {
  max-width: 68ch;
}

.prose p + p {
  margin-top: 1.25rem;
}

.prose .en {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- Services ----------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card__index {
  display: block;
  margin-bottom: 1rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.card__title {
  font-size: 1.0625rem;
}

.card__title-ja {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.card__body {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- Company profile ---------------------------------------------------- */

.profile {
  margin: 0;
  border-top: 1px solid var(--line);
}

.profile__row {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 0 2rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.profile dt {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.profile dt .en {
  display: block;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.profile dd {
  margin: 0;
  font-size: 0.9375rem;
}

@media (max-width: 40rem) {
  .profile__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* --- Contact ------------------------------------------------------------ */

.contact__mail {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: clamp(1.0625rem, 3.4vw, 1.375rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.contact__note {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  padding-block: 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

.copyright {
  color: var(--text-faint);
}

/* --- Legal pages -------------------------------------------------------- */

.page-head {
  padding-block: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-head__title {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
}

.page-head__title-en {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.page-head__meta {
  margin-top: 1.5rem;
  color: var(--text-faint);
  font-size: 0.8125rem;
}

/* .legal is also a .wrap, so keep the page container's width here and put the
   reading measure on the blocks inside — otherwise the body centres itself and
   stops lining up with the page title above it. */
.legal {
  padding-bottom: var(--section-y);
}

.legal__intro,
.legal section,
.legal > p {
  max-width: 72ch;
}

.legal__intro {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.legal__intro p + p {
  margin-top: 0.9rem;
}

.legal__intro .en {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legal section {
  padding-top: 2.5rem;
}

.legal h2 {
  font-size: 1.125rem;
}

.legal h2 .en {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal p {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
}

.legal p.en {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legal ul {
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.legal li + li {
  margin-top: 0.4rem;
}

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.875rem;
}
