:root {
  --dwell-bg: #031c17;
  --dwell-border: rgba(151, 219, 174, 0.22);
  --dwell-text: #f4fbf6;
  --dwell-muted: rgba(244, 251, 246, 0.74);
  --dwell-green: #78d98b;
  --dwell-green-2: #1d7b46;
  --dwell-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

body.dwell-home-page {
  min-height: 100vh;
  color: var(--dwell-text);
  background:
    radial-gradient(circle at 85% 18%, rgba(56, 133, 89, 0.32), transparent 31rem),
    radial-gradient(circle at 10% 100%, rgba(26, 102, 76, 0.32), transparent 36rem),
    linear-gradient(145deg, #021411 0%, var(--dwell-bg) 44%, #03110f 100%);
}

body.dwell-home-page header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 27, 22, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

body.dwell-home-page .nav-link,
body.dwell-home-page .nav-dropbtn,
body.dwell-home-page .account-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.dwell-home {
  overflow: hidden;
}

.dwell-hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
  padding: clamp(4rem, 8vw, 7.5rem) clamp(1.5rem, 5vw, 4.5rem) 4rem;
  isolation: isolate;
}

.dwell-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(2, 19, 16, 0.98) 0%, rgba(2, 26, 21, 0.88) 31%, rgba(2, 22, 18, 0.35) 68%, rgba(2, 22, 18, 0.88) 100%),
    radial-gradient(circle at 72% 32%, rgba(185, 220, 191, 0.25), transparent 18rem),
    linear-gradient(155deg, #142f28 0%, #0c4434 24%, #54775d 43%, #12271f 55%, #021c16 100%);
}

.dwell-hero-overlay {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  z-index: -1;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 28, 23, 0.72) 72%, var(--dwell-bg) 100%);
}

.dwell-hero-content {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--dwell-green);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.dwell-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.dwell-hero h1 span {
  color: var(--dwell-green);
}

.hero-copy {
  max-width: 600px;
  margin: 1.6rem 0 0;
  color: var(--dwell-muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.hero-action-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.secondary-cta {
  border: 1px solid var(--dwell-border);
  cursor: pointer;
  font: inherit;
}

.signin-button {
  text-decoration: none;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 999px;
  padding: 0.92rem 1.3rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-cta {
  color: white;
  background: linear-gradient(135deg, var(--dwell-green-2), #2f9657);
  box-shadow: 0 18px 40px rgba(22, 116, 67, 0.34);
}

.secondary-cta {
  color: var(--dwell-text);
  border: 1px solid var(--dwell-border);
  background: rgba(255, 255, 255, 0.06);
}

.signed-in-note {
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.66);
}

.home-projects-section {
  padding: 2rem clamp(1.5rem, 5vw, 4.5rem) 4.5rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
  max-width: 550px;
  color: var(--dwell-muted);
  line-height: 1.55;
}

.home-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.home-project-card {
  overflow: hidden;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  color: var(--dwell-text);
  text-decoration: none;
  border: 1px solid var(--dwell-border);
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(4, 54, 44, 0.72), rgba(3, 26, 22, 0.94));
  box-shadow: var(--dwell-shadow);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 220ms ease, border-color 220ms ease, opacity 500ms ease;
}

.home-project-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.home-project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(120, 217, 139, 0.58);
}

.project-image-wrap {
  position: relative;
  min-height: 180px;
  background: linear-gradient(135deg, #183b30, #071f1a);
}

.project-image-wrap img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  opacity: 0.84;
  transition: transform 400ms ease, opacity 220ms ease;
}

.home-project-card:hover img {
  transform: scale(1.04);
  opacity: 1;
}

.project-icon {
  position: absolute;
  left: 1.45rem;
  bottom: -1.7rem;
  display: grid;
  width: 3.55rem;
  height: 3.55rem;
  place-items: center;
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #8bb13f, #0d9fb7);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2.6rem 1.55rem 1.35rem;
}

.project-badge {
  align-self: flex-start;
  margin-bottom: 1rem;
  border-radius: 999px;
  padding: 0.24rem 0.64rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-badge.private {
  color: #d9ffe2;
  background: rgba(120, 217, 139, 0.16);
}

.project-badge.public {
  color: #d7f5ff;
  background: rgba(52, 179, 211, 0.16);
}

.project-content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.24rem;
}

.project-content p {
  margin: 0;
  color: var(--dwell-muted);
  line-height: 1.55;
}

.project-link-text {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.2rem;
  color: var(--dwell-green);
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  font-weight: 700;
}

.dwell-home-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.8rem clamp(1.5rem, 5vw, 4.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.66);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

/* ===== Services panel ===== */
.dwell-hero-content {
  max-width: 700px;
  transition: transform 520ms ease, opacity 420ms ease;
}

.services-panel {
  position: absolute;
  top: 50%;
  left: clamp(1.5rem, 5vw, 4.5rem);
  transform: translate(-28px, -50%);
  width: min(640px, calc(100% - 3rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 520ms ease, opacity 420ms ease;
  padding: 2rem;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(4,54,44,0.9), rgba(3,26,22,0.94));
  border: 1px solid var(--dwell-border);
  box-shadow: var(--dwell-shadow);
  backdrop-filter: blur(18px);
}

.dwell-hero.services-open .dwell-hero-content {
  transform: translateX(720px);
  opacity: 0;
  pointer-events: none;
}

.dwell-hero.services-open .services-panel {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}

.services-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.services-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1.35rem;
  cursor: pointer;
}

.services-panel h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.services-intro {
  margin: 0 0 1.4rem;
  color: var(--dwell-muted);
  line-height: 1.6;
}

.services-list {
  display: grid;
  gap: 0.9rem;
}

.service-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.1);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--dwell-green-2), var(--dwell-green));
  color: white;
  font-size: 1.25rem;
}

.service-item h3 {
  margin: 0 0 0.35rem;
  color: white;
}

.service-item p {
  margin: 0;
  color: var(--dwell-muted);
  line-height: 1.5;
}

.service-link {
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.service-link:hover {
  transform: translateY(-3px);
  border-color: rgba(120,217,139,0.45);
  background: rgba(255,255,255,0.09);
}

.service-open-icon {
  position: absolute;
  top: 14px;
  right: 16px;
  color: rgba(255,255,255,0.62);
  font-size: 1rem;
  font-weight: 800;
}

.service-link:hover .service-open-icon {
  color: var(--dwell-green);
}

@media (max-width: 1180px) {
  .home-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section-heading,
  .dwell-home-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-projects-grid {
    grid-template-columns: 1fr;
  }

  .services-panel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 2rem;
  }

  .dwell-hero.services-open .dwell-hero-content {
    transform: none;
    opacity: 0;
    display: none;
  }

  .dwell-hero.services-open .services-panel {
    transform: none;
  }  
}

/* ===== Sign in panel ===== */

.signin-panel {
  position: absolute;

  top: 50%;
  left: clamp(1.5rem, 5vw, 4.5rem);

  transform: translate(-28px, -50%);

  width: min(520px, calc(100% - 3rem));

  opacity: 0;
  pointer-events: none;

  transition:
    transform 520ms ease,
    opacity 420ms ease;

  padding: 2rem;

  border-radius: 28px;

  background:
    linear-gradient(
      135deg,
      rgba(4,54,44,0.9),
      rgba(3,26,22,0.94)
    );

  border: 1px solid var(--dwell-border);

  box-shadow: var(--dwell-shadow);

  backdrop-filter: blur(18px);
}

.dwell-hero.signin-open .dwell-hero-content {
  transform: translateX(620px);
  opacity: 0;
  pointer-events: none;
}

.dwell-hero.signin-open .signin-panel {
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}

.signin-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.signin-button {
  text-decoration: none;
}

.inline-login-card {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.inline-login-card label {
  color: rgba(244,251,246,0.82);
  font-size: 0.86rem;
  font-weight: 700;
}

.inline-login-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font: inherit;
  outline: none;
}

.inline-login-card input::placeholder {
  color: rgba(255,255,255,0.44);
}

.inline-login-card input:focus {
  border-color: rgba(120,217,139,0.7);
  box-shadow: 0 0 0 3px rgba(120,217,139,0.14);
}

.login-inline-btn {
  width: 100%;
  justify-content: center;
  border: 0;
  cursor: pointer;
  margin-top: 0.2rem;
}

.login-inline-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.home-otp-block {
  display: none;
  gap: 0.75rem;
}

.home-otp-block.is-visible {
  display: grid;
}

.home-login-message {
  min-height: 1.2rem;
  margin: 0.3rem 0 0;
  color: rgba(244,251,246,0.72);
  font-size: 0.9rem;
}

.home-login-message.error {
  color: #ffb4b4;
}

.home-login-message.success {
  color: var(--dwell-green);
}

body.login-page {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  color: var(--dwell-text);
  background:
    radial-gradient(circle at 85% 18%, rgba(56, 133, 89, 0.32), transparent 31rem),
    radial-gradient(circle at 10% 100%, rgba(26, 102, 76, 0.32), transparent 36rem),
    linear-gradient(145deg, #021411 0%, var(--dwell-bg) 44%, #03110f 100%) !important;
}

.login-wrapper {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
}

.login-page-panel.is-static {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  width: min(520px, 100%);
}

.login-page-panel.is-static h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}