/* ============================================================
   DESIGN TOKENS
   These ":root" variables are reusable values. Define a color
   once here, use it everywhere with var(--name). Change it in
   one place and the whole site updates. Pros do this for every
   real project.
   ============================================================ */
:root {
  --bg:            #0f0f12;  /* near-black page background */
  --bg-raised:     #1a1a1f;  /* slightly lighter: inputs, badge */
  --border:        #2a2a31;  /* subtle borders */
  --text:          #f5f5f7;  /* near-white headings */
  --text-muted:    #a1a1aa;  /* gray body text (tagline) */
  --text-faint:    #6b6b73;  /* fainter gray (footnote) */
  --accent:        #c425dd;  /* the magenta button / brand color */
  --accent-hover:  #ad1ec4;  /* darker magenta for hover state */

  --radius:        16px;     /* default rounded-corner size */
  --max-width:     460px;    /* how wide the hero content can get */
}

/* ============================================================
   RESET
   Browsers add default margins/padding that fight your layout.
   This wipes the slate clean so YOU control all spacing.
   box-sizing: border-box makes width include padding+border —
   far more intuitive when sizing things. Set it on everything.
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================
   BASE / PAGE
   ============================================================ */
body {
  background-color: var(--bg);
  color: var(--text);

  /* The system font stack: uses San Francisco on Mac/iPhone,
     Segoe on Windows, etc. Looks native everywhere, loads instantly. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;

  line-height: 1.5;            /* comfortable spacing between lines of text */
  -webkit-font-smoothing: antialiased;  /* crisper text on Mac */
}

/* Make the icon image behave: never overflow, keep crisp corners. */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============================================================
   HERO  (the first screen — everything centered)
   ============================================================ */
.hero {
  min-height: 100vh;          /* fallback for older browsers */
  /* 100svh = the SMALL viewport height: the visible area when the phone's
     address bar is showing. Using it (plus the tighter spacing below)
     keeps the icon, pills, AND signup form on one screen — no scrolling. */
  min-height: 100svh;

  /* Flexbox: the modern way to center things.
     - flex-direction: column  -> stack children top to bottom
     - align-items: center     -> center them horizontally
     - justify-content: center -> center them vertically */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 32px 24px;         /* breathing room, trimmed so it all fits */
}

.app-icon {
  width: 104px;
  height: 104px;
  border-radius: 24px;        /* rounded-square, like an iOS icon */
  margin-bottom: 22px;
}

.title {
  /* clamp(min, preferred, max): FLUID type. Font grows with screen
     width but never smaller than 2.6rem or larger than 4rem.
     This is how you get one size that works on phone AND desktop. */
  font-size: clamp(2.6rem, 8vw, 4rem);
  font-weight: 800;           /* very bold */
  letter-spacing: -0.02em;    /* tighten big bold text slightly */
  line-height: 1.05;
}

.tagline {
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  color: var(--text-muted);
  margin-top: 18px;
}

/* ---- Feature pills ---- */
.feature-pills {
  list-style: none;           /* no bullet points */
  display: flex;
  flex-wrap: wrap;            /* let pills wrap onto multiple lines */
  justify-content: center;    /* center each row */
  gap: 8px;
  margin-top: 26px;
  max-width: var(--max-width);
}

.feature-pills li {
  padding: 7px 14px;
  border-radius: 999px;       /* full pill shape */
  background-color: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;        /* keep each label on one line */
}

/* ---- Signup form ---- */
.signup {
  display: flex;
  flex-direction: column;
  gap: 14px;                  /* space between input, button, status */
  width: 100%;
  max-width: var(--max-width);
  margin-top: 26px;
}

.email-input {
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius);
  background-color: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
}

/* Style the placeholder ("you@email.com") text color. */
.email-input::placeholder {
  color: var(--text-faint);
}

/* :focus = when the field is clicked/tabbed into. Show a clear ring
   so keyboard users (and everyone) can see where they are. */
.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 37, 221, 0.25);
}

.submit-btn {
  width: 100%;
  padding: 17px 24px;
  border: none;
  border-radius: var(--radius);
  background-color: var(--accent);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;            /* show a hand pointer on hover */
  /* Smoothly animate color/scale changes instead of snapping. */
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.submit-btn:hover {
  background-color: var(--accent-hover);
}

.submit-btn:active {
  transform: scale(0.985);    /* tiny press-down effect when clicked */
}

/* The status line after submitting. Empty by default. */
.form-status {
  font-size: 0.9rem;
  min-height: 1.2em;          /* reserve space so layout doesn't jump */
  color: var(--text-muted);
}
.form-status.success { color: #4ade80; }  /* green */
.form-status.error   { color: #f87171; }  /* red */

.footnote {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-faint);
  max-width: 420px;
}

/* ============================================================
   ACCESSIBILITY HELPER
   Visually hides the <label> but keeps it for screen readers.
   A standard, well-known snippet — don't worry about memorizing it.
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
