:root {
  /* brand palette */
  --black: #000000;
  --ash: #1D1D1D;
  --stone: #888888;
  --snow: #F1F1F1;
  --white: #FFFFFF;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(to bottom, var(--black), var(--ash));
  color: var(--white);
  line-height: 1.6;
}

.container {
  width: 100%;
  margin-inline: auto;
}

.site-header, .site-footer {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header {
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.8);
}
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4rem;
  padding: 0 6rem;
  background: var(--black);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4rem;
}
.nav a {
  color: var(--white);
  text-decoration: none;
}
.nav .brand {
  font-weight: 700;
}

.hero {
  padding: 4vh 0 2vh;
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 70vh;
  width: min(100% - 2rem, 1400px);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.hero .tagline {
  font-size: 1.1rem;
  font-weight: 500;
  text-align: right;
}
.hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 15rem 4rem;
  background-color: var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  /* full-bleed within container; keep 1rem margins at viewport edges */
  width: calc(100vw - 12rem);
  margin-left: calc(50% - 50vw + 6rem);
  margin-right: calc(50% - 50vw + 6rem);
  position: relative;
  overflow: hidden;
}
.hero-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.28));
  z-index: 1; /* above video, below text */
}

/* hero background video */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.hero-row > :not(.hero-video) {
  position: relative;
  z-index: 2; /* above overlay */
}

.feature-container {
  overflow: hidden;
  width: 100%;
}
.feature-viewport {
  width: 100%;
  overflow: hidden; /* clip within viewport so inner row can translate */
}
.feature {
  padding: 4rem 0 4rem 6rem;
}

.feature h2 { 
  margin-top: 0; 
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4rem;
}
.feature h3 { 
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  /* ensure Safari logical margin is reset */
  margin-block-end: 0;
}
.feature-subtitle {
  font-size: 1rem; /* half of 2rem H2 size */
  font-weight: 300;
  /* reset default paragraph top margin to avoid gap below h3 */
  margin-top: 0;
  margin-block-start: 0;
}
.feature-soon {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem; /* half the subtitle */
  color: var(--stone);
  letter-spacing: 0.1em;
  margin: 0;
}

.feature-soon a {
  color: var(--stone);
  text-decoration: none;
}

.feature-soon a:hover {
  color: var(--white);
  text-decoration: none;
}

.feature-cards {
  display: flex;
  gap: 1rem;
  overflow: visible; /* allow internal transform without self-clipping */
  padding-top: 1rem;
  will-change: transform;
  transform: translateX(0);
}

.feature-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.feature-arrow {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: var(--stone);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
              background-color 260ms ease, color 260ms ease;
}
.feature-arrow svg { width: 28px; height: 28px; }
.feature-arrow svg path { stroke-width: 3; }
.feature-arrow:not([disabled]):hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-1px) scale(1.06);
}
.feature-arrow:not([disabled]):active {
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  transform: translateY(0) scale(1.0);
}
.feature-arrow[disabled] {
  background: rgba(0,0,0,0.35);
  color: var(--ash);
  cursor: default;
}

.feature-card {
  min-width: 400px;
  width: 400px;
  background: var(--black);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 3rem;
  min-height: 640px;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 650ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.feature-card:first-child {
  background: transparent;
  box-shadow: none;
  padding: 0 3rem 2rem 0;
}
.feature-card:nth-child(n+2) {
  text-align: center;
}
.feature-card:not(.about):hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
.feature-card:nth-child(2) {
  /* Background illustration for Kantan Clock */
  background-image: url('../img/kantan_clock.png');
  background-repeat: no-repeat;
  background-size: 75% auto; /* 75% of card width */
  background-position: center 300px; /* push down ~150px from top */
  min-height: 640px; /* ensure space for image to show and clip at bottom */
}
.feature-card:nth-child(3) {
  /* Background illustration for Kantan Clock */
  background-image: url('../img/kantan_today.png');
  background-repeat: no-repeat;
  background-size: 75% auto; /* 75% of card width */
  background-position: center 300px; /* push down ~150px from top */
  min-height: 640px; /* ensure space for image to show and clip at bottom */
}
.feature-card:nth-child(2) .app-icon, .feature-card:nth-child(3) .app-icon {
  width: 64px;
  height: 64px;
  display: inline-block;
  border-radius: 18px;
  border: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4), 0 0 14px rgba(255,255,255,0.28), inset 0 0 0 0.5px rgba(255,255,255,0.18);
  object-fit: cover;
  margin: 0 auto 0.25rem;
}

.feature-card:nth-child(4) {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ash);
}

.prose h1, .prose h2, .prose h3 { line-height: 1.2; }
.prose p { color: var(--white); }
.prose a { color: var(--white); }
/* page prose container padding for privacy policy */
.prose { padding: 0 6rem; }

/* newsletter styles removed */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

footer .container { padding: 1rem 0; color: var(--white); font-size: 0.7rem; font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight: 200; text-transform: uppercase; }
.site-footer a { color: var(--stone); text-decoration: none; }
.site-footer a:hover { text-decoration: none; color: var(--white); }
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 1100px) {
  .hero-row {
    flex-direction: column;
    align-items: flex-start;
    width: calc(100vw - 8rem);
    margin-left: calc(50% - 50vw + 4rem);
    margin-right: calc(50% - 50vw + 4rem);
  }

  .feature {
    padding: 4rem 0 4rem 4rem;
  }

  .site-footer {
    padding: 0 4rem;
  }

  .hero .tagline { 
    text-align: left; 
    margin-top: 0;
  }

  .prose { padding: 0 4rem; }

}

@media (max-width: 860px) {
  .hero-row {
    width: calc(100vw - 4rem);
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: calc(50% - 50vw + 2rem);
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 3rem 27rem;
    gap: 0;
  }

  .hero-row .tagline, .hero-row h1 {
    margin: 0 auto;
    text-align: center;
  }

  .feature h2 { 
    padding-right: 2rem;
  }

  .feature {
    padding: 4rem 0 4rem 2rem;
  }

  .feature-card {
    min-width: 320px;
    width: 320px;
  }

  .site-footer {
    padding: 0 2rem;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
  }

  .prose { padding: 0 2rem; }
}
