/* Ducat Maritime: site styles. Design carried over from the WordPress (Neve) theme. */

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/poppins-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/poppins-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/poppins-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/poppins-latin-700-normal.woff2) format("woff2");
}

:root {
  --navy: #172554;
  --blue: #2f5aae;
  --text: #272626;
  --light-bg: #f4f5f7;
  --white: #ffffff;
  --border: #c9ccd3;
  --error: #b42318;
  --success: #067647;
  --font: Poppins, Arial, Helvetica, sans-serif;
  --container: 1360px;
  --gutter: 25px;
  --header-h: 80px;
  --section-y: clamp(4rem, 2rem + 7vw, 8rem);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 960px) {
  body {
    font-size: 16px;
    line-height: 1.7;
  }
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2 {
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.25rem);
}

h2,
.contact-heading {
  font-size: clamp(1.75rem, 1.15rem + 2.4vw, 3rem);
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.container-narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--white);
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
}

/* Header */

.site-header {
  position: relative;
  z-index: 10;
  color: var(--navy);
  background: var(--white);
  border-bottom: 1px solid var(--light-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: block;
  padding: 10px 0;
  color: inherit;
}

.brand:hover {
  color: inherit;
}

.logo {
  width: 120px;
  height: auto;
}

.nav {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  padding: 4px 0;
  color: inherit;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: inherit;
  border-bottom-color: currentColor;
}

@media (min-width: 960px) {
  .logo {
    width: 220px;
  }
}

/* Over the hero image the header is transparent and white. */
.header-overlay .site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  color: var(--white);
  background: transparent;
  border-bottom: 0;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 11px 23px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--navy);
  border-radius: 0;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.button-outline {
  color: var(--navy);
  background: transparent;
}

.button-outline:hover {
  color: var(--white);
  background: var(--navy);
}

.button-light {
  color: var(--white);
  border-color: rgb(255 255 255 / 0.85);
}

.button-light:hover {
  color: var(--navy);
  background: var(--white);
  border-color: var(--white);
}

.button-primary {
  min-width: 200px;
  color: var(--white);
  background: var(--navy);
  border-radius: 3px;
}

.button-primary:hover {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.button:disabled {
  cursor: progress;
  opacity: 0.6;
}

/* Cover sections: hero and image banners */

.cover {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--section-y) 0;
  color: var(--white);
  text-align: center;
  background: var(--navy);
}

.cover picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.focus-lower {
  object-position: 50% 78%;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / 0.3);
}

.cover h1,
.cover h2 {
  margin-bottom: 2rem;
  text-shadow: 0 1px 24px rgb(0 0 0 / 0.25);
}

.hero {
  min-height: min(80svh, 700px);
  padding-top: calc(var(--header-h) + 2rem);
}

/* Darker at the top so the white header and heading stay readable over the sky. */
.hero::after {
  background: linear-gradient(180deg, rgb(10 18 45 / 0.5) 0%, rgb(0 0 0 / 0.2) 50%, rgb(0 0 0 / 0.3) 100%);
}

.hero h1 {
  max-width: 22ch;
  margin-right: auto;
  margin-left: auto;
}

.banner {
  min-height: 60vh;
}

/* Content sections */

.section {
  padding: var(--section-y) 0;
}

.text-center {
  text-align: center;
}

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

.narrow {
  max-width: 768px;
  margin: 0 auto 3rem;
  text-wrap: balance;
}

.split-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 769px) {
  .split-inner {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .split-inner h2 {
    flex: 0 0 35%;
  }

  .split-inner .prose {
    text-wrap: pretty;
  }
}

/* Contact */

.contact-inner {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.contact-heading {
  margin-bottom: 3rem;
}

.contact-list {
  margin: 0;
}

.contact-list dd {
  margin: 0 0 2rem;
}

.contact-list dd:last-child {
  margin-bottom: 0;
}

@media (min-width: 960px) {
  .contact-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }

  .contact-info {
    flex: 0 0 auto;
    max-width: 36%;
  }

  .contact-form-wrap {
    flex: 0 1 680px;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2rem;
}

@media (min-width: 782px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.required {
  color: var(--error);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  line-height: 1.4;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  min-height: 170px;
  max-height: 420px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgb(47 90 174 / 0.2);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--error);
}

/* Honeypot: off-screen for people, still "visible" to naive bots. */
.field-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 65px;
}

.submit-wrap {
  text-align: center;
}

.form.is-submitting .form-grid {
  opacity: 0.6;
}

.form-status-region:empty {
  display: none;
}

.form-status-region:focus {
  outline: none;
}

.form-status {
  margin: 0 0 1.5rem;
  padding: 14px 16px;
  border-left: 4px solid;
  border-radius: 3px;
}

.form-status-success {
  color: #054f31;
  background: #ecfdf3;
  border-color: var(--success);
}

.form-status-error {
  color: #7a271a;
  background: #fef3f2;
  border-color: var(--error);
}

.form-note {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
  color: #5b5f6b;
}

.button-icon {
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: -3px;
}

/* Order form */

.order-heading {
  margin-bottom: 3rem;
  text-align: center;
}

.vessels {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.vessels legend {
  margin-bottom: 0.75rem;
  padding: 0;
  font-weight: 500;
}

.vessel-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .vessel-list {
    grid-template-columns: 1fr 1fr;
  }
}

.vessel {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vessel:hover {
  border-color: var(--navy);
}

.vessel:has(input:checked) {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.vessel:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.vessel input,
.consent input {
  flex: 0 0 auto;
  margin: 0.35rem 0 0;
  accent-color: var(--navy);
}

.vessel-info {
  display: block;
  min-width: 0;
}

.vessel-title {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--navy);
}

.vessel-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.vessel-key {
  color: #5b5f6b;
}

.notice {
  margin: 0;
  padding: 14px 16px;
  background: var(--light-bg);
  border-left: 4px solid var(--navy);
  border-radius: 3px;
}

.consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

/* Article pages (privacy policy) */

.article h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}

.article h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}

.article ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.article li {
  margin-bottom: 0.4rem;
}

.updated {
  margin-bottom: 2rem;
  color: #5b5f6b;
}

/* Map */

.map iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

@media (min-width: 960px) {
  .map iframe {
    height: 600px;
  }
}

/* Footer */

.site-footer {
  padding: 2em 0;
  color: var(--navy);
  background: var(--light-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-contact p {
  margin: 0;
}

.footer-contact .footer-label {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copyright {
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 960px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-meta {
    align-items: flex-end;
  }
}

/* 404 / error pages */

.message-page {
  min-height: 50vh;
}

.message-page p {
  margin-bottom: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
