@font-face {
  font-family: "FFF Acid Grotesk";
  src: url("assets/font/FFF-AcidGrotesk-Light-TRIAL.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #000000;
  font-family: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

textarea,
button,
input {
  font-family: inherit;
}

/* High-resolution space dots canvas background */
.space-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Intro screen (lasts 2.7s before revealing home) */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-circle {
  width: clamp(220px, 28vw, 286px);
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.intro-text {
  color: #ffffff;
  font-size: clamp(1.5rem, 3.1vw, 2.15rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
}

/* Home layout */
.home {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 24px 72px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.home.is-visible {
  opacity: 1;
}

.dashed-divider {
  width: 100%;
  border: 0;
  height: 1px;
  margin: 0;
  background-image: repeating-linear-gradient(to right, #333333 0 10px, transparent 10px 24px);
}

.site-header,
.app-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  column-gap: 22px;
  padding-left: clamp(0px, 8vw, 96px);
  padding-right: clamp(0px, 8vw, 96px);
}

.site-header {
  align-items: center;
  padding-top: 4px;
  padding-bottom: 18px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.home-btn:hover {
  transform: scale(1.06);
}

.home-btn:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

.site-header .home-btn {
  margin-left: 4px;
}

.smiley-glyph {
  font-family: "FFF Acid Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-feature-settings: "dlig" 1;
  font-size: 46px;
  line-height: 1;
  color: #000000;
  display: block;
  user-select: none;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-title {
  font-size: 19px;
  font-weight: 400;
  color: #000000;
  margin: 0;
  letter-spacing: -0.01em;
}

.mail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid #444444;
  border-radius: 999px;
  background-color: #ffffff;
  color: #222222;
  text-decoration: none;
  font-family: "FFF Acid Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-feature-settings: "salt" 1, "ss11" 1;
  font-size: 18px;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mail-pill:hover {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
}

.mail-pill:focus-visible,
.download-btn:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.app-item {
  align-items: start;
  padding-top: 16px;
  padding-bottom: 18px;
}

.app-icon-box {
  width: 96px;
  height: 96px;
  border: 1px solid #9a9a9a;
  border-radius: 24px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.app-icon-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.app-icon-question {
  font-size: 28px;
  font-weight: 400;
  color: #111111;
  line-height: 1;
}

.app-title {
  font-size: 17px;
  font-weight: 400;
  color: #000000;
  margin: 0 0 6px;
}

.app-desc {
  font-size: 12.5px;
  line-height: 1.48;
  color: #2b2b2b;
  margin: 0 0 18px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 400;
  padding: 4px 16px;
  border-radius: 999px;
  transition: opacity 0.18s ease, transform 0.15s ease;
}

.download-btn:hover {
  opacity: 0.78;
}

.download-btn:active {
  transform: scale(0.97);
}

/* Email Me screen */
.mail-view {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px 24px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mail-view.is-visible {
  opacity: 1;
}

.mail-container {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.mail-home-btn {
  align-self: flex-start;
  margin-bottom: 18px;
}

.mail-textarea {
  width: 100%;
  min-height: 92px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  overflow: hidden;
  font-family: inherit;
  font-size: clamp(16px, 2.2vw, 19.5px);
  font-weight: 400;
  line-height: 1.38;
  color: #000000;
}

.mail-textarea::placeholder {
  color: #000000;
  opacity: 1;
}

.mail-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  text-decoration: none;
  font-family: "FFF Acid Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 300;
  font-style: italic;
  font-synthesis: style;
  font-feature-settings: "salt" 1, "ss11" 1;
  letter-spacing: -0.01em;
  padding: 4px 10px;
  border-radius: 999px;
  transition: opacity 0.18s ease, transform 0.15s ease;
}

.send-btn:hover {
  opacity: 0.6;
  transform: translateY(-1px);
}

.send-btn:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .home,
  .mail-view,
  .home-btn,
  .mail-pill,
  .download-btn,
  .send-btn {
    transition: none;
  }
}

@media (max-width: 600px) {
  .site-header,
  .app-item {
    grid-template-columns: 76px 1fr;
    column-gap: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  .app-icon-box {
    width: 76px;
    height: 76px;
    border-radius: 20px;
  }

  .mail-pill {
    min-width: 92px;
    height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .site-header {
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
  }

  .site-header .home-btn {
    margin-left: 0;
  }

  .app-item {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
}
