/* ============================================
   株式会社SME — Corporate Site
   Layout/typography traced from reference (TCD MONAD)
   Color: brand blue
   ============================================ */

:root {
  --blue:        #2563eb;
  --blue-dark:   #1e3a8a;
  --blue-light:  #38bdf8;
  --navy:        #0f172a;
  --ink:         #1f2733;
  --muted:       #64748b;
  --line:        #e3e9f2;
  --bg:          #ffffff;
  --bg-soft:     #f4f8fd;

  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --en:    "Cormorant Garamond", serif;

  --header-h: 88px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 2;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.03em;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s var(--ease), opacity .3s var(--ease); }
ul { list-style: none; }

.container { width: 90%; max-width: var(--maxw); margin-inline: auto; }
.sp { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .08em;
  padding: .85em 1.8em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(120deg, var(--blue-light), var(--blue));
  color: #fff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .25);
}
.btn--primary:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,99,235,.32); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--line { background: rgba(255,255,255,.9); color: var(--blue-dark); border-color: rgba(255,255,255,.7); }
.btn--line:hover { background: #fff; transform: translateY(-2px); }
.btn--lg { font-size: 1rem; padding: 1.05em 2.4em; }

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: height .4s var(--ease), box-shadow .4s var(--ease);
}
/* backdrop-filter は ::before に分離 — 本体に適用すると fixed 子要素の
   含有ブロックが変わり gnav の position:fixed が崩れるため */
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(0px);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease);
  z-index: -1;
  pointer-events: none;
}
.header.is-scrolled::before {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}
.header.is-scrolled {
  height: 72px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
.header__inner {
  height: 100%;
  width: 92%;
  max-width: 1320px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__logo { flex-shrink: 0; }
.header__logo img { height: 38px; width: auto; transition: height .4s var(--ease); }
.header.is-scrolled .header__logo img { height: 32px; }

.gnav { margin-left: auto; }
.gnav__list { display: flex; gap: 2rem; }
.gnav__list a {
  position: relative;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
  padding: .3em 0;
}
.gnav__list a span {
  font-family: var(--en);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--blue);
  text-transform: uppercase;
  opacity: .7;
  margin-top: 5px;
  display: inline-block;
}
.gnav__list a::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 50%;
  width: 0; height: 1.5px;
  background: var(--blue);
  transform: translateX(-50%);
  transition: width .3s var(--ease);
}
.gnav__list a:hover { color: var(--blue); }
.gnav__list a:hover::after { width: 100%; }

.header__actions { display: flex; gap: .6rem; flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none;
  position: relative; cursor: pointer;
  z-index: 110;
}
.hamburger span {
  position: absolute; left: 9px;
  width: 26px; height: 2px;
  background: var(--ink);
  transition: all .35s var(--ease);
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: calc(var(--header-h) + 6vh) 0 200px;
  overflow: hidden;
  background: linear-gradient(160deg, #eaf3ff 0%, #f7fbff 45%, #ffffff 100%);

}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
}
.hero__orb--1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle at 30% 30%, var(--blue-light), transparent 70%);
  top: -120px; right: -80px;
  animation: float1 16s ease-in-out infinite;
}
.hero__orb--2 {
  width: 460px; height: 460px;
  background: radial-gradient(circle at 60% 40%, #93c5fd, transparent 70%);
  bottom: -140px; left: -100px;
  animation: float2 20s ease-in-out infinite;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 70% 50%, #000 0%, transparent 70%);
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,40px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-30px)} }

.hero__catch {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: var(--maxw);
  margin-inline: auto;
  text-align: center;
}
.hero__lead {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: .08em;
  margin-bottom: .2em;
  opacity: 0;
  animation: rise .9s var(--ease) .2s forwards;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  letter-spacing: .04em;
  margin-bottom: .6em;
  opacity: 0;
  animation: rise 1s var(--ease) .35s forwards;
}
.hero__sub {
  font-size: clamp(.95rem, 1.6vw, 1.1rem);
  line-height: 2.2;
  color: var(--ink);
  margin-bottom: 2.2em;
  opacity: 0;
  animation: rise 1s var(--ease) .55s forwards;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: rise 1s var(--ease) .7s forwards;
}
.hero__cta .btn {
  min-width: 200px;
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

/* News ticker */
.ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  height: 64px;
  padding-inline: clamp(1rem, 5vw, 5rem);
}
.ticker__label {
  font-family: var(--en);
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--blue);
  padding-right: 1.6rem;
  margin-right: 1.6rem;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  font-size: .85rem;
}
.ticker__list { position: relative; flex: 1; height: 1.8em; overflow: hidden; }
.ticker__list li {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 1.4rem;
  opacity: 0;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transform: translateY(8px);
  font-size: .9rem;
}
.ticker__list li.is-active { opacity: 1; transform: translateY(0); }
.ticker__list time { color: var(--muted); font-family: var(--en); letter-spacing: .05em; flex-shrink: 0; }
.ticker__list a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker__list a:hover { color: var(--blue); }

.hero__scroll {
  position: absolute;
  bottom: 64px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--en);
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--muted);
  writing-mode: vertical-rl;
  padding-bottom: 50px;
}
.hero__scroll::after {
  content: ""; position: absolute;
  bottom: 0; left: 50%;
  width: 1px; height: 40px;
  background: var(--blue);
  animation: scrolldown 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrolldown { 0%{transform:scaleY(0);transform-origin:top} 50%{transform:scaleY(1);transform-origin:top} 50.1%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ===== Section common ===== */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head--center { text-align: center; }
.sec-head__en {
  display: block;
  font-family: var(--en);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  letter-spacing: .12em;
  color: var(--blue);
  margin-bottom: .4em;
}
.sec-head__ja {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
  letter-spacing: .05em;
}
.sec-head__desc { margin-top: 1.4em; color: var(--muted); font-size: 1rem; }
.sec-head--center .sec-head__desc { max-width: 640px; margin-inline: auto; }

/* ===== About ===== */
.about { background: var(--bg); }
.about__body {
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 2.5;
  color: var(--ink);
}
.about__body p + p { margin-top: 1.8em; }

/* ===== Service ===== */
.service { background: var(--bg-soft); }
.service__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 44px 34px;
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 44px rgba(15,23,42,.10); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__no {
  font-family: var(--en);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--blue);
  opacity: .35;
  line-height: 1;
}
.card__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: .4em;
  line-height: 1.5;
}
.card__lead {
  font-family: var(--en);
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--blue);
  margin-bottom: 1em;
  text-transform: uppercase;
}
.card__text { font-size: .92rem; line-height: 1.95; color: var(--muted); }
.card--cta {
  background: linear-gradient(150deg, var(--blue-dark), var(--blue));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: .8rem;
  color: #fff;
}
.card--cta::before { display: none; }
.card--cta:hover { transform: translateY(-8px); }
.card--cta .card__title { color: #fff; margin-top: 0; }
.card--cta .card__text { color: rgba(255,255,255,.85); margin-bottom: .6rem; }
.card--cta .btn--primary { background: #fff; color: var(--blue-dark); box-shadow: none; }

/* ===== Strength ===== */
.strength { background: var(--bg); }
.strength__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.strength__item { text-align: center; padding: 0 1rem; }
.strength__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px solid var(--blue);
  font-family: var(--en);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 1.4rem;
}
.strength__item h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .8em;
}
.strength__item p { font-size: .95rem; line-height: 2; color: var(--muted); }

/* ===== News ===== */
.news { background: var(--bg-soft); }
.news__list { border-top: 1px solid var(--line); max-width: 880px; }
.news__list li {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.5rem .5rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.news__list time { font-family: var(--en); color: var(--muted); letter-spacing: .05em; flex-shrink: 0; }
.news__cat {
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  padding: .15em 1.1em;
  flex-shrink: 0;
}
.news__list a { font-size: .98rem; flex: 1; min-width: 200px; }
.news__list a:hover { color: var(--blue); }

/* ===== Company ===== */
.company { background: var(--bg); }
.company__table {
  width: 100%;
  max-width: 860px;
  border-collapse: collapse;
  font-size: .98rem;
}
.company__table th,
.company__table td {
  text-align: left;
  padding: 1.4rem 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.9;
}
.company__table th {
  width: 28%;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--serif);
  white-space: nowrap;
}
.company__table td a:hover { color: var(--blue); }

/* ===== Contact ===== */
.contact { background: var(--bg); padding-bottom: clamp(80px,11vw,150px); }
.contact__box {
  background: linear-gradient(150deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 130%);
  border-radius: 16px;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 64px);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(37,99,235,.28);
}
.contact__box .sec-head__en { color: rgba(255,255,255,.85); }
.contact__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .04em;
  margin-bottom: .6em;
}
.contact__text { font-size: 1rem; line-height: 2.1; opacity: .92; margin-bottom: 2.4em; }
.contact__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { background: var(--navy); color: rgba(255,255,255,.78); padding: 72px 0 0; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 56px;
}
.footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 1.4rem;
}
.footer__addr { font-size: .85rem; line-height: 2; }
.footer__nav ul { display: grid; grid-template-columns: repeat(2, auto); gap: .7rem 2.5rem; }
.footer__nav a { font-size: .9rem; }
.footer__nav a:hover { color: var(--blue-light); }
.footer__copy {
  text-align: center;
  font-family: var(--en);
  font-size: .78rem;
  letter-spacing: .12em;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.55);
}

/* ===== Page top ===== */
.pagetop {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all .4s var(--ease);
  box-shadow: 0 8px 20px rgba(37,99,235,.3);
}
.pagetop.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.pagetop:hover { background: var(--blue-dark); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .service__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .sp { display: inline; }

  .header__inner { justify-content: space-between; gap: 0; }
  .header__actions { display: none; }
  .hamburger { display: block; flex-shrink: 0; }

  .gnav {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(8px);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding-block: calc(var(--header-h) + 2rem) 3rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s var(--ease);
  }
  .gnav.is-open { opacity: 1; pointer-events: auto; }
  .gnav__list { flex-direction: column; gap: 2rem; text-align: center; }
  .gnav__list a { font-size: 1.15rem; }
  .gnav__list a span { font-size: .7rem; margin-top: .2em; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }
  .strength__list { grid-template-columns: 1fr; gap: 40px; }
  .ticker { height: auto; flex-wrap: wrap; padding: 14px 6%; gap: .4rem .8rem; }
  .ticker__label { padding-right: .9rem; margin-right: .9rem; }
  .hero { padding-bottom: 150px; }
  .hero__scroll { display: none; }
  .footer__inner { flex-direction: column; gap: 2rem; }
}

@media (max-width: 560px) {
  .service__grid { grid-template-columns: 1fr; }
  .hero__cta .btn, .contact__actions .btn { width: 100%; }
  .company__table th, .company__table td { display: block; width: 100%; padding: .6rem 0; border: none; }
  .company__table th { padding-top: 1.2rem; }
  .company__table tr { display: block; border-bottom: 1px solid var(--line); padding: .6rem 0; }
  .news__list li { gap: .6rem 1rem; }
  .footer__nav ul { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__lead, .hero__title, .hero__sub, .hero__cta { opacity: 1; animation: none; }
}
