/* Maritimio Inc. styles.css
   Self-hosted Jost (variable) + system body. No external CDN, no cookies. */

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/jost-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #102a43;
  --navy-deep: #0b1b2d;
  --sand: #e8dfd1;
  --white: #faf8f4;
  --slate: #52616b;
  --teal: #4f8a8b;
  --charcoal: #1f2933;

  --bg: var(--white);
  --bg-alt: #f3eee5;
  --ink: #1a232c;
  --ink-soft: #56636d;
  --accent-strong: #2a5f60; /* AA-safe teal on light */
  --accent-light: #9fd0d1; /* AA-safe teal on navy */
  --brand: var(--navy);
  --hairline: rgba(16, 42, 67, 0.12);

  --display: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--brand);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
p {
  margin: 0 0 1.1rem;
}
a {
  color: var(--accent-strong);
}
img,
svg {
  max-width: 100%;
}

/* ---------- A11y ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus {
  top: 0;
}
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.narrow {
  max-width: 60ch;
}
.section {
  padding-block: clamp(4rem, 10vw, 8rem);
  position: relative;
}
.section-alt {
  background: var(--bg-alt);
}

/* Editorial two-column grid: index/kicker aside + body */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}
.section-aside {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  position: sticky;
  top: 96px;
}
.section-index {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--accent-strong);
  letter-spacing: 0.05em;
}
.section-kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.section h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  max-width: 16ch;
  margin-bottom: 1.4rem;
}
.section-body p {
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--white) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  transition: min-height 0.3s var(--ease);
}
.site-header.is-stuck .header-inner {
  min-height: 60px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
}
.wordmark-mark {
  color: var(--teal);
  flex: none;
}

/* Nav */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
}
.nav-menu a {
  font-family: var(--display);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.18s var(--ease);
}
.nav-menu a:hover {
  color: var(--brand);
}
.nav-cta {
  color: var(--brand) !important;
  position: relative;
}
.nav-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--accent-strong);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-cta:hover::after {
  transform: scaleX(1);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--brand);
  transition:
    transform 0.25s var(--ease),
    opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 16vh, 11rem) clamp(4rem, 10vh, 7rem);
  background: linear-gradient(180deg, var(--white), var(--bg-alt) 140%);
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-aurora {
  position: absolute;
  z-index: 1;
  top: -30%;
  right: -10%;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(79, 138, 139, 0.28),
    rgba(79, 138, 139, 0) 62%
  );
  filter: blur(8px);
  animation: drift 22s var(--ease) infinite alternate;
}
.hero-aurora--dark {
  top: auto;
  bottom: -35%;
  left: -10%;
  right: auto;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(79, 138, 139, 0.35),
    rgba(79, 138, 139, 0) 60%
  );
}
@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-6%, 5%, 0) scale(1.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-aurora {
    animation: none;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent-strong);
  margin: 0 0 1.4rem;
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(79, 138, 139, 0.18);
}
.hero h1 {
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.25rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 1.6rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin-bottom: 2.4rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: var(--pad);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-scroll-line {
  width: 56px;
  height: 1px;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-strong);
  transform: translateX(-100%);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  60%,
  100% {
    transform: translateX(100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::after {
    animation: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn svg {
  transition: transform 0.25s var(--ease);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(16, 42, 67, 0.5);
}
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
}
.btn-primary:hover svg {
  transform: translateX(3px);
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--hairline);
}
.btn-ghost:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 0.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px rgba(16, 42, 67, 0.4);
  border-color: rgba(79, 138, 139, 0.4);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--teal) 12%, var(--white));
  color: var(--accent-strong);
}
.card-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.card h3 {
  font-size: 1.4rem;
  font-weight: 400;
}
.card p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---------- Founder ---------- */
.lead-quote {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.7rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  max-width: 30ch;
}
.founder-attribution {
  margin-top: 1.4rem;
  font-family: var(--display);
  letter-spacing: 0.04em;
  color: var(--brand);
}

/* ---------- Contact ---------- */
.section-contact {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 12vw, 9rem);
  background: var(--navy-deep);
  color: var(--sand);
}
.section-contact .section-grid {
  position: relative;
  z-index: 2;
}
.section-contact .section-index {
  color: var(--accent-light);
}
.section-contact .section-kicker {
  color: rgba(232, 223, 209, 0.6);
}
.section-contact h2 {
  color: var(--white);
  font-weight: 300;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem);
}
.contact-lead {
  color: rgba(232, 223, 209, 0.72) !important;
  max-width: 40ch;
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 1rem + 2.8vw, 2.9rem);
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 223, 209, 0.25);
  padding-bottom: 0.25rem;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.contact-email svg {
  color: var(--accent-light);
  transition: transform 0.25s var(--ease);
}
.contact-email:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}
.contact-email:hover svg {
  transform: translate(3px, -3px);
}
.contact-location {
  margin-top: 2.2rem;
  margin-bottom: 0;
  color: rgba(232, 223, 209, 0.55);
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(250, 248, 244, 0.6);
  padding-block: 2.2rem;
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.footer-mark {
  font-family: var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--sand);
}
.footer-meta {
  color: rgba(250, 248, 244, 0.45);
}

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.hero .reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.hero .reveal:nth-child(2) {
  transition-delay: 0.13s;
}
.hero .reveal:nth-child(3) {
  transition-delay: 0.21s;
}
.hero .reveal:nth-child(4) {
  transition-delay: 0.29s;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .section-aside {
    position: static;
  }
}
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem var(--pad) 1.25rem;
    box-shadow: 0 24px 40px -24px rgba(16, 42, 67, 0.4);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.3s var(--ease);
  }
  .nav-menu.is-open {
    clip-path: inset(0 0 0 0);
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu a {
    display: block;
    width: 100%;
    padding: 0.95rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--hairline);
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
    width: 100%;
  }
  .hero-scroll {
    display: none;
  }
}
