/**
 * CORELODE AI — Site styles
 * Layout language inspired by https://corp.penmark.jp/
 * Full-bleed photography, cream canvas, English section labels, green accent.
 */

@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Noto+Sans+JP:wght@400;500;700&family=Shippori+Mincho:wght@500;600;700;800&display=swap");

html {
  color-scheme: light;
  scroll-padding-top: 0;
  font-size: var(--cl-fs-html);
}

body {
  font-family: var(--cl-font-sans);
  font-size: var(--cl-fs-body);
  color: var(--cl-dark);
  background: var(--cl-bg);
  font-feature-settings: "palt";
}

#app-root {
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.brand-wordmark {
  font-family: var(--cl-font-display);
  color: var(--cl-dark);
  font-weight: 700;
}

.text-muted {
  color: var(--cl-muted) !important;
}

.bg-light {
  background-color: var(--cl-light) !important;
}

/* ---------- Nav (cream bar above the inset photo) ---------- */
.navbar {
  background: var(--cl-bg) !important;
  padding: 22px 0 !important;
  box-shadow: none !important;
}

.navbar.nav-sticky {
  background: rgba(243, 240, 232, 0.94) !important;
  backdrop-filter: blur(12px);
  box-shadow: none !important;
  border-bottom: 1px solid var(--cl-border);
}

.navbar-brand {
  line-height: 1 !important;
  padding: 4px 0 !important;
}

.brand-wordmark {
  font-size: var(--cl-fs-brand);
  letter-spacing: 0.02em;
  font-weight: 800;
}

.navbar .navbar-nav .nav-item > .nav-link {
  color: var(--cl-dark) !important;
  font-family: var(--cl-font-sans);
  font-size: var(--cl-fs-nav) !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
  text-transform: none !important;
  padding: 8px 18px !important;
}

.navbar .navbar-nav .nav-item > .nav-link.active,
.navbar .navbar-nav .nav-item > .nav-link:hover {
  color: var(--cl-primary) !important;
}

.nav-contact {
  margin-left: 8px;
  font-family: var(--cl-font-sans);
  font-size: var(--cl-fs-nav);
  font-weight: 700;
  color: var(--cl-dark);
  text-decoration: none;
}

.nav-contact:hover {
  color: var(--cl-primary);
}

.navbar-toggler {
  border: 0;
  color: var(--cl-dark);
  font-size: 1.5rem;
}

@media (max-width: 991px) {
  .navbar,
  .navbar.nav-sticky {
    background: var(--cl-bg) !important;
  }
}

/* ---------- Preloader ---------- */
#preloader {
  background: var(--cl-bg) !important;
}

.load :first-child,
.load :nth-child(2) {
  background: var(--cl-primary) !important;
}

.load :nth-child(3),
.load :last-child {
  background: #111 !important;
}

/* ---------- Hero: typewriter left, phone right ---------- */
.hero-full {
  position: relative;
  min-height: 100svh;
  padding: 108px 40px 48px;
  box-sizing: border-box;
  background: var(--cl-bg);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-blobs span {
  position: absolute;
  display: block;
  border-radius: 50%;
  animation: blob-bounce var(--blob-t, 4.5s) ease-in-out var(--blob-d, 0s) infinite;
}

.hero-blobs span:nth-child(1) {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 12%;
  background: #1ac067;
  opacity: 0.2;
  --blob-t: 5.2s;
}

.hero-blobs span:nth-child(2) {
  width: 56px;
  height: 56px;
  left: 18%;
  top: 22%;
  background: #111;
  opacity: 0.1;
  --blob-t: 3.4s;
  --blob-d: 0.4s;
}

.hero-blobs span:nth-child(3) {
  width: 140px;
  height: 140px;
  right: 38%;
  top: 8%;
  background: #1ac067;
  opacity: 0.14;
  --blob-t: 6s;
  --blob-d: 0.8s;
}

.hero-blobs span:nth-child(4) {
  width: 28px;
  height: 28px;
  left: 42%;
  top: 28%;
  background: #1ac067;
  opacity: 0.45;
  --blob-t: 2.8s;
  --blob-d: 0.2s;
}

.hero-blobs span:nth-child(5) {
  width: 90px;
  height: 90px;
  left: 8%;
  bottom: 14%;
  background: #111;
  opacity: 0.08;
  --blob-t: 4.8s;
  --blob-d: 1s;
}

.hero-blobs span:nth-child(6) {
  width: 36px;
  height: 36px;
  right: 22%;
  bottom: 22%;
  background: #1ac067;
  opacity: 0.35;
  --blob-t: 3.1s;
  --blob-d: 0.6s;
}

.hero-blobs span:nth-child(7) {
  width: 180px;
  height: 180px;
  right: -50px;
  bottom: 6%;
  background: #1ac067;
  opacity: 0.16;
  --blob-t: 5.6s;
  --blob-d: 0.3s;
}

.hero-blobs span:nth-child(8) {
  width: 18px;
  height: 18px;
  left: 28%;
  bottom: 32%;
  background: #111;
  opacity: 0.18;
  --blob-t: 2.4s;
}

.hero-blobs span:nth-child(9) {
  width: 48px;
  height: 48px;
  right: 12%;
  top: 36%;
  background: #dcf8e9;
  opacity: 0.9;
  --blob-t: 4.2s;
  --blob-d: 1.2s;
}

.hero-blobs span:nth-child(10) {
  width: 22px;
  height: 22px;
  left: 52%;
  bottom: 12%;
  background: #1ac067;
  opacity: 0.4;
  --blob-t: 3.6s;
  --blob-d: 0.9s;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(32rem, 1fr) minmax(200px, 280px);
  gap: 40px 48px;
  align-items: center;
}

.hero-copy {
  text-align: left;
  justify-self: stretch;
}

.hero-copy .section-label {
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-family: var(--cl-font-display);
  font-size: var(--cl-fs-h1);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
  color: #111;
  text-align: left;
}

.hero-type-line {
  display: block;
  position: relative;
  width: max-content;
  max-width: none;
  text-align: left;
}

.hero-type-sizer {
  display: block;
  visibility: hidden;
  white-space: nowrap;
  text-align: left;
}

.hero-type-mask {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  overflow: hidden;
  box-sizing: content-box;
  border-right: 3px solid var(--cl-primary);
  animation: hero-type-in var(--duration) steps(var(--steps), end) var(--delay) both;
}

.hero-type-text {
  display: block;
  white-space: nowrap;
  color: #111;
  text-align: left;
  width: max-content;
}

.hero-type-line.is-last .hero-type-mask {
  animation:
    hero-type-in var(--duration) steps(var(--steps), end) var(--delay) both,
    hero-caret 0.7s step-end calc(var(--delay) + var(--duration)) infinite;
}

.hero-type-line:not(.is-last) .hero-type-mask {
  animation:
    hero-type-in var(--duration) steps(var(--steps), end) var(--delay) both,
    hero-caret-hide 0s calc(var(--delay) + var(--duration)) forwards;
}

.hero-lead {
  max-width: 28rem;
  margin: 1.5rem 0 0;
  color: var(--cl-muted);
  font-size: var(--cl-fs-lead);
  line-height: 1.8;
  opacity: 0;
  animation: hero-lead-in 0.6s ease 3.6s forwards;
}

.hero-phone {
  display: flex;
  justify-content: center;
  overflow: visible;
  transition: transform 0.5s ease;
}

.hero-phone:hover {
  transform: scale(1.04);
}

.hero-phone img {
  display: block;
  width: min(300px, 100%);
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.2);
  animation: phone-float 5s ease-in-out infinite;
}

@keyframes hero-type-in {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blob-bounce {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(12px, -28px) scale(1.08);
  }
  70% {
    transform: translate(-10px, 14px) scale(0.94);
  }
}

@keyframes hero-caret {
  50% {
    border-right-color: transparent;
  }
}

@keyframes hero-caret-hide {
  to {
    border-right-color: transparent;
  }
}

@keyframes hero-lead-in {
  to {
    opacity: 1;
  }
}

@keyframes phone-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-type-sizer {
    visibility: visible;
  }

  .hero-type-mask {
    display: none;
  }

  .hero-phone img,
  .hero-lead,
  .hero-blobs span {
    animation: none;
  }

  .ph-media img,
  .photo-card img,
  .cta-photo img,
  .hero-phone {
    transition: none;
  }

  .ph-media:hover img,
  .photo-card:hover img,
  .cta-photo:hover img,
  .hero-phone:hover {
    transform: none;
    filter: none;
  }

  .hero-lead {
    opacity: 1;
  }
}

/* ---------- Sections ---------- */
.block-split,
.block-plain {
  padding: 72px 0;
}

.section-label {
  font-size: var(--cl-fs-nav);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.4rem;
}

h2 {
  font-size: var(--cl-fs-h2);
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
  max-width: 16ch;
  font-weight: 700;
}

.block-lead {
  color: var(--cl-muted);
  font-size: var(--cl-fs-lead);
  line-height: 1.85;
  max-width: 38rem;
}

.text-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.75rem;
  color: var(--cl-dark);
  font-weight: 600;
  font-size: var(--cl-fs-small);
  text-decoration: none;
  border-bottom: 1px solid var(--cl-dark);
  padding-bottom: 2px;
}

.text-arrow:hover {
  color: var(--cl-primary);
  border-color: var(--cl-primary);
}

/* Photography blocks */
.ph-media,
.photo-card,
.hero-phone,
.cta-photo {
  position: relative;
  overflow: hidden;
}

.ph-media {
  margin: 0;
}

.ph-media img,
.photo-card img,
.cta-photo img,
.hero-phone img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
}

.ph-media:hover img,
.photo-card:hover img,
.cta-photo:hover img {
  transform: scale(1.08);
  filter: saturate(1.06) contrast(1.04);
}

.ph-media img {
  aspect-ratio: 16 / 10;
  height: auto;
}

.ph-media.shape-portrait {
  border-radius: 48px 16px 48px 16px;
}

.ph-media.shape-portrait img {
  aspect-ratio: 4 / 5;
  max-height: 420px;
}

.ph-media.shape-blob {
  border-radius: 46% 54% 42% 58% / 52% 40% 60% 48%;
}

.ph-media.shape-blob img {
  aspect-ratio: 1;
  max-height: 380px;
}

.ph-media.shape-arch {
  border-radius: 120px 120px 24px 24px;
}

.ph-media.shape-arch img {
  aspect-ratio: 5 / 4;
  max-height: 300px;
}

.ph-media.shape-round {
  border-radius: 50%;
  max-width: 320px;
}

.ph-media.shape-round img {
  aspect-ratio: 1;
  max-height: 320px;
}

.ph-media.shape-slant {
  border-radius: 24px 72px 24px 72px;
}

.ph-media.shape-slant img {
  aspect-ratio: 16 / 9;
  max-height: 280px;
}

/* Service list */
.service-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.service-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--cl-border);
}

.service-list li:last-child {
  border-bottom: 1px solid var(--cl-border);
}

.service-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

.service-list span {
  color: var(--cl-muted);
  font-size: var(--cl-fs-small);
}

/* Process */
.process-intro {
  margin-bottom: 2.25rem;
}

.process-row {
  margin-bottom: 2.5rem;
}

.process-row:last-child {
  margin-bottom: 0;
}

.process-index {
  font-size: var(--cl-fs-nav);
  letter-spacing: 0.12em;
  color: var(--cl-primary);
  font-weight: 600;
}

.process-row h3 {
  font-size: var(--cl-fs-h3);
  margin: 0.4rem 0 0.8rem;
}

/* Photo cards (industries) */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 1.75rem;
}

@media (min-width: 992px) {
  .photo-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.photo-card {
  position: relative;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: cover;
}

.photo-card:nth-child(1) {
  border-radius: 32px 8px 32px 8px;
}

.photo-card:nth-child(1) img {
  aspect-ratio: 4 / 5;
}

.photo-card:nth-child(2) {
  border-radius: 50% 18px 50% 18px;
}

.photo-card:nth-child(2) img {
  aspect-ratio: 1;
}

.photo-card:nth-child(3) {
  border-radius: 18px 18px 56px 18px;
}

.photo-card:nth-child(3) img {
  aspect-ratio: 16 / 10;
}

.photo-card:nth-child(4) {
  border-radius: 80px 80px 20px 20px;
}

.photo-card:nth-child(4) img {
  aspect-ratio: 3 / 4;
}

.photo-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 1.3rem 2.4rem;
  background: linear-gradient(transparent, rgba(17, 17, 17, 0.72));
  color: #fff;
}

.photo-card-copy h3,
.photo-card-copy p {
  color: #fff;
  margin: 0;
}

.photo-card-copy h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.photo-card-copy p {
  font-size: var(--cl-fs-small);
  opacity: 0.9;
}

/* FAQ as news list */
.news-list {
  margin-top: 2rem;
  border-top: 1px solid var(--cl-border);
}

.news-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--cl-border);
}

.news-index {
  font-size: var(--cl-fs-nav);
  color: var(--cl-muted);
  padding-top: 4px;
}

.news-row h3 {
  font-size: var(--cl-fs-lead);
  margin: 0 0 0.4rem;
}

.news-row p {
  margin: 0;
  color: var(--cl-muted);
  font-size: var(--cl-fs-small);
  line-height: 1.7;
}

/* CTA photo band */
.cta-photo {
  position: relative;
  min-height: 280px;
  max-height: 320px;
  height: 32vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.cta-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.1), rgba(17, 17, 17, 0.62));
  z-index: 1;
}

.cta-photo-copy {
  position: relative;
  z-index: 2;
  padding: 2.25rem 2rem;
  max-width: 36rem;
  color: #fff;
}

.cta-photo-copy .section-label,
.cta-photo-copy h2,
.cta-photo-copy p {
  color: #fff;
}

.cta-photo-copy .text-arrow {
  color: #fff;
  border-color: #fff;
}

/* Contact */
.contact-meta p {
  margin: 0 0 0.35rem;
  font-size: var(--cl-fs-small);
}

.contact-form .form-control {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--cl-border);
  border-radius: 0;
  box-shadow: none !important;
  padding: 14px 0;
  margin-bottom: 8px;
  color: var(--cl-dark);
}

.contact-form .form-control:focus {
  border-color: var(--cl-primary) !important;
}

.contact-form .btn {
  margin-top: 1.25rem;
  border-radius: 0 !important;
  padding: 12px 28px;
  font-weight: 600;
  color: #fff !important;
  border: 0 !important;
}

/* Footer */
.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--cl-border);
  font-size: var(--cl-fs-nav);
  color: var(--cl-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-row p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--cl-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cl-dark);
}

#back-to-top {
  background: #111 !important;
  color: #fff;
  border: 0;
  border-radius: 0;
}

#back-to-top:hover {
  background: var(--cl-primary) !important;
  color: #fff !important;
}

.alert-site {
  border-radius: 0;
  border: 0;
}

@media (max-width: 991.98px) {
  .hero-stage {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
    gap: 36px;
  }

  .hero-copy {
    width: 100%;
    text-align: left;
  }

  .hero-phone img {
    width: 240px;
  }
}

@media (max-width: 767.98px) {
  .hero-full {
    min-height: 0;
    padding: 96px 20px 48px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .hero-type-sizer,
  .hero-type-text {
    white-space: nowrap;
  }

  .hero-type-line {
    max-width: none;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .news-row {
    grid-template-columns: 40px 1fr;
  }

  .block-split,
  .block-plain {
    padding: 72px 0;
  }
}
