/* =========================================================
   ACTIVITY 35 — Coral Hydro 公式サイト 共通スタイル
   ========================================================= */
:root {
  --teal: #2e8b8b;
  --teal-dark: #1c5f66;
  --teal-pale: #e8f4f3;
  --coral: #e8776b;
  --coral-dark: #d05a4e;
  --navy: #16384a;
  --sand: #f8f5ef;
  --ink: #273239;
  --ink-soft: #5a6b73;
  --line: #dfe7e8;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(22, 56, 74, .08);
  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.85;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { opacity: .85; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; }
.brand .brand-text { line-height: 1.3; }
.brand .brand-name { font-weight: 700; font-size: 1.05rem; color: var(--navy); letter-spacing: .04em; }
.brand .brand-sub { font-size: .68rem; color: var(--ink-soft); letter-spacing: .06em; }

.global-nav { order: 2; margin-left: auto; }
.global-nav ul { display: flex; gap: 2px; list-style: none; align-items: center; }
.global-nav a {
  display: block; padding: 8px 10px; font-size: .9rem; font-weight: 600;
  color: var(--ink); border-radius: 8px;
}
.global-nav a:hover { background: var(--teal-pale); opacity: 1; }
.global-nav a.is-current { color: var(--teal-dark); }
.global-nav a.nav-cta {
  background: var(--coral); color: #fff; border-radius: 999px; padding: 9px 18px;
}
.global-nav a.nav-cta:hover { background: var(--coral-dark); }

/* ---------- Language switcher ---------- */
.header-right { display: flex; align-items: center; gap: 4px; order: 3; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 4px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: var(--ink); white-space: nowrap;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--teal-pale); border-color: var(--teal); }
.lang-switch[open] summary { background: var(--teal-pale); border-color: var(--teal); }
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 120;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 132px;
}
.lang-switch li { margin: 0; }
.lang-switch ul a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: .88rem; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.lang-switch ul a:hover { background: var(--teal-pale); opacity: 1; }
.lang-switch ul a.is-current { color: var(--teal-dark); background: var(--teal-pale); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--navy);
  margin: 5px auto; transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(rgba(20, 50, 66, .45), rgba(20, 50, 66, .55)),
              url("../assets/img/hero-yonaguni.jpg") center / cover no-repeat;
}
.hero-inner { max-width: 1080px; margin: 0 auto; padding: 110px 20px 120px; }
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem); font-weight: 700; line-height: 1.5;
  letter-spacing: .05em; text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.hero .hero-lead {
  margin-top: 18px; font-size: clamp(.98rem, 2vw, 1.15rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4); max-width: 640px;
}
.hero .hero-tagline {
  display: inline-block; margin-bottom: 14px; padding: 6px 16px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
  font-size: .82rem; letter-spacing: .14em;
}
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; letter-spacing: .04em;
  transition: transform .15s, box-shadow .15s; cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 18px rgba(232, 119, 107, .4); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.8); }
.btn-outline { background: #fff; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn-lg { padding: 18px 48px; font-size: 1.1rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--sand); }
.section-teal { background: var(--teal-pale); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .en {
  display: block; color: var(--teal); font-size: .8rem; letter-spacing: .22em;
  text-transform: uppercase; margin-bottom: 8px; font-weight: 700;
}
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--navy); letter-spacing: .06em; }
.section-head .desc { margin-top: 12px; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 26px; border-top: 4px solid var(--teal);
}
.card h3 { color: var(--navy); font-size: 1.08rem; margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--ink-soft); }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal-pale);
  color: var(--teal-dark); font-weight: 700; font-size: 1.15rem; margin-bottom: 14px;
}

/* ---------- Split (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2, .split h3 { color: var(--navy); font-size: 1.5rem; margin-bottom: 16px; line-height: 1.5; }
.split p { color: var(--ink-soft); margin-bottom: 12px; }

/* ---------- Fact strip ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.fact .fact-value {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; color: var(--teal-dark);
  line-height: 1.2;
}
.fact .fact-value small { font-size: .55em; font-weight: 700; }
.fact .fact-label { margin-top: 6px; font-size: .84rem; color: var(--ink-soft); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  font-size: .93rem;
}
table.data th, table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.data thead th { background: var(--navy); color: #fff; font-weight: 600; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .em { color: var(--coral-dark); font-weight: 700; }
table.data th[scope="row"] { background: var(--sand); width: 32%; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--navy);
  list-style: none; position: relative; padding-right: 48px; font-size: .98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q."; color: var(--teal); margin-right: 10px; font-weight: 700; }
.faq-item summary::after {
  content: "＋"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  color: var(--teal); font-size: 1.1rem; transition: transform .2s;
}
.faq-item[open] summary::after { content: "－"; }
.faq-item .faq-a { padding: 0 22px 20px 22px; color: var(--ink-soft); font-size: .94rem; }
.faq-item .faq-a::before { content: "A."; color: var(--coral); font-weight: 700; margin-right: 10px; }

/* ---------- Product ---------- */
.product-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px; align-items: center;
}
.product-box img { border-radius: 10px; }
.price { font-size: 2rem; color: var(--navy); font-weight: 700; }
.price small { font-size: .55em; font-weight: 600; color: var(--ink-soft); }
.price-note { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.spec-list { list-style: none; margin: 18px 0; }
.spec-list li {
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .93rem;
  display: flex; gap: 12px;
}
.spec-list li b { min-width: 7.5em; color: var(--navy); font-weight: 600; }

.badge {
  display: inline-block; background: var(--teal-pale); color: var(--teal-dark);
  border-radius: 6px; padding: 3px 10px; font-size: .78rem; font-weight: 700;
  margin-right: 6px; margin-bottom: 6px;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; max-width: 780px; margin: 0 auto; }
.step {
  position: relative; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 26px 26px 84px; margin-bottom: 20px;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 24px; top: 26px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .93rem; }

/* ---------- Notes / alerts ---------- */
.note {
  background: var(--sand); border-left: 4px solid var(--teal);
  border-radius: 8px; padding: 18px 22px; font-size: .9rem; color: var(--ink-soft);
  margin: 24px 0;
}
.note b { color: var(--navy); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal-dark), var(--teal));
  color: #fff; text-align: center; padding: 64px 20px;
}
.cta-band h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 12px; letter-spacing: .06em; }
.cta-band p { opacity: .92; margin-bottom: 26px; font-size: .95rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--sand); border-bottom: 1px solid var(--line); }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  max-width: 1080px; margin: 0 auto; padding: 10px 20px; font-size: .8rem;
}
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--ink-soft); }
.breadcrumb a { color: var(--teal-dark); }
.breadcrumb .current { color: var(--ink-soft); }

/* ---------- Page header ---------- */
.page-head {
  background: linear-gradient(120deg, var(--navy), var(--teal-dark));
  color: #fff; padding: 56px 0;
}
.page-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: .08em; }
.page-head .en { display: block; font-size: .78rem; letter-spacing: .24em; opacity: .75; margin-bottom: 8px; text-transform: uppercase; }

/* ---------- Article (化石サンゴとは) ---------- */
.article { max-width: 800px; margin: 0 auto; }
.article h2 {
  color: var(--navy); font-size: 1.45rem; margin: 52px 0 18px;
  padding-left: 16px; border-left: 5px solid var(--teal); line-height: 1.5;
}
.article h3 { color: var(--teal-dark); font-size: 1.12rem; margin: 34px 0 12px; }
.article p { margin-bottom: 16px; }
.article img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 26px auto; }
.article figure { margin: 26px 0; }
.article figcaption { font-size: .82rem; color: var(--ink-soft); text-align: center; margin-top: -14px; }
.article ul, .article ol { margin: 0 0 16px 1.4em; }
.article li { margin-bottom: 6px; }

/* ---------- Contact form ---------- */
.contact-form {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 32px;
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block; font-weight: 700; color: var(--navy);
  font-size: .92rem; margin-bottom: 8px;
}
.req {
  display: inline-block; background: var(--coral); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 4px;
  padding: 1px 7px; margin-left: 8px; vertical-align: middle;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 8px; font-family: inherit; font-size: 1rem;
  color: var(--ink); background: var(--sand); transition: border-color .15s, background .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--teal); background: #fff;
}
.form-row textarea { resize: vertical; }
.form-consent { text-align: center; font-size: .92rem; margin-top: 26px; }
.form-consent label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-consent input { width: 18px; height: 18px; accent-color: var(--teal); }
.hidden-field { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfdde3; font-size: .88rem; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 52px 20px 28px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px;
}
.footer-brand img { width: 52px; margin-bottom: 12px; }
.footer-brand .name { font-weight: 700; color: #fff; font-size: 1rem; }
.footer-brand p { margin-top: 10px; font-size: .82rem; opacity: .8; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 14px; letter-spacing: .08em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #cfdde3; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); text-align: center;
  padding: 18px; font-size: .78rem; opacity: .7;
}

/* ---------- AI chat widget ---------- */
#a35-chat { position: fixed; right: 20px; bottom: 20px; z-index: 200; font-size: 15px; }
.a35-chat-fab {
  display: block; background: none; border: none; cursor: pointer; padding: 0;
  animation: a35bob 3s ease-in-out infinite;
  transition: transform .15s;
}
.a35-chat-fab:hover { transform: scale(1.05); }
.a35-chat-fab img {
  display: block; width: 160px; height: auto;
  filter: drop-shadow(0 8px 18px rgba(22, 56, 74, .35));
}
@keyframes a35bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.a35-chat-head { gap: 10px; }
.a35-chat-head-avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.a35-chat-head > div { flex: 1; }
.a35-msg-row { display: flex; gap: 8px; align-items: flex-end; }
.a35-msg-row .a35-msg { margin-bottom: 10px; }
.a35-avatar {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  margin-bottom: 10px; border: 1px solid var(--line);
}
.a35-chat-panel {
  width: min(370px, calc(100vw - 40px)); height: min(540px, calc(100vh - 100px));
  background: #fff; border-radius: 16px; box-shadow: 0 12px 48px rgba(22, 56, 74, .3);
  display: flex; flex-direction: column; overflow: hidden;
}
.a35-chat-panel[hidden], .a35-chat-fab[hidden] { display: none; }
.a35-chat-head {
  background: linear-gradient(120deg, var(--navy), var(--teal-dark)); color: #fff;
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center;
}
.a35-chat-head small { opacity: .75; font-size: .72rem; }
.a35-chat-close {
  background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer;
  line-height: 1; padding: 4px 8px;
}
.a35-chat-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--sand); }
.a35-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px;
  font-size: .9rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.a35-msg-bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.a35-msg-user {
  background: var(--teal); color: #fff; margin-left: auto; border-bottom-right-radius: 4px;
}
.a35-msg-typing { color: var(--ink-soft); animation: a35blink 1.2s infinite; }
@keyframes a35blink { 50% { opacity: .4; } }
.a35-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.a35-chat-input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px;
  font-family: inherit; font-size: .92rem;
}
.a35-chat-input:focus { outline: none; border-color: var(--teal); }
.a35-chat-send {
  background: var(--coral); color: #fff; border: none; border-radius: 999px;
  padding: 10px 18px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: .9rem;
}
.a35-chat-send:disabled { opacity: .5; cursor: default; }
.a35-chat-note {
  font-size: .7rem; color: var(--ink-soft); text-align: center;
  padding: 6px 10px 10px; background: #fff;
}
@media (max-width: 540px) {
  #a35-chat { right: 10px; bottom: 10px; }
  .a35-chat-fab img { width: 118px; }
}

/* ---------- Responsive ---------- */
/* ナビはメニュー項目が多く、言語により文字幅も異なるため早めにハンバーガーへ切り替える */
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed; inset: 65px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .28s ease; z-index: 99;
  }
  .global-nav.is-open { transform: translateY(0); }
  .global-nav ul { flex-direction: column; gap: 0; padding: 12px 20px 20px; align-items: stretch; }
  .global-nav a { padding: 13px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .global-nav a.nav-cta { border-radius: 999px; text-align: center; margin-top: 12px; border-bottom: none; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .split, .product-box { grid-template-columns: 1fr; gap: 28px; }
  .split > img, .product-box img { max-width: 440px; margin-left: auto; margin-right: auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  /* 言語により長さが異なるため、狭い画面ではブランド説明を省略 */
  .brand .brand-sub { display: none; }
  .brand .brand-name { font-size: 1.1rem; }
}

@media (max-width: 540px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { padding: 80px 20px 90px; }
  .product-box { padding: 28px 22px; }
  .section { padding: 56px 0; }
}
