/* ========================================
   Glasshouse Dev.Studio — Landing Page
   ======================================== */

/* --- Fonts --- */
@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Display';
  src: url('../fonts/SF-Pro-Display-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Pro Text';
  src: url('../fonts/SF-Pro-Text-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #8699F2;
  --dark: #202732;
  --light: #F7F7FF;
  --white: #FFFFFF;
  --gray-100: #F0F0F8;
  --gray-200: #E2E2EE;
  --gray-400: #9999AA;
  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-primary: 'SF Pro Text', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Pro Text', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --section-pad: 120px;
  --section-pad-mobile: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 17px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.container--narrow {
  max-width: 720px;
}

.section {
  padding: var(--section-pad) 0;
}

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

.section--white {
  background: var(--white);
}

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

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section__eyebrow--center {
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.section__title--center {
  text-align: center;
}

.section__title--light {
  color: var(--light);
}

.section__body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--gray-400);
  max-width: 600px;
}

.section__body--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section__body--light {
  color: var(--gray-200);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
}

.btn--primary:hover {
  background: #7488e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(134, 153, 242, 0.4);
}

.btn--sm {
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 10px;
}

.btn--full {
  width: 100%;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(247, 247, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(32, 39, 50, 0.06);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav__logo--light {
  filter: brightness(0) invert(1);
}

.nav__name {
  font-weight: 500;
  font-size: 16px;
  color: var(--dark);
}

/* --- Hero --- */
.hero {
  padding-top: 160px;
  padding-bottom: var(--section-pad);
  background: var(--light);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--dark);
}

.hero__subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--gray-400);
  margin-bottom: 40px;
  max-width: 480px;
}

/* --- Phone Mockup --- */
.phone-mockup {
  width: 280px;
  height: 560px;
  background: var(--dark);
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(32, 39, 50, 0.2), 0 0 0 1px rgba(32, 39, 50, 0.08);
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-mockup__ui {
  text-align: center;
  padding: 40px 24px;
}

.phone-ui__header {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-ui__counter {
  font-size: 80px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.phone-ui__label {
  font-size: 16px;
  color: var(--dark);
  font-weight: 500;
  margin-bottom: 40px;
}

.phone-ui__milestones {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.milestone {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-200);
}

.milestone--done {
  background: var(--primary);
}

.milestone--active {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(134, 153, 242, 0.25);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

/* Hero phone with haze */
.hero__phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__phone-haze {
  position: absolute;
  width: 540px;
  height: 540px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(134, 153, 242, 0.38) 0%, rgba(134, 153, 242, 0.14) 45%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero__phone-wrap .phone-mockup {
  position: relative;
  z-index: 1;
}

/* Taller frame to match the simulator screenshot aspect ratio */
.hero__phone-wrap .phone-mockup {
  height: 600px;
}

/* Clean simulator screenshot — fills the phone frame seamlessly */
.hero__phone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* --- Problem --- */
.problem__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.stat-ring {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.stat-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.stat-ring__bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 8;
}

.stat-ring__fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 98;
  transition: stroke-dashoffset 1.5s ease;
}

.stat-ring__value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 700;
  color: var(--dark);
}

.stat-ring__label {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

/* --- Features --- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.feature-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(32, 39, 50, 0.08);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 16px;
  color: var(--primary);
  margin-bottom: 24px;
}

.feature-card__screenshot {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--gray-100);
}

.feature-card__img {
  position: absolute;
  pointer-events: none;
  max-width: none;
  display: block;
}

/* My Recovery — zoom in past the phone frame/background */
.feature-card:nth-child(1) .feature-card__img {
  width: 118.04%;
  height: 165.69%;
  left: -8.96%;
  top: -26.48%;
}

/* What's New */
.feature-card:nth-child(2) .feature-card__img {
  width: 100%;
  height: 152.19%;
  left: -0.1%;
  top: -10.1%;
}

/* Breathe */
.feature-card:nth-child(3) .feature-card__img {
  width: 101.87%;
  height: 154.94%;
  left: -1.87%;
  top: -9.26%;
}

/* Words of Encouragement — shift up to show notification */
.feature-card:nth-child(4) .feature-card__img {
  width: 100%;
  height: 152.09%;
  left: -0.03%;
  top: -36.8%;
}

.phone-mockup__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-400);
}

/* --- UVPs --- */
.uvps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.uvp-card {
  text-align: center;
  padding: 32px 24px;
}

.uvp-card__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(134, 153, 242, 0.15);
  border-radius: 14px;
  color: var(--primary);
  margin-bottom: 20px;
}

.uvp-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 10px;
}

.uvp-card__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-400);
}

/* --- Customization --- */
.custom__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.custom__phones {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.phone-mockup--sm {
  width: 160px;
  height: 320px;
  border-radius: 24px;
  padding: 8px;
}

.phone-mockup--sm .phone-mockup__screen {
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 24px 16px;
}

.phone-mockup__bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  margin-bottom: 16px;
  width: 60%;
}

.phone-mockup__lines {
  flex: 1;
  background: repeating-linear-gradient(
    to bottom,
    var(--gray-100) 0px,
    var(--gray-100) 6px,
    transparent 6px,
    transparent 14px
  );
  border-radius: 4px;
}

.phone-mockup--teal {
  background: #5BBFA7;
}

.phone-mockup--purple {
  background: var(--primary);
}

.phone-mockup--navy {
  background: var(--dark);
}

/* --- Process Wave --- */
.section--process-wave {
  background: #E6E9FD;
}

.process__stage {
  position: relative;
  height: 356px;
  margin-top: 64px;
}

.process__wave-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.process__wave-text {
  position: absolute;
  width: 188px;
  text-align: center;
}

.process__wave-text--1 { left: 87px; top: 67px; }
.process__wave-text--2 { left: 427px; top: 149px; }
.process__wave-text--3 { left: 752px; top: 0; }

.process__wave-icon {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(32, 39, 50, 0.08);
}

.process__wave-icon img {
  width: 24px;
  height: 24px;
}

.process__wave-icon--1 { left: 141px; top: 276px; }
.process__wave-icon--2 { left: 481px; top: 29px; }
.process__wave-icon--3 { left: 806px; top: 209px; }

.process__wave-number {
  display: block;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 8px;
}

.process__wave-label {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}

.process__wave-desc {
  font-size: 16px;
  line-height: 1.5;
  color: #1e1e1e;
}

.process__wave-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.btn--pill {
  border-radius: 40px;
}

/* Step wrappers: transparent on desktop so absolute positioning of children still works */
.process__step-wrap {
  display: contents;
}

@media (max-width: 1024px) {
  .process__stage {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .process__wave-svg { display: none; }

  /* Step wrappers: vertical cards with icon on top */
  .process__step-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    padding-bottom: 8px;
    position: relative;
  }

  /* Vertical connector line between steps */
  .process__step-wrap:not(:last-child)::after {
    content: '';
    display: block;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(134, 153, 242, 0.6), rgba(134, 153, 242, 0.15));
    border-radius: 2px;
    margin: 8px auto 0;
  }

  /* Icon always first in the visual order */
  .process__wave-icon {
    order: -1;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    position: static;
  }

  .process__wave-text {
    position: static;
    width: auto;
    order: 0;
  }

  .process__wave-text--1,
  .process__wave-text--2,
  .process__wave-text--3,
  .process__wave-icon--1,
  .process__wave-icon--2,
  .process__wave-icon--3 {
    left: auto;
    top: auto;
  }
}

/* --- Process (legacy - kept for reference) --- */
.process__timeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 64px;
}

.process__step {
  text-align: center;
  flex: 1;
  max-width: 200px;
}

.process__marker {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.process__label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.process__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-400);
}

.process__connector {
  width: 48px;
  height: 2px;
  background: var(--gray-200);
  margin-top: 24px;
  flex-shrink: 0;
}

/* --- Case Study --- */
.case__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.case__stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.case__stat {
  display: flex;
  flex-direction: column;
}

.case__stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.case__stat-label {
  font-size: 14px;
  color: var(--gray-400);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.phone-mockup__ui--dashboard {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  height: 100%;
}

.dashboard__bar {
  width: 32px;
  height: var(--h);
  background: var(--primary);
  border-radius: 6px 6px 0 0;
  opacity: 0.8;
}

.dashboard__bar:nth-child(2) {
  opacity: 1;
}

.dashboard__bar:nth-child(4) {
  opacity: 1;
  background: var(--dark);
}

/* --- Contact Section Pattern --- */
.section--dark {
  position: relative;
  overflow: hidden;
}

.contact__bg-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#contact .container,
#uvps .container {
  position: relative;
  z-index: 1;
}

.section__title--accent {
  color: var(--primary);
}

/* --- Contact Form --- */
.contact-form {
  margin-top: 48px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form__field {
  margin-bottom: 20px;
}

.contact-form__field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-200);
  margin-bottom: 8px;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-primary);
  font-size: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--light);
  transition: border-color 0.2s ease;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--gray-400);
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form__field textarea {
  resize: vertical;
}

.contact-form .btn {
  margin-top: 8px;
}

/* --- Dashboard Phone (Case Study) --- */
.db-phone {
  width: 280px;
  background: var(--dark);
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(32, 39, 50, 0.22), 0 0 0 1px rgba(32, 39, 50, 0.08);
  margin: 0 auto;
}

.db-phone__inner {
  width: 100%;
  background: var(--light);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 10px;
}

/* Dynamic island */
.db-phone__inner::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: var(--dark);
  border-radius: 20px;
  z-index: 10;
}

.db-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 2px;
  margin-top: 20px;
}

.db-status__time {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  font-family: var(--font-display);
}

.db-status__icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--dark);
}

.db-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px 10px;
}

.db-header__greeting {
  font-size: 10px;
  color: var(--gray-400);
  display: block;
  margin-bottom: 1px;
}

.db-header__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
}

.db-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 10px;
}

.db-metric {
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.db-metric--accent {
  background: var(--primary);
}

.db-metric--accent .db-metric__value,
.db-metric--accent .db-metric__label {
  color: white;
}

.db-metric--accent .db-metric__delta--up {
  color: rgba(255, 255, 255, 0.75);
}

.db-metric__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
}

.db-metric__label {
  font-size: 9px;
  color: var(--gray-400);
  margin-top: 3px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-metric__delta {
  font-size: 10px;
  font-weight: 500;
}

.db-metric__delta--up {
  color: #5BBFA7;
}

.db-chart {
  background: white;
  border-radius: 12px;
  margin: 0 12px 8px;
  padding: 10px 12px;
}

.db-chart__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.db-chart__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
}

.db-chart__range {
  font-size: 9px;
  color: var(--gray-400);
}

.db-chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 52px;
}

.db-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 3px;
}

.db-bar::before {
  content: '';
  width: 100%;
  height: var(--h);
  background: var(--gray-200);
  border-radius: 3px 3px 2px 2px;
}

.db-bar--active::before {
  background: var(--primary);
}

.db-bar__day {
  font-size: 7px;
  color: var(--gray-400);
}

.db-bar--active .db-bar__day {
  color: var(--primary);
  font-weight: 600;
}

.db-feed {
  padding: 0 12px 8px;
  flex: 1;
}

.db-feed__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
  display: block;
  margin-bottom: 6px;
}

.db-feed__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}

.db-feed__item:last-child {
  border-bottom: none;
}

.db-feed__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-feed__dot--green { background: #5BBFA7; }
.db-feed__dot--purple { background: var(--primary); }

.db-feed__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.db-feed__name {
  font-size: 10px;
  font-weight: 600;
  color: var(--dark);
}

.db-feed__action {
  font-size: 9px;
  color: var(--gray-400);
}

.db-feed__time {
  font-size: 9px;
  color: var(--gray-400);
}

.db-tabs {
  display: flex;
  border-top: 1px solid var(--gray-100);
  padding: 7px 0 10px;
  background: white;
}

.db-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--gray-400);
}

.db-tab--active {
  color: var(--primary);
}

.db-tab span {
  font-size: 8px;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand .nav__wordmark {
  background: var(--primary);
  color: var(--white);
}

.footer__brand .nav__name {
  color: var(--light);
}

.footer__links a {
  font-size: 15px;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--primary);
}

.footer__copy {
  font-size: 13px;
  color: var(--gray-400);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero__title {
    font-size: 48px;
  }

  .section__title {
    font-size: 36px;
  }

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

  /* Hero phone: correct proportional height at tablet width */
  .hero__phone-wrap .phone-mockup {
    height: 520px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: var(--section-pad-mobile);
  }

  /* Hero */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero__title {
    font-size: 40px;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  /* Hero phone: scale down proportionally for mobile */
  .hero__phone-wrap .phone-mockup {
    width: 220px;
    height: 477px;
  }

  /* Contain the haze so it doesn't overflow horizontally */
  .hero__phone-haze {
    width: 340px;
    height: 340px;
  }

  /* Default phone mockup (customization section, etc.) */
  .phone-mockup {
    width: 240px;
    height: 480px;
  }

  /* Grids: stack to single column */
  .problem__grid,
  .custom__grid,
  .case__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section__title {
    font-size: 32px;
  }

  .features__grid,
  .uvps__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Feature card screenshots: reduce height and use natural cover instead of
     per-card absolute positioning (which was tuned for desktop dimensions) */
  .feature-card__screenshot {
    height: 220px;
  }

  .feature-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  /* Override all per-card desktop positioning values */
  .feature-card:nth-child(1) .feature-card__img,
  .feature-card:nth-child(2) .feature-card__img,
  .feature-card:nth-child(3) .feature-card__img,
  .feature-card:nth-child(4) .feature-card__img {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
  }

  /* My Recovery: show the Days Sober counter (mid section of image) */
  .feature-card:nth-child(1) .feature-card__img {
    object-position: center 40%;
  }

  /* Words of Encouragement: notification is in the bottom third */
  .feature-card:nth-child(4) .feature-card__img {
    object-position: center 85%;
  }

  /* Customization phones: prevent overflow, wrap if needed */
  .custom__phones {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .phone-mockup--sm {
    width: 110px;
    height: 220px;
  }

  /* Case study: center dashboard phone */
  .db-phone {
    width: 240px;
    margin: 0 auto;
  }

  /* Process: reduce oversized step number */
  .process__wave-number {
    font-size: 44px;
  }

  /* Contact form */
  .contact-form__row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .case__stats {
    justify-content: center;
  }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .hero__title {
    font-size: 34px;
  }

  .section__title {
    font-size: 28px;
  }

  .hero__phone-wrap .phone-mockup {
    width: 200px;
    height: 433px;
  }

  .hero__phone-haze {
    width: 280px;
    height: 280px;
  }

  .features__grid {
    gap: 16px;
  }

  .uvps__grid {
    gap: 12px;
  }

  .case__stats {
    gap: 24px;
  }

  .custom__phones {
    gap: 10px;
  }

  .phone-mockup--sm {
    width: 90px;
    height: 180px;
  }

  .process__wave-number {
    font-size: 36px;
  }

  .nav__inner {
    padding: 0 20px;
  }
}
