/*
  Dialed website: Home page styles (index.html only). Loaded after /css/site.css.
  A faithful copy of the live Framer homepage. Section layout values come from the live page's
  CSS; the four code components (hero video, Download Dialed button, How it works, download
  cards, founder card) use the exact inline styles their Framer code renders. Change a value
  only after checking it against the live site (reference/home/).

  Breakpoints, as everywhere on the site: Desktop from 1200px wide, Phone below that.
  Layout switches at (max-width: 1199.98px), the hero headline's text size at (max-width: 1199px).
*/

:root {
  --home-font: "DM Sans", system-ui, sans-serif; /* the code components' own font stack */
  --home-heading: #f0f2f5;
  --home-body: #7a8a92;
  --home-border: #152028;
  --home-step: #273f4e;
  --home-blue: #0d648f;
  --home-blue-hover: #0a527a;
  --home-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  /* The app's own colours (constants/colors.ts) for the fork card. */
  --app-text: #e1e4e5;
  --app-text-tertiary: #6e787d;
  --app-track: #17252e;
}

/* ---------- Hero ---------- */

.home-hero {
  background-color: var(--color-core-black);
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center flex-start;
  align-items: center;
  gap: 72px;
  width: 100%;
  height: min-content;
  padding: 32px 72px 80px;
  position: relative;
  overflow: hidden;
}
.home-hero__video {
  pointer-events: none;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* The video layer (js/hero.js). The still is chosen here, by media query, so the right one shows
   before any script runs: the phone still below 1200px wide or in portrait, as the video. */
.dialed-hero-video {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--color-core-black);
}
.dialed-hero-video-still {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url("/assets/dialed-hero-desktop-poster.jpg");
}
@media (max-width: 1199.98px), (orientation: portrait) {
  .dialed-hero-video-still {
    background-image: url("/assets/dialed-hero-mobile-poster.jpg");
  }
}
.dialed-hero-video video::-webkit-media-controls,
.dialed-hero-video video::-webkit-media-controls-start-playback-button,
.dialed-hero-video video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}
/* Invisible until its first "playing" event, so a refused play never shows anything. */
.dialed-hero-video video {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  opacity: 0;
  transition: opacity 0.2s linear;
}
.dialed-hero-video video.is-playing {
  opacity: 1;
}
/* Readability overlay, measured from the top of the hero. Never lighter than 0.70 in the middle:
   contrast was checked on every frame of the video at that value. */
.dialed-hero-video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, #010B0F 0px, rgba(1,11,15,0.70) 140px, rgba(1,11,15,0.70) 440px, rgba(1,11,15,0.9) 700px, #010B0F 100%);
}

.home-hero__content,
.home-hero__top,
.home-hero__text {
  height: min-content;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  padding: 0;
  position: relative;
}
.home-hero__content {
  gap: 28px;
  width: 1056px;
}
.home-hero__top {
  gap: 64px;
  width: 100%;
}
.home-hero__text {
  gap: 12px;
  width: 100%;
  padding: 0 64px;
}

/* Text boxes behave like Framer's rich text containers (a flex column holding one block). */
.home-hero__title-box,
.home-hero__subtitle-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 0 0 auto;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  height: auto;
  position: relative;
  transform: none;
}
.home-hero__title-box {
  width: 100%;
  max-width: 77%;
}
.home-hero__subtitle-box {
  width: auto;
  max-width: 800px;
}
.home-hero__title {
  margin: 0;
  padding: 0;
  font-family: var(--font-dm-sans);
  font-style: normal;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -2px;
  line-height: 110%;
  color: var(--color-text);
  text-align: center;
  text-transform: none;
  text-decoration: none;
  font-feature-settings: normal;
  font-variation-settings: normal;
}
.home-hero__subtitle {
  margin: 0;
  padding: 0;
  font-family: var(--font-dm-sans);
  font-style: normal;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 130%;
  color: rgb(200, 208, 212);
  text-align: center;
  text-transform: none;
  text-decoration: none;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

/* "Download Dialed": scrolls to the download cards (js/download.js adds the hover look). */
.home-hero__cta {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  position: relative;
}
.hero-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--home-font);
  background: transparent;
}
.hero-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--home-blue);
  color: #fff;
  border-radius: 9999px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--home-font);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
  transform: translateY(0);
  cursor: pointer;
}
.hero-cta__button.is-hover {
  background: var(--home-blue-hover);
  transform: translateY(-2px);
}

/* App screenshots: fit inside 960px wide and 60% of the window height. */
.home-hero__phones {
  display: flex;
  flex-flow: row;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-width: 960px;
  height: auto;
  max-height: 60vh;
  aspect-ratio: 1.170532060027285;
  padding: 0;
  position: relative;
}
.home-hero__phones-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.home-hero__phones-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-position: center;
  object-fit: contain;
}
/* The <picture> around it (Framer's AVIF and WebP, the PNG as the fallback) makes no box of its
   own, so the image lays out as a direct child of the frame. It passes the frame's radius on, so
   the image's "inherit" still reads the frame's value. */
.home-hero__phones-frame picture {
  display: contents;
  border-radius: inherit;
}

/* ---------- How it works ---------- */

.home-how {
  background-color: var(--color-core-black);
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center flex-start;
  align-items: center;
  gap: 0;
  width: 100%;
  height: min-content;
  padding: 64px 72px 80px;
  position: relative;
  overflow: hidden;
}
.home-how__strip {
  flex: 0 0 auto;
  width: 860px;
  height: auto;
  position: relative;
}
.how-it-works {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--home-font);
}
.how-it-works__heading {
  margin: 0;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  color: var(--home-heading);
  font-family: var(--home-font);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.how-it-works__box {
  margin-top: 32px;
  background: var(--color-secondary-black);
  border: 1px solid var(--home-border);
  border-radius: 20px;
  padding: clamp(16px, 4.5vw, 36px);
  box-sizing: border-box;
  box-shadow: var(--home-card-shadow);
}
.how-it-works__row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.how-it-works__steps {
  flex: 1 1 340px;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.how-it-works__step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.how-it-works__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--home-step);
  color: var(--app-text);
  font-family: var(--home-font);
  font-weight: 700;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
}
.how-it-works__step-body {
  min-width: 0;
  padding-top: 3px;
}
.how-it-works__step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--home-heading);
  font-family: var(--home-font);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.how-it-works__step-text {
  margin: 4px 0 0 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--home-body);
  font-family: var(--home-font);
  line-height: 1.6;
  text-wrap: pretty;
}
.how-it-works__card-slot {
  flex: 1 1 340px;
  min-width: 0;
  max-width: 420px;
}

/* The app's dashboard fork card (components/dashboard/ComponentCard.tsx, HoursViz). The fill
   width, minimum width and colour are set inline, and changed by js/how-it-works.js. */
.fork-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-core-black);
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 18px clamp(16px, 4.5vw, 20px);
  font-family: var(--home-font);
}
.fork-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fork-card__name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fork-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--home-step);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fork-card__label {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.12px;
  color: var(--app-text-tertiary);
  text-transform: uppercase;
}
.fork-card__row {
  margin-top: 14px;
}
.fork-card__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.fork-card__row-label {
  min-width: 0;
  font-weight: 500;
  font-size: clamp(16px, 4.4vw, 17px);
  color: var(--app-text-tertiary);
}
/* The readout never wraps, and the counting number sits in a right-aligned box as wide as the
   total's digits: DM Sans has no tabular figures, so a bare number would slide as it counts. */
.fork-card__readout {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 500;
  font-size: 16px;
  color: var(--app-text);
}
.fork-card__count {
  display: inline-block;
  text-align: right;
}
.fork-card__count--2 {
  min-width: 2ch;
}
.fork-card__count--3 {
  min-width: 3ch;
}
.fork-card__track {
  height: 10px;
  border-radius: 5px;
  background: var(--app-track);
  overflow: hidden;
}
.fork-card__fill {
  height: 100%;
  border-radius: 5px;
  transition: background-color 250ms ease;
}

/* ---------- Download cards ("Beta testing" in Framer) ---------- */

.home-download {
  background-color: var(--color-secondary-black);
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center flex-start;
  align-items: center;
  gap: 72px;
  width: 100%;
  height: min-content;
  padding: 64px 72px 80px;
  position: relative;
  overflow: hidden;
}
.home-download__cards {
  flex: 0 0 auto;
  width: 860px;
  height: auto;
  position: relative;
}
.store-cards {
  position: relative;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  font-family: var(--home-font);
}
.store-cards__heading {
  margin: 0 0 12px 0;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  color: var(--home-heading);
  font-family: var(--home-font);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.store-cards__intro {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--home-body);
  font-family: var(--home-font);
  font-weight: 400;
  line-height: 1.6;
}
.store-cards__row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}
.store-card {
  flex: 1 1 320px;
  min-width: 280px;
  background: var(--color-core-black);
  border: 1px solid var(--home-border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  box-sizing: border-box;
  box-shadow: var(--home-card-shadow);
}
.store-card__title {
  margin: 0;
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 800;
  color: var(--home-heading);
  font-family: var(--home-font);
  letter-spacing: -0.03em;
  line-height: 1.1;
  word-break: break-word;
}
/* Flex, not inline: as an inline box it inherited the text strut and knocked the Google badge out
   of line. The badges' own sizes are inline on each <img>, as on the live site. */
.store-card__badge,
.store-card__link {
  display: flex;
}

/* ---------- About me (founder card) ---------- */

.home-about {
  background-color: var(--color-core-black);
  height: min-content;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  gap: 40px;
  width: 100%;
  padding: 72px;
  position: relative;
}
.home-about__slot {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  position: relative;
}
.founder {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--home-font);
  background: transparent;
}
/* Hidden until it scrolls into view, then fades and slides up (js/download.js), as live. */
.founder__card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--color-secondary-black);
  border: 1px solid var(--home-border);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
  box-sizing: border-box;
  box-shadow: var(--home-card-shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.founder__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.founder__photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13, 100, 143, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.founder__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* The photo's <picture> (AVIF and WebP, the PNG as the fallback) makes no box of its own. */
.founder__photo picture {
  display: contents;
}
.founder__text {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.founder__title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--home-heading);
  font-family: var(--home-font);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.founder__bio {
  margin: 0;
  font-size: 18px;
  color: var(--home-body);
  font-family: var(--home-font);
  font-weight: 400;
  line-height: 1.7;
}
.founder__sign {
  margin: 0;
  font-size: 18px;
  color: var(--home-blue);
  font-family: var(--home-font);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Phone layout ---------- */

@media (max-width: 1199.98px) {
  .home-hero {
    gap: 56px;
    padding: 32px 32px 64px;
  }
  .home-hero__content,
  .home-hero__top {
    width: min-content;
  }
  .home-hero__text {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: min-content;
    padding: 0;
  }
  .home-hero__title-box {
    max-width: none;
    order: 0;
    align-self: stretch;
    width: auto;
  }
  .home-hero__subtitle-box {
    order: 1;
    width: 300px;
    max-width: 300px;
  }
  .home-how {
    padding: 48px 32px 64px;
  }
  .home-how__strip {
    width: 100%;
  }
  .home-download {
    gap: 56px;
    padding: 48px 32px 64px;
  }
  .home-download__cards {
    width: auto;
  }
  .home-about {
    padding: 64px 32px 56px;
  }
}
@media (max-width: 1199px) {
  .home-hero__title {
    font-size: 45px;
  }
}
