/* =========================================================
   信息技术社 — Information Technology Club
   Static site for Cloudflare Pages
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #eef3ff;
  --surface: #ffffff;
  --ink: #0a1f4d;
  --muted: #65739b;
  --line: #dbe3f6;
  --line-strong: #b9c7ea;
  --blue: #1f4bff;
  --blue-soft: #8fa3ff;
  --navy: #071a46;
  --white: #ffffff;
  --header-h: 80px;
  --gutter: clamp(20px, 4vw, 56px);
  --display: "STXihei", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sans: "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3, figure { margin: 0; }
::selection { background: var(--blue); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(calc(100% - var(--gutter) * 2), 1360px);
  margin-inline: auto;
}

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

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--blue);
  transition: right 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav a:hover,
.nav a.is-active { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { right: 0; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 3px;
  padding: 10px 14px;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: background-color 0.2s ease;
}

.header-cta span {
  font-family: var(--mono);
  font-size: 10px;
}

.header-cta:hover { background: var(--ink); }

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

.hero {
  display: flex;
  flex-direction: column;
  padding: clamp(38px, 4.5vw, 54px) 0 clamp(24px, 3.5vw, 38px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: stretch;
  gap: 24px;
  min-height: 480px;
}

.hero-main {
  display: flex;
  grid-column: span 8;
  flex-direction: column;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--blue);
  flex-shrink: 0;
}

.eyebrow-sep { color: var(--line-strong); }

.hero-title {
  display: flex;
  flex-wrap: wrap;
  margin-top: clamp(34px, 4.5vh, 58px);
  color: var(--blue);
  font-family: var(--display);
  font-size: clamp(64px, 7.8vw, 112px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
  animation: hero-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title > span { display: inline-block; }

.title-mark {
  display: inline-block;
  width: 0.09em;
  height: 0.09em;
  margin-left: 0.08em;
  background: var(--blue);
  vertical-align: 0.62em;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: auto;
  padding-top: clamp(34px, 5vh, 54px);
  border-top: 1px solid var(--line);
}

.hero-lead {
  max-width: 22em;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 13px 16px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: background-color 0.2s ease;
}

.btn span {
  font-family: var(--mono);
  font-size: 11px;
}

.btn:hover { background: var(--ink); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link span {
  font-family: var(--mono);
  font-size: 10px;
}

.text-link:hover {
  color: var(--blue);
  border-color: var(--blue);
}

/* Hero color block */

.hero-panel {
  display: flex;
  grid-column: span 4;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px;
  padding: 24px;
  background: var(--blue);
  color: var(--white);
  animation: panel-in 0.8s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.panel-glyph {
  align-self: flex-end;
  margin: 12px 0 28px;
  font-size: clamp(108px, 12vw, 182px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.72;
}

.panel-list { width: 100%; }

.panel-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.panel-row span,
.panel-row em {
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.08em;
  opacity: 0.66;
  text-transform: uppercase;
}

.panel-row b {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-footline {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Shared section heading ---------- */

.section-head {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(40px, 6vw, 72px);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.section-no {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.section-head h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.section-en {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Intro ---------- */

.intro { padding: clamp(76px, 10vw, 132px) 0 clamp(80px, 11vw, 150px); }

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(32px, 5vw, 80px);
}

.intro-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 260px;
  padding-top: 0.6em;
}

.aside-kicker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aside-line {
  width: 38px;
  height: 1px;
  background: var(--blue);
}

.aside-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.intro-copy {
  max-width: 21em;
  font-size: clamp(27px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.58;
  text-wrap: pretty;
}

.intro-copy::selection { background: var(--ink); color: var(--bg); }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 18px 0;
  border-right: 1px solid var(--line);
}

.value:last-child { border-right: 0; }

.value b {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.value span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.services {
  padding: clamp(72px, 9vw, 118px) 0 clamp(70px, 7vw, 100px);
  background: var(--bg-alt);
}

.services .section-head { border-top-color: var(--line-strong); }

.services-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(34px, 4vw, 48px);
}

.services-title {
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.services-summary {
  max-width: 30em;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.8;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.service-card {
  display: flex;
  grid-column: span 6;
  flex-direction: column;
  justify-content: space-between;
  min-height: 236px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--ink);
  color: var(--ink);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-12 { grid-column: span 12; }

.service-card:hover,
.service-card:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.22s ease;
}

.card-arrow {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.22s ease;
}

.service-card:hover .card-index,
.service-card:focus-visible .card-index { color: rgba(255, 255, 255, 0.7); }

.service-card:hover .card-arrow,
.service-card:focus-visible .card-arrow { transform: translate(4px, -4px); }

.card-body { display: block; margin-top: 44px; }

.card-title,
.card-desc,
.cta-title,
.cta-desc { display: block; }

.card-title {
  font-size: clamp(26px, 2.45vw, 34px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.card-desc {
  max-width: 28em;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  line-height: 1.7;
  transition: color 0.22s ease;
}

.service-card:hover .card-desc,
.service-card:focus-visible .card-desc { color: rgba(255, 255, 255, 0.78); }

.service-card--cta {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) 56px;
  align-items: end;
  gap: 32px;
  min-height: 176px;
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.service-card--cta:hover,
.service-card--cta:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
}

.service-card--cta .card-index { color: rgba(255, 255, 255, 0.66); }

.cta-title {
  font-size: clamp(34px, 4.1vw, 54px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.cta-desc {
  max-width: 26em;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  line-height: 1.7;
}

.cta-arrow {
  justify-self: end;
  font-family: var(--mono);
  font-size: 42px;
  line-height: 0.8;
  transition: transform 0.22s ease;
}

.service-card--cta:hover .cta-arrow,
.service-card--cta:focus-visible .cta-arrow { transform: translate(5px, -5px); }

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

.site-footer {
  padding: clamp(64px, 8vw, 108px) 0 24px;
  background: var(--navy);
  color: var(--white);
}

.site-footer .section-head { border-top-color: rgba(255, 255, 255, 0.2); }
.site-footer .section-no { color: var(--blue-soft); }
.site-footer .section-en { color: rgba(255, 255, 255, 0.42); }

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: 44px;
  margin: clamp(40px, 6vw, 66px) 0 clamp(64px, 9vw, 112px);
}

.footer-title {
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.1;
}

.footer-title .title-mark { background: var(--blue-soft); }

.footer-contact {
  display: flex;
  justify-self: end;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 4px;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-email span {
  font-family: var(--mono);
  font-size: 12px;
}

.footer-email:hover {
  color: var(--blue-soft);
  border-color: var(--blue-soft);
}

.footer-note {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.clock-dot {
  width: 4px;
  height: 4px;
  background: var(--blue-soft);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s ease;
}

.to-top:hover { color: var(--white); }

/* ---------- 404 ---------- */

.not-found {
  display: flex;
  min-height: calc(100svh - var(--header-h));
  align-items: center;
  padding: clamp(64px, 10vw, 120px) 0;
}

.not-found-inner { max-width: 860px; }

.not-found h1 {
  margin: 26px 0 18px;
  font-size: clamp(52px, 9vw, 132px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.not-found p {
  max-width: 30em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.not-found .btn { margin-top: 32px; }

/* ---------- Motion ---------- */

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid { gap: 18px; }
  .hero-panel { min-height: 480px; padding: 20px; }
  .panel-row b { font-size: 18px; }
  .panel-row { grid-template-columns: 22px 1fr auto; gap: 8px; }
  .card-body { margin-top: 34px; }
}

@media (max-width: 900px) {
  .hero { padding-bottom: 36px; }
  .hero-grid { display: block; min-height: 0; }
  .hero-panel { display: none; }
  .hero-title { font-size: clamp(58px, 9vw, 88px); }
  .hero-bottom { padding-top: 44px; }
  .hero-footline { display: none; }

  .intro-grid { grid-template-columns: 1fr; gap: 34px; }
  .intro-aside { flex-direction: row; align-items: center; max-width: none; padding-top: 0; }
  .aside-note { display: none; }
  .intro-copy { max-width: 24em; }

  .services-top { display: block; }
  .services-summary { margin-top: 18px; }
  .service-card,
  .span-7,
  .span-5,
  .span-12 { grid-column: span 12; }
  .service-card { min-height: 210px; }

  .footer-main { grid-template-columns: 1fr; gap: 34px; }
  .footer-contact { justify-self: start; }
}

@media (max-width: 620px) {
  :root { --header-h: 68px; }

  .header-inner { gap: 16px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 9px; }
  .brand-name { font-size: 12px; letter-spacing: 0.06em; }
  .nav { gap: 15px; }
  .nav a { font-size: 11px; letter-spacing: 0.04em; }
  .header-cta { display: none; }

  .hero { padding-top: 32px; padding-bottom: 28px; }
  .hero-title {
    margin-top: 34px;
    font-size: clamp(48px, 13.5vw, 70px);
    line-height: 1.04;
  }
  .hero-bottom {
    display: block;
    padding-top: 36px;
    margin-top: 40px;
  }
  .hero-lead br { display: none; }
  .hero-actions { margin-top: 26px; flex-wrap: wrap; gap: 16px 22px; }
  .btn { gap: 26px; }

  .section-head { grid-template-columns: 28px 1fr auto; gap: 9px; margin-bottom: 38px; }
  .section-head h2 { font-size: 11px; }
  .section-en { font-size: 7px; }

  .intro { padding-top: 64px; padding-bottom: 82px; }
  .intro-copy { font-size: clamp(25px, 7.4vw, 34px); line-height: 1.62; }
  .values { margin-top: 38px; }
  .value { display: block; padding: 14px 12px 15px 0; }
  .value b { font-size: 18px; }
  .value span { display: block; margin-top: 3px; }

  .services { padding-top: 64px; padding-bottom: 60px; }
  .services-title { font-size: clamp(36px, 10.5vw, 48px); }
  .services-summary { font-size: 12px; }
  .services-grid { gap: 10px; }
  .service-card { min-height: 176px; padding: 20px; }
  .card-body { margin-top: 28px; }
  .card-title { font-size: 25px; }
  .card-desc { font-size: 12px; }

  .service-card--cta {
    display: flex;
    min-height: 200px;
    gap: 20px;
    align-items: stretch;
  }
  .cta-title { font-size: 36px; }
  .cta-desc { font-size: 12px; }
  .cta-arrow { align-self: flex-end; font-size: 36px; }

  .site-footer { padding-top: 64px; }
  .footer-title { font-size: clamp(34px, 10vw, 48px); }
  .footer-email { font-size: clamp(19px, 5.4vw, 26px); gap: 8px; }
  .footer-bottom {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 9px 18px;
    padding-bottom: 10px;
  }
  .footer-bottom .footer-mid { order: 5; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
