/* =========================================================================
   Waypoint Studios — brand tokens
   Matched to waypointstudios.com (light / playful theme):
   soft-peach background, deep-purple headings, vivid-orange pill CTAs,
   white rounded cards, deep-purple footer band.
   ========================================================================= */
:root {
  --bg:           #fbeae3;   /* soft-peach page background       */
  --bg-soft:      #f7ede8;   /* slightly deeper peach            */
  --surface:      #ffffff;   /* cards / panels                   */
  --field:        #f8f1ed;   /* inputs                           */
  --border:       #f0dcd3;   /* warm hairline borders            */
  --purple:       #3a1a6b;   /* deep brand purple (headings)     */
  --purple-deep:  #2c1454;   /* footer / dark band               */
  --text:         #2e1a56;   /* primary text (dark purple)       */
  --text-muted:   #6c6385;   /* secondary text                   */
  --accent:       #f04e23;   /* brand orange (CTA)               */
  --accent-hover: #d8401a;
  --accent-soft:  rgba(240, 78, 35, 0.12);
  --danger:       #e03131;
  --radius:       22px;
  --radius-sm:    14px;
  --maxw:         960px;
  --font:         "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Type scale (Manrope) ---------------------------------------------- */
/* H1: 800 / 83px / 83px line-height — H2: 800 / 55px / 66px line-height.
   Sizes scale down on small screens and hit the exact spec at desktop.    */
h1 {
  font-weight: 800;
  font-size: clamp(40px, 8vw, 83px);
  line-height: 1;            /* 83px at 83px */
  letter-spacing: -0.02em;
  margin: 0;
}
h2 {
  font-weight: 800;
  font-size: clamp(34px, 6vw, 55px);
  line-height: 1.2;          /* 66px at 55px */
  letter-spacing: -0.02em;
  margin: 0;
}

/* ---- Header — floating white pill nav ---------------------------------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: 22px clamp(16px, 5vw, 40px);
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: 999px;
  padding: 12px 26px;
  box-shadow: 0 12px 34px rgba(58, 26, 107, 0.10);
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

/* ---- Layout ------------------------------------------------------------ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 6vw, 56px) clamp(18px, 5vw, 40px);
}

/* ---- Lock / login card ------------------------------------------------- */
.lock-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}
.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 38px 34px;
  box-shadow: 0 24px 60px rgba(58, 26, 107, 0.12);
  text-align: center;
}
.card h1 {
  margin: 0 0 12px;
  /* H2 scale — card title reads below the page hero */
  font-size: clamp(34px, 7vw, 55px);
  line-height: 1.2;
  color: var(--purple);
}
.card p.sub {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 24px;
}

.field { margin-bottom: 16px; text-align: left; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--field);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input::placeholder { color: #b9a9c4; }
.field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---- Buttons — pill, orange ------------------------------------------- */
.btn {
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(240, 78, 35, 0.28);
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 26px rgba(240, 78, 35, 0.34);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.65; cursor: progress; box-shadow: none; }

.error {
  display: none;
  margin-top: 14px;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 500;
}
.error.show { display: block; }

/* ---- Form page --------------------------------------------------------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0 0 12px;
  /* H1 scale — page hero (83px at desktop) */
  color: var(--purple);
}
.page-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 16px;
  line-height: 24px;
}

/* outline pill */
.logout {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: #fff;
  border: 1.5px solid var(--accent);
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.logout:hover { background: var(--accent); color: #fff; }

.embed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(58, 26, 107, 0.12);
}
.embed iframe {
  flex: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 1950px;
  border: 0;
}
/* once we know the form's real height, pin it and centre it vertically
   in the available space instead of stretching to fill */
.embed.fitted { justify-content: center; }
.embed.fitted iframe { flex: 0 0 auto; height: auto; }

/* ---- Footer — deep-purple band ----------------------------------------- */
.site-footer {
  margin-top: auto;
  padding: 30px clamp(18px, 5vw, 40px);
  background: var(--purple-deep);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer .brand {
  justify-content: center;
  margin-bottom: 12px;
}
/* render the logo white on the deep-purple footer band */
.site-footer .brand-logo {
  height: 26px;
  filter: brightness(0) invert(1);
}
.site-footer p { margin: 0; }
