/* ==========================================================
   Sentra-Ama holding page: how everything looks
   ========================================================== */

/* ----- Brand colours (change a colour here and it changes everywhere) ----- */
:root {
  --orange: #DD7A34;
  --sand:   #EFE3CC;   /* page background */
  --cream:  #F7F2E7;
  --brown:  #57402E;
  --blue:   #4E93C0;
  --green:  #3F7A45;
  --pink:   #E96FA0;
  --white:  #FFFFFF;
}

/* ----- The whole page ----- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;   /* glide to a section when a menu link is clicked */
}

body {
  margin: 0;
  /* Sand background with the faint flower pattern repeated across it */
  background: var(--sand) url("images/flower-pattern.svg") repeat;
  background-size: 480px 560px;
  color: var(--brown);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

/* ----- Layout: keeps text in a comfortable column ----- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.wide {
  max-width: 960px;
}

section {
  padding: 48px 0;
}

/* ----- Navigation bar ----- */
.site-nav {
  background: var(--orange);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  gap: 8px 20px;
}

.nav-logo {
  display: block;
  line-height: 0;
  flex-shrink: 0;
}

.nav-logo img {
  width: 40px;
  height: 40px;
}

/* The menu button (three white lines). Hidden on computers, shown on phones. */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.menu-toggle:hover,
.menu-toggle:focus-visible,
.site-nav.menu-open .menu-toggle {
  background: rgba(255, 255, 255, 0.32);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 8px;
}

/* Each link is a button: a soft see-through white box with rounded corners
   and white text, so the orange shows through slightly lighter.
   These buttons are the only place on the page that uses a sans-serif font. */
.site-nav ul a {
  position: relative;
  color: var(--white);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-decoration: none;
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.18);   /* the last number is how see-through: 0 = invisible, 1 = solid white */
  border-radius: 6px;
}

/* An invisible area around each button, so a fingertip does not have to
   hit the small box exactly. It does not change how the button looks. */
.site-nav ul a::after {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -4px;
  right: -4px;
}

/* When the mouse is over a button the box becomes a little more visible */
.site-nav ul a:hover,
.site-nav ul a:focus {
  background: rgba(255, 255, 255, 0.32);
}

/* ----- Headings ----- */
h1, h2, h3 {
  font-weight: normal;
  line-height: 1.25;
  margin: 0 0 16px;
}

h2 {
  font-size: 1.7rem;
}

/* The short orange line under each section heading */
h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 12px;
  background: var(--orange);
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
}

/* ----- Links ----- */
a {
  color: var(--brown);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  text-decoration-color: var(--blue);
}

/* Keep the email address in one piece instead of splitting across lines */
a[href^="mailto:"] {
  white-space: nowrap;
}

/* ----- Top of the page ----- */
.opening {
  text-align: center;
  padding-top: 40px;
}

/* The large "Sentra AmA" */
.opening h1 {
  margin: 0 0 24px;
  line-height: 0;
}

.opening h1 img {
  width: 620px;
}

.tagline {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.25rem;
  max-width: 560px;
  margin: 0 auto;
}

/* The three mission words: Love. Safety. Community. */
.mission {
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin: 40px 0 0;
}

/* ----- The highlighted line in "Our vision" ----- */
.quote {
  font-style: italic;
  font-size: 1.25rem;
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  margin: 24px 0 0;
}

/* ----- The four bubbles ----- */
.bubbles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 32px;
}

/* Each bubble's outline is a drawing stretched to fit the box.
   The generous padding keeps the words well inside the wavy edge. */
.bubble {
  padding: 56px 13%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.bubble p {
  margin: 0;
  font-size: 1.05rem;
}

.bubble-1 { background-image: url("images/bubble-1.svg"); }   /* green */
.bubble-2 { background-image: url("images/bubble-2.svg"); }   /* pink */
.bubble-3 { background-image: url("images/bubble-3.svg"); }   /* green */
.bubble-4 { background-image: url("images/bubble-4.svg"); }   /* pink */

/* ----- Privacy notice page ----- */
.page-title {
  font-size: 2.3rem;
}

.privacy h2 {
  font-size: 1.45rem;
  margin-top: 40px;
}

.privacy ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.back-link {
  margin-top: 40px;
}

/* ----- Sign-up form ----- */
.signup-form {
  position: relative;
  margin-top: 24px;
}

.signup-form label {
  display: block;
  margin-bottom: 6px;
}

/* The email box and the button sit side by side */
.signup-row {
  display: flex;
  gap: 12px;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--brown);
  background: var(--white);
  border: 2px solid var(--brown);
  border-radius: 8px;
  padding: 10px 14px;
}

.signup-form input[type="email"]:focus {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* White on orange needs large bold text to be readable, so keep this size */
.signup-form input[type="submit"] {
  font-family: inherit;
  font-size: 19px;
  font-weight: bold;
  color: var(--white);
  background: var(--orange);
  border: 2px solid var(--orange);
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
}

.signup-form input[type="submit"]:hover,
.signup-form input[type="submit"]:focus {
  background: var(--brown);
  border-color: var(--brown);
}

.signup-form input[type="submit"]:focus {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.form-note {
  font-size: 0.9rem;
  margin: 12px 0 0;
}

.after-form {
  margin-top: 24px;
}

/* ----- Footer ----- */
.site-footer {
  border-top: 2px solid var(--orange);   /* the thin orange line */
  margin-top: 32px;
}

.footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 20px 0;
  font-size: 0.9rem;
}

.footer-row img {
  width: 52px;
  height: 52px;
}

/* Pushes the "Privacy notice" link over to the right-hand side */
.footer-row a[href="privacy.html"] {
  margin-left: auto;
}

/* The orange band at the very bottom. A few lines at the end of index.html
   set its height to exactly match the top bar; 52px is the starting value. */
.footer-band {
  background: var(--orange);
  height: 52px;
  padding: 8px 24px;
  display: flex;
  justify-content: flex-end;   /* pushes the text to the right */
  align-items: flex-end;       /* and to the bottom */
}

.footer-band p {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  line-height: 1.4;
}

/* ----- Top bar on computer screens: links spread across the bar, brown text ----- */
@media (min-width: 721px) {
  /* The links take up all the room to the right of the logo... */
  #site-menu {
    flex: 1;
  }

  /* ...and are spaced out with equal gaps, ending a little before the right edge */
  .site-nav ul {
    justify-content: space-evenly;
  }

  /* Brown text, and no visible box until the mouse is over the link */
  .site-nav ul a {
    color: var(--brown);
    background: transparent;
  }

  .site-nav ul a:hover,
  .site-nav ul a:focus {
    background: rgba(255, 255, 255, 0.3);
  }
}

/* ----- Top bar on phones and small screens: menu button instead of four buttons -----
   (720px is just below the width where the four buttons start to wrap onto two rows) */
@media (max-width: 720px) {
  .site-nav {
    position: relative;
  }

  .nav-inner {
    padding: 6px 16px;
    justify-content: space-between;   /* logo on the left, menu button on the right */
  }

  .menu-toggle {
    display: flex;
  }

  /* The list of links is hidden until the menu button is tapped.
     It drops down below the bar, so the bar itself never gets taller. */
  #site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--orange);
    padding: 4px 16px 16px;
    box-shadow: 0 8px 16px rgba(87, 64, 46, 0.25);
  }

  .site-nav.menu-open #site-menu {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 8px;
  }

  /* Each link becomes a full-width row, easy to tap.
     Brown text to match the computer version. The pale box behind it lightens
     the orange enough for brown text to be easy to read. */
  .site-nav ul a {
    display: block;
    font-size: 15px;
    padding: 10px 14px;
    color: var(--brown);
    background: rgba(255, 255, 255, 0.4);
  }

  .site-nav ul a:hover,
  .site-nav ul a:focus {
    background: rgba(255, 255, 255, 0.55);
  }

  /* The extra invisible tap area is not needed here, the rows are already large */
  .site-nav ul a::after {
    display: none;
  }
}

/* ----- Phones and narrow screens ----- */
@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  h2 {
    font-size: 1.45rem;
  }

  section {
    padding: 36px 0;
  }

  .footer-band {
    padding: 8px 16px;
  }

  /* The email box and button stack, each full width */
  .signup-row {
    flex-direction: column;
  }

  .tagline,
  .mission {
    font-size: 1.6rem;
  }

  /* Bubbles stack in one column */
  .bubbles {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bubble {
    padding: 48px 14%;
  }
}
