/* General Styles */
/* Google Fonts loaded via <link> in HTML for non-blocking delivery */

:root {
  --button-bg: rgb(209, 218, 250);
  --button-hover-bg: rgb(140, 154, 220);
  --button-text-color: rgb(0, 0, 0);
  --input-border: #ddd;
  --input-bg: none;
  --input-bg-focus: rgba(234, 236, 245, 0.735);
  --font-primary: 'DM Sans', sans-serif;
  --font-secondary: 'Roboto', sans-serif;
  --font-color: #f5f1f1;
  --transition-timing: 0.3s ease;
}

/* Base Styles */
body, html {
  margin: 0;
  font-family: var(--font-primary);
  padding: 0;
  overflow-x: hidden;
}

h1 {
  color: var(--font-color);
  margin-bottom: 1rem;
  font-size: clamp(3rem, min(7.5vw, 11vh), 9rem);
  text-align: center;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .9px;
}

p {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--font-color);
  margin-bottom: 1.25rem;
}

a {
  text-decoration: none;
}

/* Canvas Styles */
.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Content Container */
.content-container, .sub-content-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  opacity: 1;
}

.error-hero, .sub-content-container {
  text-align: center !important;
  transition: none !important;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
}

/* Social Icons */
.social-icons {
  display: flex;
}

/* Main Content Styles */
main {
  width: min(92vw, 1100px);
  text-align: center;
}

/* Email Form Styles */
.mc_embed_shell, .mc_embed_signup {
  width: min(40vw, 600px);
  margin: 0 auto;
  text-align: center;
}

.mc-field-group, .button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
}

/* Email Input Field */
#mc_embed_signup input[type="email"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 35vw;
  height: 3.5rem;
  background: rgba(4, 8, 16, 0.45);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 25px;
  padding: 0 15px;
  font-size: 1rem;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 2rem 2rem;
}

#mc_embed_signup input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: rgba(4, 8, 16, 0.6);
}

#mc_embed_signup input:focus-visible,
.submit-button:focus-visible,
.footer-icons a:focus-visible,
.credits summary:focus-visible,
.credits a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

#mc_embed_signup label {
  font-family: var(--font-secondary);
  font-size: 1rem;
  color: var(--font-color);
  margin: 1.5rem 1rem -1.25rem;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

#mc_embed_signup input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Submit Button Styles */
.button {
  width: 100%;
}

/* Sized by its label, not the viewport; native button styling reset so every engine matches */
.submit-button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 11rem;
  min-height: 2.75rem;
  padding: 0.8rem 1.75rem;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  margin: 1rem auto;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.434);
  border-radius: 25px;
  color: rgb(0, 0, 0);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease-out,
              box-shadow 0.2s ease-out;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 20px rgba(255, 255, 255, 0.05);
  text-transform: none;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.submit-button:hover {
  outline: none;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(184, 191, 184, 0.7);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 15px rgba(255, 255, 255, 0.05);
}

.submit-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.submit-button:hover::before {
  left: 100%;
}

.submit-button::after {
  content: '→';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: 0.3s;
  color: #4CAF50;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.submit-button:hover::after {
  opacity: 1;
  right: 15px;
}

/* Typewriter Animation */
.typewriter {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 6.25rem;
  width: 100%;
  position: relative;
  margin: 1rem 0;
}

.cursor {
  display: inline-block;
  vertical-align: middle;
  background-color: white;
  width: 2px;
  height: 1.5rem;
  border-radius: 15%;
  margin-left: 0.25rem;
  animation: blink 1s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

/* keep the line box still while text types, so nothing shifts */
.typewriter p {
  width: 100%;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Footer Styles */
footer {
  text-align: center;
  padding: 1rem;
  position: relative;
  width: 100%;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.footer-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
}

.footer-icons img {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
}

/* Attribution tucked behind a small link in the corner; opens upward */
.credits {
  position: fixed;
  right: 1rem;
  bottom: 0.75rem;
  z-index: 20;
  font-size: 0.75rem;
  color: rgba(245, 241, 241, 0.85);
  text-align: right;
}

.credits:not([open]) p {
  display: none;
}

.credits summary {
  list-style: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  color: rgba(245, 241, 241, 0.6);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.credits summary::-webkit-details-marker {
  display: none;
}

.credits summary:hover,
.credits[open] summary {
  color: var(--font-color);
}

.credits p {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: max-content;
  max-width: min(calc(100vw - 2rem), 26rem);
  margin: 0 0 0.35rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
  border-radius: 8px;
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(10px);
}

.credits a {
  color: inherit;
  text-decoration: underline;
}

/* Legibility over the sunlit globe: a soft scrim behind the copy, the globe itself untouched */
.content-container::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(0, 0, 0, 0.38), transparent 70%);
}

h1, .typewriter p {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

/* Response Styles */
.response-parent {
  color: var(--font-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.1rem 0.1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.response-error,
.response-success {
  width: 100%;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 600px) {
  .container {
    width: 95%;
  }

  .mc_embed_signup {
    width: 90vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 80vw;
    height: 3rem;
    font-size: 0.9rem;
  }


  .social-icons {
    width: 150px;
  }

  header, footer {
    flex-direction: column;
    text-align: center;
  }

  .typewriter {
    height: 4rem;
    margin: 0.5rem 0;
  }
}

@media (max-width: 768px) {

  h1 {
    margin-bottom: 0.5rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-align: center;
  }

  .content-container {
    padding: 20px;
    text-align: center;
  }

  .mc_embed_signup {
    width: 80vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 70vw;
    height: 3.2rem;
    font-size: 0.95rem;
  }


  .typewriter {
    height: 5rem;
    margin: 0.75rem 0;
  }
}

@media (max-width: 480px) {
  h1 {
    letter-spacing: normal;
  }

  p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }

  .mc_embed_signup {
    width: 95vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 85vw;
    height: 2.8rem;
    font-size: 0.85rem;
  }


  .typewriter {
    height: 3.5rem;
    margin: 0.5rem 0;
  }
}

@media (max-width: 500px) {
  body, html {
    font-size: 14px;
  }

  h1 {
    margin-bottom: 0.5rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .mc_embed_signup {
    width: 95vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 70vw;
    height: 2.8rem;
    font-size: 0.8rem;
  }


  .typewriter {
    height: 4rem;
    margin: 0.5rem 0;
  }
}

@media (min-width: 501px) and (max-width: 768px) {
  h1 {
    margin-bottom: 1rem;
  }

  p {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .mc_embed_signup {
    width: 80vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 70vw;
    height: 3.2rem;
    font-size: 0.95rem;
  }


  .typewriter {
    height: 4.5rem;
    margin: 0.75rem 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  main {
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    margin-bottom: 1.5rem;
  }

  p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .mc_embed_signup {
    width: 60vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 50vw;
    height: 3.2rem;
  }


  .typewriter {
    height: 5.5rem;
    margin: 1rem 0;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {


  p {
    font-size: 1.4rem;
  }

  .mc_embed_signup {
    width: 50vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 40vw;
    height: 3.2rem;
  }


  .typewriter {
    height: 6rem;
    margin: 1rem 0;
  }
}

@media (max-width: 1440px) {
}

@media (min-width: 1441px) {


  p {
    font-size: 1.5rem;
  }

  .mc_embed_signup {
    width: 40vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 35vw;
    height: 3.5rem;
  }


  .typewriter {
    height: 6.25rem;
    margin: 1rem 0;
  }
}

/* High-resolution displays (like M3 MacBook Pro) */
@media (min-width: 3000px) {
  body, html {
    overflow-y: auto;
  }

  .content-container {
    min-height: 100vh;
    padding: 2rem 0;
    justify-content: flex-start;
  }


  h1 {
    margin-bottom: 2rem;
  }

  p {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 2rem;
  }

  .mc_embed_signup {
    width: 35vw;
  }

  #mc_embed_signup input[type="email"] {
    width: 30vw;
    height: 4rem;
    font-size: 1.2rem;
  }


  .typewriter {
    height: 7rem;
    margin: 1.5rem 0;
  }

  footer {
    margin-top: 2rem;
    padding: 2rem;
  }
}
