/*
  Two Currents Travel: shared stylesheet for every page.
  Brand colors and the three text sizes are set once in :root below.
*/

/* ---------- Font: Sora, self-hosted (license in fonts/OFL.txt) ---------- */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Brand settings ---------- */

:root {
  /* The only colors on the site */
  --teal: #0B3F4E;      /* Deep Teal: text, headings, buttons */
  --olive: #667D69;     /* Muted Olive: thin accent lines only, never small text */
  --alabaster: #F7F0E4; /* page background */
  --white: #FFFFFF;     /* cards */

  --font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* The three text sizes: everyday text, section headings, page headline */
  --size-body: 1.0625rem;
  --size-heading: clamp(1.625rem, 1.25rem + 1.5vw, 2.375rem);
  --size-display: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

  --max-width: 72rem;
  --gutter: 1rem;
  --radius: 1rem;
  --section-space: clamp(3.5rem, 2rem + 6vw, 6.5rem);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--alabaster);
  color: var(--teal);
  font-family: var(--font);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.65;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: var(--size-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--size-heading);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--size-body);
  line-height: 1.4;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

ul[role="list"],
ol[role="list"] {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A clear outline shows where you are when moving through the page with the keyboard */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}

/* Hidden until a keyboard user presses Tab */
.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Read aloud by screen readers but not shown, such as "(opens in a new tab)" */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- The one button style ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.75rem;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: transparent;
  color: var(--teal);
}

/* Text links such as "See how it works" */
.text-link {
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: var(--olive);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.text-link:hover {
  text-decoration-color: var(--teal);
}

/* ---------- Header ---------- */

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.logo img {
  width: auto;
  height: 2.75rem;
}

.menu-toggle {
  min-height: 2.75rem;
  padding: 0.4rem 1.25rem;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle[aria-expanded="true"] {
  background: var(--teal);
  color: var(--white);
}

/* Without JavaScript the links simply stay visible, so the button is not needed */
.no-js .menu-toggle {
  display: none;
}

/* Phones and tablets: the links stack under the logo */
.site-nav {
  flex-basis: 100%;
  padding-bottom: 0.75rem;
}

.site-nav li {
  border-top: 1px solid var(--olive);
}

.site-nav ul a {
  display: block;
  padding-block: 0.8rem;
  text-decoration: none;
}

.site-nav [aria-current="page"],
.site-nav ul a:hover {
  text-decoration: underline;
  text-decoration-color: var(--olive);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.site-nav .button {
  margin-top: 1rem;
}

@media (max-width: 63.99em) {
  .js .site-nav:not(.is-open) {
    display: none;
  }
}

/* Wide screens: logo, links, and button on one row */
@media (min-width: 64em) {
  .site-header .container {
    flex-wrap: nowrap;
    padding-block: 1.25rem;
  }

  .logo img {
    height: 3.5rem;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    flex-basis: auto;
    align-items: center;
    gap: 2rem;
    padding-bottom: 0;
  }

  .site-nav ul {
    display: flex;
    gap: 1.75rem;
  }

  .site-nav li {
    border-top: 0;
  }

  .site-nav ul a {
    padding-block: 0.25rem;
  }

  .site-nav .button {
    margin-top: 0;
  }
}

/* ---------- Home: hero ---------- */

.hero-photo {
  display: block;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 60%;
}

/* Cream panel that overlaps the bottom of the photo (full width on phones) */
.hero-panel {
  position: relative;
  margin: -4rem calc(-1 * var(--gutter)) 0;
  padding: 1.75rem var(--gutter) 0;
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--alabaster);
}

.hero-panel p {
  max-width: 34em;
  margin-top: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 48em) {
  .hero-photo img {
    aspect-ratio: auto;
    height: clamp(26rem, 45vw, 44rem);
    object-position: 50% 50%;
  }

  .hero-panel {
    max-width: 46rem;
    margin: -8rem 0 0;
    padding: 2.5rem 2.75rem 0;
    border-radius: 1.5rem 1.5rem 0 0;
  }
}

/* ---------- Page sections ---------- */

.section {
  padding-top: var(--section-space);
}

main {
  padding-bottom: var(--section-space);
}

.section h2 {
  margin-bottom: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
}

/* Photo cards */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.75rem;
}

.card-body .text-link {
  margin-top: auto;
  padding-top: 0.5rem;
}

@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .card-body {
    padding: 2rem 2rem 2.25rem;
  }
}

/* "Someone in your corner" points */
.points {
  display: grid;
  gap: 2rem;
}

.point {
  padding-top: 1.25rem;
  border-top: 2px solid var(--olive);
}

.point h3 {
  margin-bottom: 0.5rem;
}

@media (min-width: 48em) {
  .points {
    grid-template-columns: 1fr 1fr;
    gap: 2.75rem 3.5rem;
  }
}

/* "How it works" numbered steps */
.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.steps + .button {
  margin-top: 2.5rem;
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* "Hi, I'm Derek." with headshot and credentials badge */
.meet {
  display: grid;
  gap: 2rem;
}

.headshot {
  width: 100%;
  max-width: 16rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.meet h2 {
  margin-bottom: 1rem;
}

.meet p {
  max-width: 38em;
}

.meet .text-link {
  display: inline-block;
  margin-top: 1.25rem;
}

.meet .badge-card {
  display: block;
  width: fit-content;
  margin-top: 2rem;
}

@media (min-width: 48em) {
  .meet {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    align-items: center;
    column-gap: 4rem;
  }

  .headshot {
    max-width: none;
  }
}

/* Atlas Academy badge: always shown unaltered on a small white card */
.badge-card {
  display: inline-block;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--white);
}

.badge-card img {
  width: 18rem;
}

/* Closing call to action */
.cta-panel {
  padding: clamp(2rem, 1rem + 4vw, 3.5rem);
  border-radius: var(--radius);
  background: var(--white);
}

.cta-panel h2 {
  margin-bottom: 0;
}

.cta-panel p {
  max-width: 38em;
  margin-top: 1rem;
}

.cta-panel .button {
  margin-top: 1.75rem;
}

/* ---------- About page ---------- */

/* Opening: photo beside the page headline */
.intro {
  display: grid;
  gap: 2rem;
  padding-top: clamp(1.5rem, 0.5rem + 3vw, 3.5rem);
}

.intro-photo {
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.intro p {
  max-width: 34em;
  margin-top: 1rem;
}

@media (min-width: 48em) {
  .intro {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    column-gap: 4rem;
  }

  .intro-photo {
    max-width: none;
  }
}

/* Story sections: heading beside the text on wide screens */
.section-story {
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
}

.story {
  display: grid;
  gap: 1.25rem;
}

.story h2 {
  margin-bottom: 0;
}

.story-body {
  max-width: 38em;
}

.story-body p + p {
  margin-top: 1em;
}

.story-body .button {
  margin-top: 1.75rem;
}

.story-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 1.25rem;
}

@media (min-width: 64em) {
  .story {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: 4rem;
  }
}

/* Two photos side by side */
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* "What you can expect" list */
.expect-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-left: 1.25rem;
}

.expect-list li::marker {
  color: var(--olive);
}

/* Credential tiles: each badge on its own white card */
.credential-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.credential-tiles .badge-card img {
  width: 100%;
  max-width: 18rem;
}

.credential-tiles p {
  margin-top: 0.75rem;
}

/* Text-only tile (no supplier logo): same card as the badge, text centered top to bottom */
.credential-text {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--white);
}

.credential-tiles .credential-text p {
  margin-top: 0;
}

/* ---------- Cruises page ---------- */

/* "Where I focus": text beside the harbor photo on wide screens */
.focus {
  display: grid;
  gap: 2rem;
}

.focus-text p {
  max-width: 38em;
}

.focus-text p + p {
  margin-top: 1em;
}

.focus-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.line-cards {
  margin-top: 2rem;
}

@media (min-width: 48em) {
  .focus {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 4rem;
  }
}

/* "More than the booking": two columns on wide screens */
@media (min-width: 48em) {
  .help-list {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 3.5rem;
  }
}

/* Common questions: each question opens and closes on its own */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

.faq details {
  border-radius: 0.75rem;
  background: var(--white);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

/* Plus sign that becomes a minus when the answer is open */
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--olive);
  border-radius: 50%;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover::after {
  border-color: var(--teal);
}

.faq details p {
  max-width: 38em;
  padding: 0 1.25rem 1.25rem;
}

@media (min-width: 48em) {
  .faq summary {
    padding: 1.25rem 1.75rem;
  }

  .faq details p {
    padding: 0 1.75rem 1.5rem;
  }
}

/* ---------- Contact, Questionnaire, thank-you, and placeholder pages ---------- */

/* Page opening without a photo: headline and a short intro */
.page-intro {
  padding-top: clamp(1.5rem, 0.5rem + 3vw, 3.5rem);
}

.page-intro p {
  max-width: 34em;
  margin-top: 1rem;
}

/* Short pages (thank-you, coming soon) keep the footer from riding up */
.page-short {
  min-height: 40vh;
}

/* ---------- Forms ---------- */

/* The one button style also works on real <button> elements */
button.button {
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.form-card {
  max-width: 44rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  border-radius: var(--radius);
  background: var(--white);
}

.form-note {
  margin-bottom: 2rem;
}

/* One question: its label (or legend), an optional hint, then the answer */
.field {
  min-width: 0;
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
}

.field > label:not(.choice),
.field > legend {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 600;
  line-height: 1.4;
}

.req {
  font-weight: 400;
}

.hint {
  margin: -0.25rem 0 0.5rem;
}

.form-card input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.form-card textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--teal);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--teal);
  font: inherit;
}

.form-card input[type="number"] {
  max-width: 8rem;
}

.form-card textarea {
  display: block;
  resize: vertical;
}

/* Multiple-choice answers, each big enough to tap easily */
.choice-list {
  display: grid;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block: 0.5rem;
  cursor: pointer;
}

.choice input {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.15rem 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

/* "Other" with a small text box beside it */
.choice-other {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
}

.form-card .choice-other .other-input {
  flex: 1 1 12rem;
  width: auto;
}

.consent {
  padding-block: 0;
}

.consent a {
  font-weight: 600;
  text-decoration-color: var(--olive);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* Questionnaire sections, each under a thin olive line */
.form-group {
  margin-bottom: 1rem;
  padding-top: 2rem;
  border-top: 2px solid var(--olive);
}

.form-group h2 {
  margin-bottom: 1.5rem;
}

.form-submit {
  margin-top: 0.5rem;
}

.form-disclosure {
  margin-top: 1.5rem;
}

/* Email and phone under the Contact form */
.direct-contact {
  max-width: 44rem;
  margin-top: 3rem;
}

.direct-contact h2 {
  margin-bottom: 1rem;
}

.direct-contact p + p {
  margin-top: 0.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3.5rem 2.5rem;
  background: var(--teal);
  color: var(--white);
}

.site-footer a {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

.footer-main {
  display: grid;
  gap: 2.5rem;
}

.footer-contact {
  font-style: normal;
}

.footer-name {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Links run down two columns, in the same order as the main menu */
.footer-nav ul {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  justify-content: start;
  gap: 0.25rem 2.5rem;
}

.footer-nav a {
  display: inline-block;
  padding-block: 0.3rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.footer-disclosure {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--olive);
}

.footer-disclosure p + p {
  margin-top: 0.75rem;
}

/* Keeps the registration number on one line */
.nowrap {
  white-space: nowrap;
}

/* Atlas Coast logo with the advisor profile link under it */
.footer-atlas {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.footer-disclosure .badge-card img {
  width: 15rem;
}

.copyright {
  margin-top: 2.5rem;
}

@media (min-width: 48em) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-disclosure {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3rem;
  }
}
