/* =============================================
   BASE & RESET
   ============================================= */

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

:root {
  --bg:         #FAF8F5;
  --text:       #271F18;
  --heading:    #3B2715;
  --cta:        #CC9E6D;
  --cta-hover:  #5D4234;
  --rule:       rgba(39, 31, 24, 0.18);

  --font-heading: 'Soria', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* =============================================
   LAYOUT
   ============================================= */

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}


/* =============================================
   HEADER / WORDMARK
   ============================================= */

header {
  padding: 52px 0 44px;
}

.wordmark {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 400;
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: 1;
}


/* =============================================
   SECTIONS
   ============================================= */

section {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}


/* =============================================
   ABOUT SECTION
   ============================================= */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3rem);
  color: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.about-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.4rem;
}

.about-body p:last-child {
  margin-bottom: 0;
}


/* =============================================
   SIGNUP SECTION
   ============================================= */

.signup-header {
  margin-bottom: 52px;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  color: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.thanks-message {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.5;
  color: var(--heading);
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.subtext {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.8;
}


/* =============================================
   FORM
   ============================================= */

form {
  max-width: 520px;
}

.form-group {
  margin-bottom: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
}

.form-row .form-group {
  margin-bottom: 36px;
}

/* Labels */

label,
legend {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Fieldset reset */

fieldset {
  border: none;
}

fieldset legend {
  float: left;
  width: 100%;
  margin-bottom: 16px;
}

fieldset legend + * {
  clear: left;
}

/* Text / Email inputs */

input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  padding: 10px 0 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(39, 31, 24, 0.35);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-bottom-color: var(--heading);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
  color: rgba(39, 31, 24, 0.3);
}

/* Radio group */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--heading);
}

/* Other field */

.form-group--other {
  margin-top: -8px;
}

/* Submit */

.form-submit {
  margin-top: 8px;
}

button[type="submit"] {
  display: inline-block;
  padding: 14px 40px;
  background-color: var(--cta);
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  background-color: var(--cta-hover);
  color: var(--bg);
  outline: none;
}

button[type="submit"]:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
}


/* =============================================
   RESPONSIVE — TABLET +
   ============================================= */

@media (min-width: 600px) {

  header {
    padding: 68px 0 56px;
  }

  section {
    padding: 100px 0;
  }

  .about-grid {
    grid-template-columns: 260px 1fr;
    gap: 72px;
    align-items: start;
  }

  .about-body p {
    max-width: 44ch;
  }

  .about-heading {
    padding-top: 6px;
  }

  .signup-header {
    margin-bottom: 60px;
  }

}


/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */

@media (max-width: 480px) {

  .container {
    padding: 0 20px;
  }

  header {
    padding: 40px 0 32px;
  }

  section {
    padding: 60px 0;
  }

  .wordmark {
    font-size: 2.25rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  button[type="submit"] {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
  }

}
