/*
 * Tenang at Work: the employer site. Direction: cinematic (see design/look-bible.md).
 * Rainforest slate and limestone, one terracotta accent per beat, pandan sage for quiet details.
 * Fraunces for display, Plus Jakarta Sans for text, no third face. No inline styles anywhere (CSP).
 *
 * Contrast notes: limestone on slate is about 9:1. Terracotta is only ever decoration (rules, underlines), never
 * text or a button fill, because it does not reach 4.5:1 against either neighbour. The scrim behind beat copy is at
 * least 80% slate where the words sit, which keeps limestone text above 5:1 even over a pure-limestone frame.
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../../fonts/tenang/fraunces-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../../fonts/tenang/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  --slate: #2f3b38;
  --slate-deep: #232c2a;
  --limestone: #ece6da;
  --limestone-dim: #d9d2c3;
  --terracotta: #c46a4a;
  --terracotta-ink: #8f3f22;
  --sage: #7fa38a;
  --sage-wash: #d5dfd0;
  --ink-soft: #4a5753;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 16px;
  --measure: 38rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) {
  :root {
    --gutter: 48px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--slate);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--limestone);
  color: var(--slate);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* A short page (thanks, errors) keeps its footer at the bottom instead of showing a strip of page below it. */
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

/* The thanks page is only its hero: let it take the whole space above the footer. */
.page--thanks main {
  display: flex;
  flex-direction: column;
}

.page--thanks main > .hero {
  flex: 1 0 auto;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: var(--terracotta);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--limestone);
  color: var(--slate);
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow {
  max-width: 50rem;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem var(--gutter);
  color: var(--limestone);
}

.brand {
  display: block;
  width: 7.5rem;
  color: inherit;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:not(.btn) {
  text-decoration: none;
  padding: 0.5rem 0.125rem;
  background: linear-gradient(var(--terracotta), var(--terracotta)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.6s var(--ease-out);
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn):focus-visible {
  background-size: 100% 2px;
}

.site-nav__staff {
  font-size: 0.8125rem;
  opacity: 0.85;
}

@media (max-width: 599px) {
  .site-nav {
    width: 100%;
    gap: 0.25rem 1rem;
  }

  .site-nav__staff {
    margin-left: auto;
  }
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 2px solid transparent;
  background: var(--limestone);
  color: var(--slate);
  font: 600 1rem/1.2 var(--font-text);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.9375rem;
}

.btn--light {
  margin-top: 2rem;
}

.btn--light:hover {
  background: transparent;
  color: var(--limestone);
  border-color: var(--limestone);
}

.btn--dark {
  background: var(--slate);
  color: var(--limestone);
}

.btn--dark:hover {
  background: transparent;
  color: var(--slate);
  border-color: var(--slate);
}

.site-nav .btn {
  border-color: var(--limestone);
  background: transparent;
  color: var(--limestone);
}

.site-nav .btn:hover {
  background: var(--limestone);
  color: var(--slate);
}

.link-arrow {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
}

.link-arrow::after {
  content: ' \2192';
}

.link-arrow--light {
  margin: 0 0 0 1.5rem;
}

/* ------------------------------------------------------------------- beats */

.beat {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background-color: var(--slate);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--limestone);
}

.beat--commute { background-image: url('/cinema/commute/poster-desktop.webp'); }
.beat--checkin { background-image: url('/cinema/checkin/poster-desktop.webp'); }
.beat--care { background-image: url('/cinema/care/poster-desktop.webp'); }
.beat--trends { background-image: url('/cinema/trends/poster-desktop.webp'); }

@media (max-width: 899.98px) {
  .beat--commute { background-image: url('/cinema/commute/poster-mobile.webp'); }
  .beat--checkin { background-image: url('/cinema/checkin/poster-mobile.webp'); }
  .beat--care { background-image: url('/cinema/care/poster-mobile.webp'); }
  .beat--trends { background-image: url('/cinema/trends/poster-mobile.webp'); }
}

.beat__canvas,
.beat__still,
.beat__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.beat__still {
  background: url('/cinema/demo/still-desktop.webp') center / cover no-repeat;
  transform-origin: 50% 50%;
  will-change: transform;
}

@media (max-width: 899.98px) {
  .beat__still {
    background-image: url('/cinema/demo/still-mobile.webp');
  }
}

.beat__scrim {
  pointer-events: none;
  background:
    linear-gradient(to top, rgb(35 44 42 / 0.92) 0%, rgb(47 59 56 / 0.82) 34%, rgb(47 59 56 / 0.4) 58%, rgb(47 59 56 / 0) 78%),
    linear-gradient(to bottom, rgb(35 44 42 / 0.55) 0%, rgb(35 44 42 / 0) 22%);
}

.beat__copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(2.5rem, 9vh, 6rem);
}

.beat__rule {
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--terracotta);
}

.beat__title {
  max-width: 17ch;
  font-size: clamp(2.125rem, 1.2rem + 4.6vw, 5.25rem);
}

.beat__body {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  color: var(--limestone);
}

@media (min-width: 900px) {
  .beat__title {
    max-width: 20ch;
  }
}

/* Words are revealed line by line by site.js. Hide them first only when script can run and motion is welcome; the
   failsafe animation shows them anyway if the script never starts. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .page--home [data-split]:not(.is-split) {
    opacity: 0;
    animation: split-failsafe 0.01s linear 4s forwards;
  }
}

@keyframes split-failsafe {
  to {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- sections */

.section {
  padding: clamp(4rem, 10vw, 9rem) 0;
}

.section--light {
  background: var(--limestone);
  color: var(--slate);
}

.section--dark {
  background: var(--slate);
  color: var(--limestone);
}

.section--sage {
  background: var(--sage-wash);
  color: var(--slate);
}

.section__title {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem);
  max-width: 20ch;
}

.section__lead {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: 1.1875rem;
}

.section--light .section__lead {
  color: var(--ink-soft);
}

.steps,
.promise,
.ticks {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.steps {
  display: grid;
  gap: 2.5rem;
}

.steps__item {
  padding-top: 1.5rem;
  border-top: 2px solid var(--slate);
}

.steps__num {
  display: block;
  margin-bottom: 1rem;
  font: 500 2.5rem/1 var(--font-display);
  color: var(--terracotta-ink);
}

.steps__item h3,
.promise__item h3 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.steps__item p,
.promise__item p {
  margin-top: 0.75rem;
}

.promise {
  display: grid;
  gap: 2.5rem 3rem;
}

.promise__item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--sage);
}

.promise__item p {
  color: var(--limestone-dim);
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .promise {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------------- pricing */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 78vh;
  overflow: hidden;
  padding: 8rem 0 4rem;
  background: var(--slate);
  color: var(--limestone);
}

.hero--short {
  min-height: 64vh;
}

.hero__still,
.hero__scrim {
  position: absolute;
  inset: 0;
}

.hero__still {
  background: url('/cinema/demo/still-desktop.webp') center / cover no-repeat;
}

@media (max-width: 899.98px) {
  .hero__still {
    background-image: url('/cinema/demo/still-mobile.webp');
  }
}

.hero__scrim {
  background: linear-gradient(to top, rgb(35 44 42 / 0.94) 0%, rgb(47 59 56 / 0.84) 50%, rgb(47 59 56 / 0.7) 100%);
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 18ch;
  font-size: clamp(2.25rem, 1.2rem + 5vw, 5.5rem);
}

.hero__lead {
  max-width: var(--measure);
  margin-top: 1.5rem;
  font-size: 1.1875rem;
}

.hero__actions {
  margin-top: 2rem;
}

.hero__actions .btn {
  margin-top: 0;
}

.plans {
  display: grid;
  gap: 2rem;
}

.plan {
  padding: 2rem 0 0;
  border-top: 2px solid var(--slate);
}

.plan h2 {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.plan__price {
  margin-top: 1.5rem;
  font: 500 clamp(2.25rem, 1.5rem + 2.4vw, 3.5rem)/1 var(--font-display);
  letter-spacing: -0.025em;
}

.plan__unit {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.plan__points {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.plan__points li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--limestone-dim);
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.ticks {
  display: grid;
  gap: 0.25rem;
}

.ticks li {
  position: relative;
  padding: 0.9rem 0 0.9rem 2rem;
  border-top: 1px solid rgb(127 163 138 / 0.5);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: 0.9rem;
  height: 2px;
  background: var(--sage);
}

.faq {
  margin: 3rem 0 0;
}

.faq__item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--slate);
}

.faq dt {
  font: 500 1.375rem/1.25 var(--font-display);
  letter-spacing: -0.015em;
}

.faq dd {
  max-width: var(--measure);
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------- form */

.form {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.form__row {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.form label,
.form legend {
  padding: 0;
  font-weight: 600;
  font-size: 0.9375rem;
}

.form input[type='text'],
.form input[type='email'],
.form select,
.form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--slate);
  border-radius: 0;
  background: #f6f2e9;
  color: var(--slate);
  font: 400 1rem/1.4 var(--font-text);
}

.form textarea {
  resize: vertical;
}

.form [aria-invalid='true'] {
  border-color: var(--terracotta-ink);
}

.form__error,
.form__summary {
  color: var(--terracotta-ink);
  font-weight: 600;
  font-size: 0.9375rem;
}

.form__choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.form__choice legend {
  width: 100%;
  margin-bottom: 0.5rem;
}

.form__radio,
.form__check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.form__radio input,
.form__check input {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0;
  accent-color: var(--slate);
}

.form .btn {
  justify-self: start;
}

.form__note {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* Honeypot: out of sight for people and screen readers, still in the DOM for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  padding: 3.5rem 0 3rem;
  background: var(--slate-deep);
  color: var(--limestone);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}

.site-footer__crisis {
  font: 500 1.375rem/1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.site-footer__copy {
  color: var(--limestone-dim);
}

/* --------------------------------------------------------- privacy notice */

.notice {
  max-width: var(--measure);
  scroll-margin-top: 2rem;
}

.notice + .notice {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 2px solid var(--sage);
}

.notice__title {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
}

.notice__meta,
.notice__review {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.notice__review {
  margin-top: 0.25rem;
  font-style: italic;
}

.notice__switch {
  margin-top: 1rem;
  font-weight: 600;
}

.notice__section {
  margin-top: 2.5rem;
}

.notice__section h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.notice__section p,
.notice__section ul {
  margin-top: 0.75rem;
}

.notice__section ul {
  padding-left: 1.25rem;
}

.notice__section li + li {
  margin-top: 0.25rem;
}

.notice__body {
  margin-top: 1.5rem;
}

.notice__body p + p {
  margin-top: 1rem;
}

.notice__section ol {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
}

.notice__section ol li + li {
  margin-top: 0.25rem;
}

/* -------------------------------------------------------- motion preference */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .beat__still {
    will-change: auto;
  }
}
