/* ── Reset & Base ────────────────────────────────── */

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

@font-face {
  font-family: 'Replica Pro';
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  src:
    local('Replica Pro'), local('ReplicaPro-Regular'),
    url('assets/fonts/ReplicaLL-Regular-subset.woff2') format('woff2'),
    url('assets/fonts/ReplicaLL-Regular-subset.woff') format('woff');
}

@font-face {
  font-family: 'Replica Pro';
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  src:
    local('Replica Pro Bold'), local('ReplicaPro-Bold'),
    url('assets/fonts/ReplicaLL-Bold-subset.woff2') format('woff2'),
    url('assets/fonts/ReplicaLL-Bold-subset.woff') format('woff');
}

:root {
  --color-bg: #7296a7;
  --color-mint: #c2dfdb;
  --color-white: #ffffff;
  --color-white-80: rgba(255, 255, 255, 0.8);
  --color-dark: #2e2e2e;
  --font: 'Replica Pro', 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding: 12px;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--color-white);
  background: var(--color-white);
}

/* ── Page frame (white inset border) ─────────────── */

.hero {
  position: relative;
  min-height: calc(100dvh - 24px);
  overflow: hidden;
  border-radius: 20px;
}

/* ── Background with clip-path reveal ────────────── */

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  clip-path: inset(50% 50% 50% 50% round 200px);
  will-change: clip-path;
}

.hero-bg-ellipse {
  position: absolute;
  bottom: -80px;
  left: 50%;
  z-index: 1;
  width: 160%;
  max-width: none;
  height: 300%;
  pointer-events: none;
  background: #C2DFDB;
  opacity: 0.6;
  transform: translateX(-50%) translateY(20%);
  will-change: transform;
}

.hero-bg-noise {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: crisp-edges;
  opacity: 0.02;
}

.hero-vectors {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 120%;
  min-width: 100vw;
  max-width: none;
  min-height: 100vh;
  pointer-events: none;
  object-fit: cover;
  mix-blend-mode: soft-light;
  opacity: 0.8;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* ── Header ──────────────────────────────────────── */

.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  padding: 24px 40px;
  margin: 0 auto;
}

/* Homepage entrance animation — only when inside .hero (homepage) */
.hero .header {
  opacity: 0;
  transform: translateY(-40px);
  will-change: opacity, transform;
}

.logo {
  display: block;
}

.logo img {
  display: block;
  width: auto;
  height: 24px;
}

.nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  position: relative;
  padding: 4px 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 400;
  color: var(--color-white);
  white-space: nowrap;
  text-decoration: none;
}

.nav-link::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  content: '';
  background: var(--color-white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ── Buttons ─────────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn::before {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  pointer-events: none;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover::before {
  left: 100%;
}

.btn-book {
  padding: 9px 24px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  background: var(--color-mint);
  border-radius: 909px;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-book:hover {
  background: #d4ebe8;
  box-shadow: 0 4px 24px rgba(194, 223, 219, 0.3);
}

.btn-primary {
  height: 40px;
  padding: 9px 28px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-bg);
  background: var(--color-white);
  border-radius: 889px;
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  box-shadow: 0 4px 30px rgba(255, 255, 255, 0.25);
}

.btn-outline {
  height: 40px;
  padding: 9px 24px;
  font-size: 18px;
  font-weight: 400;
  color: var(--color-white);
  background: rgba(114, 150, 167, 0.1);
  border: 1.8px solid var(--color-white);
  border-radius: 889px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Hero Content ────────────────────────────────── */

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 1440px;
  padding: 0 40px;
  padding-top: clamp(100px, 18vh, 200px);
  margin: 0 auto;
}

.hero-title {
  max-width: 925px;
  font-size: clamp(42px, 6.25vw, 90px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.title-line {
  display: block;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.title-line-inner {
  display: block;
  transform: translateY(110%);
  will-change: transform;
}

.hero-subtitle {
  max-width: 799px;
  margin-top: 32px;
  font-size: clamp(18px, 1.74vw, 25px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-white-80);
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}

.hero-ctas .btn {
  opacity: 0;
  will-change: opacity, transform;
}

/* ── Mobile menu button ──────────────────────────── */

.mobile-menu-btn {
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: opacity 0.3s,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 768px) {
  .hero-bg-canvas {
    clip-path: inset(50% 50% 50% 50% round 100px);
  }

  .header {
    padding: 20px 24px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 15;
    visibility: hidden;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    background: var(--color-bg);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.5s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .nav.is-open .nav-link,
  .nav.is-open .btn-book {
    animation: menu-item-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .nav.is-open .nav-link:nth-child(1) { animation-delay: 0.05s; }
  .nav.is-open .nav-link:nth-child(2) { animation-delay: 0.1s; }
  .nav.is-open .nav-link:nth-child(3) { animation-delay: 0.15s; }
  .nav.is-open .btn-book { animation-delay: 0.2s; }

  @keyframes menu-item-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-link {
    font-size: 28px;
  }

  .nav-link::after {
    display: none;
  }

  .btn-book {
    padding: 12px 32px;
    font-size: 20px;
  }

  .hero-content {
    padding: 0 24px;
    padding-top: clamp(80px, 15vh, 160px);
  }

  .hero-title {
    font-size: clamp(36px, 10vw, 56px);
  }

  .hero-subtitle {
    margin-top: 24px;
    font-size: clamp(16px, 4vw, 20px);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 36px;
  }

  .hero-vectors {
    left: 50%;
    width: 200%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }
}

/* ── Reduced motion ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero-bg-canvas {
    clip-path: none !important;
  }

  .title-line-inner {
    transform: none !important;
  }

  .header {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-subtitle,
  .hero-ctas .btn {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Blog ───────────────────────────────────────── */

.blog-header {
  position: relative;
  padding: 24px 40px;
}

.blog-header .logo img {
  filter: none;
}

.blog-header .nav-link.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 1;
}

.blog-hero {
  margin: 0 20px;
  background: var(--color-bg);
  border-radius: 20px;;
}

.blog-hero h1 {
  max-width: 1440px;
  padding: 0 40px;
  margin: 0 auto;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.blog-article-hero {
  padding-bottom: 48px;
}

.blog-article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 1440px;
  padding: 0 40px;
  margin: 0 auto;
  margin-top: 12px;
}

.blog-article-date {
  font-size: 16px;
  color: var(--color-white-80);
}

.blog-article-reading-time {
  font-size: 14px;
  color: var(--color-mint);
  opacity: 0.8;
}

.blog-back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 15px;
  color: var(--color-white-80);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-back:hover {
  color: var(--color-white);
}

.blog-page-title {
  max-width: 1024px;
  padding: 0 40px;
  margin: 60px auto 0;
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 400;
  line-height: 1;
  color: #2e2e2e;
  letter-spacing: -0.03em;
}

/* Blog listing grid */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1024px;
  padding: 0 40px;
  margin: 48px auto;
}

.blog-card {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  color: var(--color-dark);
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 22px;
  transition: box-shadow 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.blog-card img {
  max-width: 480px;
  aspect-ratio: 5 / 2;
  object-fit: cover;
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.blog-card-date {
  font-size: 14px;
  color: #888;
}

.blog-card-reading-time {
  font-size: 13px;
  color: var(--color-bg);
  opacity: 0.7;
}

.blog-card-title {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
}

/* Blog article banner image */

.blog-banner {
  max-width: 800px;
  padding: 0 40px;
  margin: 48px auto 48px;
}

.blog-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border-radius: 12px;
}

/* Blog article content */

.blog-article {
  max-width: 720px;
  padding: 0 40px;
  margin: 48px auto;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-dark);
}

.blog-article h2 {
  margin: 40px 0 16px;
  font-size: 28px;
  font-weight: 700;
}

.blog-article h3 {
  margin: 32px 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.blog-article h4 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.blog-article p {
  margin-bottom: 20px;
}

.blog-article ul,
.blog-article ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.blog-article li {
  margin-bottom: 8px;
}

.blog-article img {
  max-width: 100%;
  margin: 24px 0;
  border-radius: 8px;
}

.blog-article figure {
  margin: 24px 0;
}

.blog-article figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: #888;
  text-align: center;
}

.blog-article pre {
  padding: 20px;
  margin-bottom: 20px;
  overflow-x: auto;
  font-size: 15px;
  background: #f4f4f4;
  border-radius: 8px;
}

.blog-article code {
  padding: 2px 6px;
  font-size: 0.9em;
  background: #f4f4f4;
  border-radius: 4px;
}

.blog-article pre code {
  padding: 0;
  background: none;
}

.blog-article blockquote {
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: #555;
  border-left: 3px solid var(--color-bg);
}

.blog-article a {
  color: var(--color-bg);
  word-break: break-all;
  text-decoration: underline;
}

.blog-article hr {
  margin: 40px 0;
  border: none;
  border-top: 1px solid #e0e0e0;
}

.blog-article table {
  width: 100%;
  margin: 24px 0;
  font-size: 16px;
  border-collapse: collapse;
}

.blog-article th,
.blog-article td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #e0e0e0;
}

.blog-article th {
  font-weight: 700;
  background: #f4f4f4;
}

.blog-callout {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  background: #f4f4f4;
  border-radius: 8px;
}

.blog-callout-icon {
  flex-shrink: 0;
  font-size: 20px;
}

.blog-image img {
  max-width: 100%;
  border-radius: 8px;
}

.blog-video {
  position: relative;
  padding-bottom: 56.25%;
  margin: 24px 0;
}

.blog-video iframe,
.blog-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.blog-embed iframe {
  width: 100%;
  min-height: 400px;
  margin: 24px 0;
  border-radius: 8px;
}

.blog-bookmark a {
  display: block;
  padding: 14px 20px;
  color: var(--color-bg);
  text-decoration: none;
  background: #f4f4f4;
  border-radius: 8px;
  transition: background 0.2s;
}

.blog-bookmark a:hover {
  background: #eaeaea;
}

/* Footer */

.footer {
  padding: 48px 32px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  filter: invert(1);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #000;
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.35);
}

/* Blog responsive */

@media (max-width: 768px) {
  .blog-hero {
    margin: 0 12px;
  }

  .blog-list {
    gap: 16px;
    padding: 0 16px;
    margin: 32px auto;
  }

  .blog-card {
    flex-direction: column;
  }

  .blog-card img {
    width: 100%;
    min-width: unset;
  }

  .blog-article {
    padding: 0 20px;
    font-size: 17px;
  }

  .blog-header {
    padding: 20px 20px;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: 28px;
  }

  .blog-card-title {
    font-size: 18px;
  }
}

/* ── Blog delight ────────────────────────────────── */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0%;
  height: 3px;
  background: var(--color-mint);
  transform-origin: left;
  transition: width 0.08s linear;
}

/* Card entrance stagger */
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: card-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Thumbnail zoom on card hover */
.blog-card img {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover img {
  transform: scale(1.01);
}

/* Mint border flash on hover */
.blog-card:hover {
  border-color: var(--color-mint);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

/* ← Back arrow slide */
.blog-back-arrow {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-back:hover .blog-back-arrow {
  transform: translateX(-5px);
}

/* Banner overflow for parallax */
.blog-banner {
  overflow: hidden;
}

.blog-banner img {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sticky article header */
.sticky-article-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 150;
  display: flex;
  gap: 20px;
  align-items: center;
  height: 52px;
  padding: 0 40px;
  pointer-events: none;
  background: var(--color-dark);
  opacity: 0;
  transform: translateY(-100%);
  transition:
    opacity 0.3s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-article-header.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.sticky-back {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--color-white-80);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s;
}

.sticky-back:hover {
  color: var(--color-white);
}

.sticky-title {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  white-space: nowrap;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .blog-card img,
  .blog-back-arrow,
  .blog-banner img,
  .reading-progress,
  .sticky-article-header {
    transition: none;
  }
}
