/* Base Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Theme */
:root {

  /* Colors */
  --bg: #FFFEFA;
  --text: #011A18;
  --muted: rgba(1, 26, 24, 0.60);
  --accent: #03857B;
  --accent-dark: #026B63;
  --input-border: #809190;


  /* Typography */
  --headline: "itc-avant-garde-gothic-pro", sans-serif;
  --sans-serif: "aktiv-grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;

  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-bold: 700;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans-serif);
  font-size: 16px;
  font-weight: var(--w-regular);
  line-height: 1.6;
  border-radius: 2px;

  -webkit-font-smoothing: antialiased;
}

@media screen and (min-width: 1400px) {
  body {
    font-size: 18px;
  }
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

.content {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

@media screen and (min-width: 1800px) {
  .content {
    flex: 1;
  }
}

header,
main,
footer {
  width: 100%;
  max-width: 1100px;
}

.photo {
  display: none;
}

@media screen and (min-width: 1200px) {
  .photo {
    display: block;
    flex: 1;
    background-color: rgba(3, 133, 123, 0.10);  
    background-image: image-set(
          url('images/maldives.webp') type('image/webp'),
          url('images/maldives.jpg') type('image/jpeg')
        );
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

header,
main,
footer {
  padding: 24px;
}

@media screen and (min-width: 760px) {
  header,
  main,
  footer {
    padding: 48px;
  }
}

h1 {
  font-family: var(--headline);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 24px;
  line-height: 140%; 
  letter-spacing: -0.25%;
}

@media screen and (min-width: 450px) {
  .no-wrap {
    display: block;
  }
}

@media screen and (min-width: 760px) {
  h1 {
    font-size: 2.5rem;
    font-weight: 300;
  }
}

@media screen and (min-width: 1500px) {
  h1 {
    font-size: 3.2rem;
  }
}

@media screen and (min-width: 2080px) {
  h1 {
    font-size: 3.75rem;
  }
}

h2 {
  font-family: var(--headline);
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 16px;
}

.body-copy {
  max-width: 600px;
  line-height: 155%;
}

.cta {
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 16px 20px;
  font-size: 1rem;
  line-height: 100%;
  font-weight: var(--w-medium);
  color: #FFF;
  background: var(--accent);
  text-decoration: none;
  border-radius: 2px;
  border: 0;
}

.btn:hover,
.btn:focus {
  background: var(--accent-dark);
}

.form {
  max-width: 600px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 48px;
  gap: 48px;
}

.field {
  width: 100%;
}

.label {
  display: flex;
  justify-content: space-between;
  font-weight: var(--w-medium);
  margin-bottom: 4px;
}

.required {
  font-weight: var(--w-regular);
  font-size: 0.875rem;
  color: var(--accent);
}

.input,
.textarea {
  display: block;
  border: none;
  box-shadow: var(--input-border) 0 1px;
  background: none;
  padding: 12px 0;
  font-size: 1.5rem;
  font-family: var(--sans-serif);
  width: 100%;
  transition: box-shadow 0.1s ease-out;
}

.input:focus,
.textarea:focus {
  box-shadow: var(--accent) 0 2px;
  outline: none;
}

.textarea {
  display: block;
  min-height: 80px;
}

.radio {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-top: 12px;
  border-radius: 2px;
  box-shadow: var(--input-border) 0 0 0 1px;
  transition: box-shadow 0.1s ease-out;
}

.radio:has(> input[type="radio"]:checked) {
  box-shadow: var(--accent) 0 0 0 2px;
}

.radio input[type="radio"] {
  display: grid;
  place-content: center;
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.radio input[type="radio"]::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  transform: scale(0);
  transition: 100ms transform ease-in-out;
  box-shadow: inset 1rem 1rem var(--accent);
}

.radio input[type="radio"]:checked {
  color: var(--accent);
}

.radio input[type="radio"]:checked::before {
  transform: scale(1);
}

.field-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 12px 0 0;
}

footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 0.875rem;
}

nav a {
  text-decoration: none;
  margin-left: 24px;
  color: var(--text);
}
nav a:hover { text-decoration: underline; }

/* Entrance animations (lightweight) */
@media (prefers-reduced-motion: no-preference) {
  body:not(.is-ready) header,
  body:not(.is-ready) main,
  body:not(.is-ready) footer {
    opacity: 0;
    transform: translateY(12px);
  }

  header,
  main,
  footer {
    transition-property: opacity, transform;
    transition-duration: 600ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Stagger the content a bit */
  header { transition-delay: 60ms; }
  main { transition-delay: 140ms; }
  footer { transition-delay: 220ms; }

  body.is-ready header,
  body.is-ready main,
  body.is-ready footer {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Two-step swap: fade intro out, then fade form in */
.intro {
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.form {
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  display: none;
}

/* Step 1: fade out intro */
body.intro-fading .intro {
  opacity: 0;
  transform: translateY(-12px);
}

/* Step 2: prepare form to enter (visible but at 0 opacity) */
body.form-activating .form {
  display: block;
  opacity: 0;
  transform: translateY(12px);
}

/* Step 2b: animate form to visible */
body.form-visible .form {
  opacity: 1;
  transform: translateY(0);
}

/* Keep intro hidden after fade-out completes */
body.intro-hidden .intro {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .form {
    transition: none;
  }
}