/* =========================================
   株式会社カラメル — Stylesheet
   ========================================= */

/* ── RESET & CUSTOM PROPERTIES ─────────── */

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

:root {
  --w:     #FFFFFF;
  --b:     #111111;
  --g:     #666666;
  --gl:    #E5E5E5;
  --bg:    #F8F9FA;
  --a:     #FFBF1C;
  --serif: 'Noto Serif JP', serif;
  --sans:  'Noto Sans JP', sans-serif;
  --mono:  'Inter', sans-serif;
  --px:    clamp(24px, 6vw, 96px);
}


/* ── BASE ───────────────────────────────── */

html {
  scroll-behavior: smooth;
}

html, body {
  background: var(--w);
}

body {
  color: var(--b);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}


/* ── SECTION COMMON ─────────────────────── */

.section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(80px, 11vw, 152px) var(--px);
}

.sec-label {
  font-family: var(--serif);
  font-size: clamp(26px, 4.4vw, 48px);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--b);
  line-height: 1;
  margin-bottom: clamp(40px, 6vw, 80px);
  padding-left: 20px;
  position: relative;
}

.sec-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 100%;
  background: var(--a);
}


/* ── HERO ───────────────────────────────── */

#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(60px + clamp(60px, 10vh, 120px)) var(--px) clamp(60px, 10vh, 120px);
  background: var(--w);
  border-bottom: 1px solid var(--gl);
  position: relative;
  overflow: hidden;
}

/* 動画背景 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 白いオーバーレイでうっすら表示 */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  z-index: 1;
}

.hero-accent-line {
  width: 64px;
  height: 3px;
  background: var(--a);
  margin: 20px auto 28px;
  transform-origin: left center;
  animation: accentDraw .8s ease-out both;
  animation-delay: .7s;
  position: relative;
  z-index: 2;
}

@keyframes accentDraw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── NAV ────────────────────────────────── */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--px);
  height: 60px;
}

.nav-logo {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--b);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--g);
  text-decoration: none;
  transition: color .2s ease;
}

.nav-links a:hover {
  color: var(--b);
}

/* ハンバーガーボタン（PCでは非表示） */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--b);
  transition: transform .25s ease, opacity .25s ease;
}

/* 開いた状態でX形に */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .03em;
  color: var(--b);
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 300;
  letter-spacing: .06em;
  line-height: 1.9;
  color: var(--g);
  position: relative;
  z-index: 2;
}


/* ── MESSAGE ────────────────────────────── */

#message {
  background: var(--w);
  border-top: 1px solid var(--gl);
}

.message-body {
  max-width: 680px;
}

.message-body p {
  font-family: var(--sans);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 300;
  line-height: 2.2;
  letter-spacing: .04em;
  color: var(--b);
  margin-bottom: 2em;
}

.message-body p:last-child {
  margin-bottom: 0;
}


/* ── ACTIVITIES ─────────────────────────── */

#activities {
  background: var(--bg);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.act-card {
  background: var(--w);
  overflow: hidden;
  transition: background-color .3s ease;
}

.act-card:hover {
  background-color: var(--a);
}

.act-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #EBEBEB;
  position: relative;
}

/* グレーフィルター：顔がはっきり映らないよう演出 */
.act-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(200, 200, 200, 0.62);
  z-index: 1;
  pointer-events: none;
  transition: background-color .3s ease;
}

.act-card:hover .act-img::after {
  background: rgba(200, 200, 200, 0.35);
}

.act-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .44s cubic-bezier(.16,1,.3,1);
}

.act-card:hover .act-img img {
  transform: scale(1.04);
}

.act-body {
  padding: 20px 22px 28px;
}

.act-num {
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--a);
  display: block;
  margin-bottom: 10px;
  transition: color .3s ease;
}

.act-card:hover .act-num {
  color: var(--b);
}

.act-title {
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--b);
  margin-bottom: 12px;
}

.act-text {
  font-family: var(--sans);
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 300;
  line-height: 2;
  letter-spacing: .03em;
  color: var(--g);
  transition: color .3s ease;
}

.act-card:hover .act-text {
  color: rgba(0,0,0,.7);
}


/* ── PROFILE ────────────────────────────── */

#profile {
  background: var(--w);
  border-top: 1px solid var(--gl);
}

.rep-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.rep-photo {
  position: relative;
  overflow: hidden;
  width: 160px;
  aspect-ratio: 1 / 1;
  background: #E8E8E8;
  flex-shrink: 0;
}

.rep-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--a);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity .32s ease;
}

@media (hover: hover) and (pointer: fine) {
  .rep-photo:hover::before {
    opacity: .14;
  }
}

.rep-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.rep-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--b);
  margin-bottom: 8px;
}

.rep-title {
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--g);
  margin-bottom: 4px;
}

.rep-org {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--g);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gl);
}

.rep-text {
  font-family: var(--sans);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 300;
  line-height: 2.1;
  letter-spacing: .04em;
  color: var(--b);
  margin-bottom: 1.5em;
}

.rep-text:last-of-type {
  margin-bottom: 0;
}

/* SNSリンク */
.rep-sns {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gl);
}

.rep-sns-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--g);
  transition: color .2s ease;
}

.rep-sns-link:hover {
  color: var(--b);
}

.rep-sns-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* 実績リスト */
.rep-achievements {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--gl);
}

.rep-ach-heading {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--g);
  margin-bottom: 10px;
  margin-top: 20px;
  text-transform: uppercase;
}

.rep-ach-heading:first-child {
  margin-top: 0;
}

.rep-ach-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rep-ach-list li {
  font-family: var(--sans);
  font-size: clamp(12px, .95vw, 13px);
  font-weight: 300;
  line-height: 1.6;
}

.rep-ach-list a {
  color: var(--b);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,.25);
  transition: text-decoration-color .2s ease, color .2s ease;
}

.rep-ach-list a:hover {
  color: var(--a);
  text-decoration-color: var(--a);
}


/* ── HISTORY ────────────────────────────── */

#history {
  background: var(--bg);
}

.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 600px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--gl);
}

.tl-item {
  position: relative;
  margin-bottom: 28px;
}

.tl-item:last-child {
  margin-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--a);
  border: 2px solid var(--w);
  outline: 1px solid var(--a);
}

.tl-date {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .08em;
  color: var(--g);
  display: block;
  margin-bottom: 3px;
}

.tl-content {
  font-family: var(--sans);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: .03em;
  color: var(--b);
}

.tl-content strong {
  font-weight: 700;
}


/* ── COMPANY ────────────────────────────── */

#company {
  background: var(--w);
  border-top: 1px solid var(--gl);
}

.company-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--gl);
  font-family: var(--sans);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: .03em;
  text-align: left;
  vertical-align: top;
}

.company-map {
  margin-top: 32px;
  max-width: 560px;
  overflow: hidden;
}

.company-map iframe {
  display: block;
  width: 100%;
}

.company-table td a {
  color: var(--b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.company-table td a:hover {
  color: var(--a);
}

.company-table th {
  width: 120px;
  color: var(--g);
  font-weight: 400;
}

.company-table td {
  color: var(--b);
}


/* ── CONTACT ────────────────────────────── */

#contact {
  background: var(--bg);
  text-align: center;
}

.contact-text {
  font-family: var(--sans);
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 300;
  line-height: 2.1;
  letter-spacing: .04em;
  color: var(--g);
  max-width: 520px;
  margin: 0 auto 44px;
}

.contact-btn-wrap {
  display: flex;
  justify-content: center;
}

.contact-btn {
  display: inline-block;
  padding: 16px 52px;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--b);
  background: var(--w);
  border: 1.5px solid var(--b);
  transition: background-color .26s ease, border-color .26s ease;
}

.contact-btn:hover {
  background-color: var(--a);
  border-color: var(--a);
}


/* ── FOOTER ─────────────────────────────── */

footer {
  background: var(--w);
  border-top: 1px solid var(--gl);
  padding: 32px var(--px);
  text-align: center;
}

.footer-copy {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--g);
}

.footer-privacy {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--g);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 8px;
  display: block;
}

.footer-privacy:hover {
  color: var(--b);
}


/* ── SCROLL REVEAL ──────────────────────── */

.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .95s cubic-bezier(.16,1,.3,1),
              transform .95s cubic-bezier(.16,1,.3,1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.d1 { transition-delay: .1s; }
.d2 { transition-delay: .22s; }
.d3 { transition-delay: .36s; }
.d4 { transition-delay: .5s; }
.d5 { transition-delay: .65s; }


/* ── RESPONSIVE ─────────────────────────── */

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--gl);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 199;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 14px var(--px);
    font-size: .78rem;
    letter-spacing: .1em;
    border-bottom: 1px solid var(--gl);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .activities-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rep-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .rep-photo {
    max-width: 240px;
    margin: 0 auto;
  }

  .company-table th {
    width: 90px;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    letter-spacing: .02em;
  }

  .act-body {
    padding: 20px 20px 28px;
  }
}
