/* ときわ台化成 ホームページ 共通スタイル */
:root {
  --navy: #1b2d43;
  --navy-deep: #101c2b;
  --blue: #1f5fa8;
  --accent: #e2622a;
  --ink: #1c2430;
  --muted: #5b6676;
  --line: #dfe4ea;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --radius: 6px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.4; margin: 0; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo img { height: 48px; width: auto; }
.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.global-nav a {
  display: block; padding: 10px 16px; color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: 15px; border-radius: var(--radius);
}
.global-nav a:hover { color: var(--blue); background: var(--bg-soft); }
.global-nav a[aria-current="page"] { color: var(--blue); }
.global-nav .nav-cta a { background: var(--navy); color: #fff; margin-left: 8px; }
.global-nav .nav-cta a:hover { background: var(--blue); color: #fff; }
.header-tel { display: none; }

.menu-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  width: 48px; height: 48px;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 26px; height: 2px; background: var(--navy); position: relative;
  transition: transform .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -8px; }
.menu-toggle span::after { top: 8px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

@media (min-width: 1000px) {
  .header-tel {
    display: block; text-align: right; line-height: 1.3; margin-left: 20px;
    padding-left: 20px; border-left: 1px solid var(--line);
  }
  .header-tel small { display: block; font-size: 11px; color: var(--muted); }
  .header-tel a { font-size: 20px; font-weight: 700; color: var(--navy); text-decoration: none; letter-spacing: .03em; }
  .header-right { display: flex; align-items: center; }
}

@media (max-width: 860px) {
  .site-header .container { height: 64px; }
  .logo img { height: 38px; }
  .menu-toggle { display: block; }
  .global-nav {
    position: fixed; inset: 64px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.08);
    display: none;
  }
  .menu-open .global-nav { display: block; }
  .global-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .global-nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .global-nav .nav-cta a { margin: 12px 0 0; text-align: center; border-radius: var(--radius); border: 0; }
}

/* ---------- メインビジュアル ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy-deep);
  min-height: 560px; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-bg.is-active { opacity: 1; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-video.is-playing { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,28,43,.92) 0%, rgba(16,28,43,.72) 45%, rgba(16,28,43,.25) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-label {
  display: inline-block; font-size: 13px; letter-spacing: .2em; color: var(--accent);
  border-bottom: 1px solid var(--accent); padding-bottom: 4px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(42px, 7.2vw, 80px); font-weight: 700; letter-spacing: .03em; line-height: 1.25; }
.hero h1 .line { display: block; }
.hero p { font-size: clamp(15px, 1.8vw, 18px); margin: 20px 0 32px; opacity: .92; max-width: 34em; word-break: keep-all; overflow-wrap: anywhere; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius); font-weight: 700; text-decoration: none;
  font-size: 15px; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: #c44b17; color: #fff; }
.btn-primary:hover { background: #d4551f; }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--blue); }

/* ---------- セクション共通 ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .en {
  display: block; font-size: 13px; letter-spacing: .25em; color: var(--blue); font-weight: 700;
  text-transform: uppercase; margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); color: var(--navy); }
.section-head h2::after {
  content: ""; display: block; width: 40px; height: 3px; background: var(--accent); margin: 18px auto 0;
}
.section-head p { color: var(--muted); margin-top: 18px; }

/* ---------- 下層ページの見出し ---------- */
.page-hero {
  background: linear-gradient(rgba(16,28,43,.78), rgba(16,28,43,.78)), url(../images/contents_main.jpg) center/cover;
  color: #fff; padding: 72px 0 64px;
}
.page-hero .en { font-size: 13px; letter-spacing: .25em; color: var(--accent); font-weight: 700; }
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); margin-top: 6px; }
.page-hero .h1-note { font-size: clamp(14px, 1.6vw, 17px); font-weight: 500; margin-left: .4em; }
.page-hero .h1-note .nowrap { display: inline-block; }
@media (max-width: 600px) { .page-hero .h1-note { display: block; margin: 8px 0 0; line-height: 1.6; } }
.breadcrumb { font-size: 13px; padding: 14px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.breadcrumb a { color: var(--muted); }

/* ---------- 強み ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy);
  padding: 36px 28px; border-radius: var(--radius);
}
.feature .num { font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; font-family: Georgia, serif; }
.feature h3 { font-size: 20px; color: var(--navy); margin: 16px 0 12px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- ごあいさつ ---------- */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.about img { border-radius: var(--radius); box-shadow: 0 14px 40px rgba(27,45,67,.18); }
.about .en { font-size: 13px; letter-spacing: .25em; color: var(--blue); font-weight: 700; }
.about h2 { font-size: clamp(24px, 3vw, 32px); color: var(--navy); margin: 8px 0 24px; }
.about p { color: #3a4452; }

/* ---------- 数字で見る ---------- */
.stats { background: var(--navy); color: #fff; padding: 64px 0; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stats li + li { border-left: 1px solid rgba(255,255,255,.18); }
.stats .value { font-size: clamp(32px, 4.5vw, 46px); font-weight: 700; font-family: Georgia, serif; color: var(--accent); }
.stats .value small { font-size: 16px; color: #fff; margin-left: 4px; font-family: inherit; }
.stats .label { font-size: 14px; opacity: .85; }

/* ---------- 商品カード ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.card img { aspect-ratio: 667 / 385; object-fit: cover; width: 100%; }
.card-body { padding: 18px 20px 22px; }
.card h3 { font-size: 17px; color: var(--navy); }
.card p { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.center-btn { text-align: center; margin-top: 44px; }

/* ---------- 2つの入口 ---------- */
.links2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.link-panel {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: #fff;
  text-decoration: none; aspect-ratio: 16 / 9;
}
.link-panel img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.link-panel:hover img { transform: scale(1.05); }
.link-panel .txt {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; background: linear-gradient(transparent 30%, rgba(16,28,43,.85));
}
.link-panel .en { font-size: 12px; letter-spacing: .25em; color: var(--accent); font-weight: 700; }
.link-panel strong { font-size: 24px; }

/* ---------- お知らせ ---------- */
.news { max-width: 860px; margin: 0 auto; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.news li { display: flex; gap: 32px; padding: 20px 8px; border-bottom: 1px solid var(--line); }
.news time { color: var(--blue); font-weight: 700; white-space: nowrap; font-size: 15px; min-width: 6.5em; }

/* ---------- お問い合わせ帯 ---------- */
.contact-band { background: linear-gradient(120deg, var(--navy-deep), var(--blue)); color: #fff; padding: 72px 0; text-align: center; }
.contact-band h2 { font-size: clamp(22px, 3vw, 30px); }
.contact-band p { opacity: .9; margin: 14px 0 32px; }
.contact-boxes { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.contact-box {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius);
  padding: 20px 32px; min-width: 280px; color: #fff; text-decoration: none;
}
.contact-box small { display: block; font-size: 13px; opacity: .85; }
.contact-box strong { font-size: 28px; letter-spacing: .04em; font-family: Georgia, serif; }
.contact-box.mail strong { font-size: 20px; font-family: inherit; display: block; padding: 6px 0; }
a.contact-box:hover { background: rgba(255,255,255,.18); }

/* ---------- 表 ---------- */
.info-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--navy); }
.info-table th, .info-table td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.info-table th { width: 26%; background: var(--bg-soft); color: var(--navy); font-weight: 700; white-space: nowrap; }

/* ---------- 会社案内の写真 ---------- */
.company-photo { max-width: 760px; margin: 0 auto 40px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 40px rgba(27,45,67,.15); }
.company-photo img { width: 100%; }

/* ---------- 沿革 ---------- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 32px; padding: 14px 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 144px; top: 24px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--navy);
}
.timeline .year { font-weight: 700; color: var(--navy); font-size: 17px; }
.timeline .year small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* ---------- 地図 ---------- */
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }
.access-text { margin-top: 20px; }

/* ---------- 取扱商品リスト ---------- */
.product-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.product-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.product-group h3 { font-size: 19px; color: var(--navy); padding-bottom: 12px; border-bottom: 2px solid var(--accent); margin-bottom: 16px; }
.product-group ul { margin: 0; padding: 0; list-style: none; }
.product-group li { padding: 6px 0 6px 22px; position: relative; }
.product-group li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px; background: var(--blue); border-radius: 2px; }
.materials { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.materials li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px; font-weight: 700; color: var(--navy); }


/* ---------- フォーム ---------- */
.form { max-width: 820px; margin: 0 auto; scroll-margin-top: 90px; }
.form-row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.form-row label.head { font-weight: 700; color: var(--navy); padding-top: 10px; }
.req, .opt { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 3px; margin-left: 8px; vertical-align: 2px; font-weight: 700; }
.req { background: #b3261e; color: #fff; }
.opt { background: var(--line); color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #c3cbd6; border-radius: var(--radius);
  font: inherit; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form textarea { min-height: 180px; resize: vertical; }
.form .zip { max-width: 200px; }
.form .agree { text-align: center; padding: 32px 0 8px; }
.form .agree label { font-weight: 700; }
.form .submit { text-align: center; padding: 16px 0 0; }
.form .submit .btn { min-width: 280px; padding: 18px 30px; font-size: 16px; }
.form-note { background: var(--bg-soft); border-left: 4px solid var(--blue); padding: 16px 20px; margin-bottom: 32px; font-size: 15px; }
.form-message { margin-bottom: 24px; padding: 16px 20px; border-radius: var(--radius); display: none; }
.form-message.show { display: block; background: #fdecea; border: 1px solid #e6a49f; color: #8c1d18; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 文章ページ ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 22px; color: var(--navy); margin: 48px 0 16px; padding-left: 14px; border-left: 4px solid var(--navy); }
.prose h3 { font-size: 18px; color: var(--navy); margin: 28px 0 8px; }
.prose .sign { text-align: right; color: var(--muted); }

/* ---------- フッター ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.85); padding: 56px 0 24px; font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-company strong { font-size: 18px; color: #fff; display: block; margin-bottom: 8px; }
.footer-company a { color: inherit; text-decoration: none; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 40px; }
.footer-nav a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; font-size: 12px; opacity: .7; }

.pagetop {
  position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: opacity .3s; font-size: 20px;
}
.pagetop.show { opacity: 1; pointer-events: auto; }

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .hero { min-height: 480px; }
  .features, .cards { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .stats ul { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .stats li:nth-child(3) { border-left: 0; }
  .product-groups { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .hero { min-height: 440px; }
  .hero::after { background: linear-gradient(180deg, rgba(16,28,43,.65), rgba(16,28,43,.9)); }
  .hero-buttons .btn { flex: 1 1 100%; }
  .features, .cards, .links2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card h3 { font-size: 15px; }
  .card p { display: none; }
  .news li { flex-direction: column; gap: 2px; }
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { padding: 10px 14px; }
  .info-table td { padding: 12px 14px 18px; }
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 32px; }
  .timeline li::before { left: 1px; top: 20px; }
  .map iframe { height: 300px; }
  .form-row { grid-template-columns: 1fr; gap: 6px; }
  .form-row label.head { padding-top: 0; }
  .form .submit .btn { min-width: 0; width: 100%; }
  .contact-box { min-width: 0; width: 100%; }
  .footer-nav ul { grid-template-columns: 1fr 1fr; gap: 6px 20px; }
}

/* ---------- 動き(ふわっと表示) ---------- */
/* トップの文字:ページを開いたときに順番に表示 */
.hero .container > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero .container > .hero-label { animation-delay: .1s; }
.hero h1 .line { animation: rise 1s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 { animation: none; }
.hero h1 .line:nth-child(1) { animation-delay: .3s; }
.hero h1 .line:nth-child(2) { animation-delay: .55s; }
.hero .container > p { animation-delay: .85s; }
.hero .container > .hero-buttons { animation-delay: 1.05s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* スクロールで見えてきたら表示(JavaScriptが動くときだけ) */
.js-reveal .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero .container > *, .hero h1 .line { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}
