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

:root {
  --container-width: 50vw;
  --swing-angle: 3deg;
  --burgundy: #641014;
  --burgundy-hover: #420A0D;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-bg-strong: rgba(255, 255, 255, 0.22);
  --glass-border: rgba(255, 255, 255, 0.28);
  --navy: #0c1929;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.12);
  --text-muted: rgba(255, 255, 255, 0.75);
  --header-height: 72px;
  --header-offset: calc(1.25rem + 52px);
  --hero-v-gap: 1.5rem;
  --btn-height: 44px;
  --btn-gap: 0px;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

/* ==========================================================================
   Coming Soon page
   ========================================================================== */

body:not(.home-page) {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Instrument Sans", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: #4d3132;
  background: #ffffff;
  overflow-x: hidden;
}

.hanging-pivot {
  position: fixed;
  top: 0;
  right: calc(var(--container-width) / 2);
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
}

.hanging-swing {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--container-width);
  margin-left: calc(var(--container-width) / -2);
  transform-origin: center top;
  -webkit-transform-origin: center top;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  animation: hang-swing 5s ease-in-out infinite alternate;
}

.hanging-swing img {
  width: 100%;
}

body:not(.home-page) main {
  position: fixed;
  bottom: 0;
  left: 0;
  max-width: 55vw;
  padding: clamp(1.5rem, 5vw, 3rem);
  padding-bottom: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-bottom));
  padding-left: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-left));
  z-index: 2;
}

body:not(.home-page) h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4d3132;
}

@keyframes hang-swing {
  from {
    transform: rotate3d(0, 0, 1, var(--swing-angle));
  }

  to {
    transform: rotate3d(0, 0, 1, calc(var(--swing-angle) * -1));
  }
}

@media (max-width: 768px) {
  :root {
    --container-width: 62vw;
    --swing-angle: 2deg;
  }

  body:not(.home-page) main {
    max-width: 50vw;
  }

  body:not(.home-page) h1 {
    font-size: clamp(1.75rem, 9vw, 3rem);
    letter-spacing: 0.03em;
  }
}

@media (max-width: 480px) {
  :root {
    --container-width: 70vw;
    --swing-angle: 1.5deg;
  }

  body:not(.home-page) main {
    max-width: 62vw;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  body:not(.home-page) h1 {
    font-size: clamp(1.5rem, 11vw, 2.25rem);
    line-height: 1.15;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --container-width: 38vw;
  }

  body:not(.home-page) main {
    max-width: 45vw;
  }

  body:not(.home-page) h1 {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }
}

/* ==========================================================================
   Home page
   ========================================================================== */

body.home-page {
  font-family: "Instrument Sans", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--white);
  background: var(--navy);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: 1320px;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  justify-self: start;
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.logo span {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
}

.nav-glass {
  justify-self: center;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.35);
}

.nav-links .has-chevron svg {
  opacity: 0.85;
}

.header-cta {
  justify-self: end;
}

/* Split pill + circle buttons */
.btn-split {
  display: inline-grid;
  grid-template-columns: auto var(--btn-height);
  align-items: stretch;
  height: var(--btn-height);
  gap: var(--btn-gap);
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  transition: transform 0.2s;
  vertical-align: middle;
  box-sizing: border-box;
}

button.btn-split {
  appearance: none;
  -webkit-appearance: none;
}

.btn-split:hover {
  transform: translateY(-1px);
}

.btn-split-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}

.btn-split-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-height);
  height: 100%;
  border-radius: 50%;
  box-sizing: border-box;
  transform: rotate(0deg);
  transition: transform .3s;
}

.btn-split:hover .btn-split-icon {
  transform: rotate(45deg);
}

.btn-split-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.btn-split-burgundy .btn-split-text,
.btn-split-burgundy .btn-split-icon {
  background: var(--burgundy);
  color: var(--white);
  border: 1px solid transparent;
}

.btn-split-burgundy:hover .btn-split-text,
.btn-split-burgundy:hover .btn-split-icon {
  background: var(--burgundy-hover);
}

.btn-split-glass .btn-split-text,
.btn-split-glass .btn-split-icon {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--white);
}

.btn-split-glass:hover .btn-split-text,
.btn-split-glass:hover .btn-split-icon {
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-split-full {
  width: 100%;
  grid-template-columns: 1fr var(--btn-height);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(41, 74, 82, 0.38);
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: stretch;
  gap: 2rem;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-offset) + var(--hero-v-gap)) 1.5rem var(--hero-v-gap);
  min-height: 0;
}

.hero-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.hero-left {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
}

.hero-left .hero-title {
  max-width: 560px;
}

.hero-route-badge {
  width: 92px;
  height: 92px;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.route-circle {
  width: 100%;
  height: 100%;
  animation: route-spin 16s linear infinite;
  transform-origin: center;
}

.route-circle-text {
  fill: currentColor;
  font-family: "Instrument Sans", sans-serif;
  font-size: 10.25px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

@keyframes route-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-title .highlight {
  color: var(--white);
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.15em;
  letter-spacing: 0.01em;
  line-height: 1;
}

.hero-title .typing-wrap {
  display: inline-block;
  vertical-align: bottom;
  min-width: 12ch;
  white-space: nowrap;
}

.typing-cursor {
  display: inline-block;
  margin-left: 1px;
  font-style: italic;
  animation: typing-blink 0.75s step-end infinite;
}

@keyframes typing-blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.process-step .icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.process-step .icon svg {
  width: 18px;
  height: 18px;
}

.process-step span {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  max-width: 90px;
  line-height: 1.3;
}

.process-arrow {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.quote-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.quote-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quote-card > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-field {
  position: relative;
}

.form-field svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.form-field select,
.form-field input,
.form-field .file-label {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--white);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-field select:focus,
.form-field input:focus,
.form-field .file-label:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
}

.form-field select {
  appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-field select option {
  background: var(--navy);
  color: var(--white);
}

.form-field input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-field .file-label {
  display: block;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
}

.form-field .file-label input {
  display: none;
}

.form-field .file-label.has-file {
  color: var(--white);
}

.quote-form .btn-split {
  margin-top: 0.5rem;
}

.features-bar {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 0 1.5rem var(--hero-v-gap);
}

.features-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.35rem 0;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.feature-item:last-child {
  border-right: none;
}

.feature-item .icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.feature-item .icon svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.feature-item h3 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.feature-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tablet */
@media only screen and (max-width: 990px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: calc(100% - 2rem);
  }

  .logo {
    justify-self: auto;
  }

  .nav-glass {
    order: 2;
    margin-left: auto;
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .header-cta {
    order: 3;
    justify-self: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(12, 25, 41, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: flex;
    width: 100%;
    padding: 0.85rem 1rem;
    white-space: normal;
  }

  .header-cta .btn-split-text {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: calc(var(--header-offset) + var(--hero-v-gap)) 1.25rem var(--hero-v-gap);
  }

  .hero-left {
    justify-content: flex-start;
  }

  .hero-left .hero-title {
    max-width: none;
  }

  .hero-desc {
    max-width: none;
  }

  .hero-form-col {
    align-items: stretch;
  }

  .quote-card {
    width: 100%;
    max-width: none;
  }

  .features-bar {
    padding: 0 1.25rem var(--hero-v-gap);
  }

  .features-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item:nth-child(2n) {
    border-right: none;
  }

  .feature-item:nth-child(1),
  .feature-item:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .feature-item:nth-child(3),
  .feature-item:nth-child(4) {
    border-bottom: none;
  }
}

/* Phone */
@media only screen and (max-width: 767px) {
  :root {
    --header-offset: calc(0.75rem + 48px);
    --hero-v-gap: 1rem;
    --btn-height: 42px;
  }

  .site-header {
    top: 0.75rem;
    width: calc(100% - 1.25rem);
    gap: 0.5rem;
  }

  .logo img {
    width: 32px;
    height: 32px;
  }

  .logo span {
    font-size: 1.15rem;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }

  .hero-inner {
    padding: calc(var(--header-offset) + 0.75rem) 1rem var(--hero-v-gap);
    gap: 1.25rem;
  }

  .hero-route-badge {
    width: 76px;
    height: 76px;
    margin-bottom: 1rem;
  }

  .route-circle-text {
    font-size: 9px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    margin-bottom: 1rem;
  }

  .hero-title .highlight {
    font-size: 1.1em;
  }

  .hero-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .hero-actions .btn-split {
    width: 100%;
    grid-template-columns: 1fr var(--btn-height);
  }

  .process-steps {
    gap: 0.5rem;
  }

  .process-arrow {
    display: none;
  }

  .process-step {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .process-step .icon {
    width: 32px;
    height: 32px;
  }

  .process-step .icon svg {
    width: 16px;
    height: 16px;
  }

  .process-step span {
    font-size: 0.7rem;
    max-width: none;
  }

  .quote-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .quote-card h2 {
    font-size: 1.2rem;
  }

  .form-field select,
  .form-field input,
  .form-field .file-label {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.8125rem;
  }

  .features-bar {
    padding: 0 1rem var(--hero-v-gap);
  }

  .features-inner {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .feature-item {
    padding: 1rem 1.15rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .feature-item:nth-child(1),
  .feature-item:nth-child(2),
  .feature-item:nth-child(3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .feature-item:last-child {
    border-bottom: none;
  }

  .feature-item .icon {
    width: 36px;
    height: 36px;
  }

  .feature-item h3 {
    font-size: 0.8125rem;
  }

  .feature-item p {
    font-size: 0.6875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hanging-swing {
    animation: none;
  }

  .btn-split:hover {
    transform: none;
  }

  .hero-bg-video {
    display: none;
  }

  .typing-cursor {
    animation: none;
    opacity: 0;
  }

  .route-circle {
    animation: none;
  }
}
