:root {
  --offwhite: #fdf8ed;
  --paper: #f7f4ee;
  --dark: #282725;
  --navy: #102a47;
  --navy-soft: #1d3b5f;
  --line: rgba(16, 42, 71, 0.48);
  --line-soft: rgba(16, 42, 71, 0.18);
  --ink: #1e1d1b;
  --muted: rgba(34, 32, 30, 0.72);
  --shadow: 0 25px 60px rgba(16, 42, 71, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: "Archivo", "Arial", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

.site-main {
  min-height: 100vh;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.landing-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 5.5rem 0 0;
  background: transparent;
}

/*
  The image sits in the flow below the hero text and keeps its native aspect
  ratio (1376x768). Its top ~36% is empty sky, so a negative top margin pulls
  that sky up behind the text while the mountain peaks always start just below
  it, at any screen size.
*/
.hero-image {
  --hero-w: max(100%, 900px);
  position: relative;
  z-index: 0;
  order: 1;
  flex: none;
  width: var(--hero-w);
  aspect-ratio: 1376 / 768;
  margin: calc(var(--hero-w) * -0.2 + 1rem) calc((100% - var(--hero-w)) / 2) 0;
  background-image: url('../images/Background.jpg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  /* Eased fade (smoothstep) so the image blends into the page without a visible edge. */
  --hero-fade: linear-gradient(
    180deg,
    #000 0%,
    #000 55%,
    rgba(0, 0, 0, 0.97) 59.5%,
    rgba(0, 0, 0, 0.9) 64%,
    rgba(0, 0, 0, 0.79) 68.5%,
    rgba(0, 0, 0, 0.65) 73%,
    rgba(0, 0, 0, 0.5) 77.5%,
    rgba(0, 0, 0, 0.35) 82%,
    rgba(0, 0, 0, 0.21) 86.5%,
    rgba(0, 0, 0, 0.1) 91%,
    rgba(0, 0, 0, 0.03) 95.5%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: var(--hero-fade);
  mask-image: var(--hero-fade);
}

.brand-mark {
  position: absolute;
  top: 1.2rem;
  left: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 54px;
  padding: 0.4rem 0.8rem;
  border: 2px solid rgba(15, 26, 38, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 0 rgba(15, 26, 38, 0.15);
  z-index: 2;
}

.mark-core {
  font-family: "Courier Prime", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ink);
}

.hero-row {
  position: relative;
  z-index: 2;
  order: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin: 0;
  padding: 2.1rem 0.5in 0;
}

.intro-block {
  display: inline-block;
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Libre Baskerville", "Georgia", serif;
  letter-spacing: -0.06em;
}

h1 {
  font-size: clamp(5rem, 9vw, 11rem);
  letter-spacing: calc(-0.06em + 3px);
  line-height: 0.82;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
}

.subtitle {
  margin-top: 0.5rem;
  font-family: "Libre Baskerville", "Georgia", serif;
  font-size: clamp(1.3rem, 2.6vw, 2.86rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
}

.hero-tagline {
  max-width: none;
  margin: 0;
  font-family: "Libre Baskerville", "Georgia", serif;
  font-size: clamp(1.05rem, 2vw, 1.75rem);
  line-height: 1.1;
  color: #3a3a3a;
  text-align: right;
}

.hero-tagline.section-tagline {
  margin: 0 0 2rem;
  font-size: clamp(1.575rem, 3vw, 2.625rem);
  text-align: center;
  color: var(--offwhite);
}

.hero-tagline.section-tagline-next {
  margin-top: 4rem;
  scroll-margin-top: calc(58px + 2rem);
}

.section-title {
  margin: 0 0 1.5rem;
  font-family: "Libre Baskerville", "Georgia", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: #3a3a3a;
  scroll-margin-top: calc(58px + 2rem);
}

.services-section {
  position: relative;
  padding: calc(5rem + 2in) 0 0.5in;
  /* Eased fade from off-white to navy (no hard start line). */
  background-color: var(--offwhite);
  background-image: linear-gradient(
    180deg,
    rgba(16, 42, 71, 0) 0%,
    rgba(16, 42, 71, 0.03) 4%,
    rgba(16, 42, 71, 0.1) 8%,
    rgba(16, 42, 71, 0.21) 12%,
    rgba(16, 42, 71, 0.35) 16%,
    rgba(16, 42, 71, 0.5) 20%,
    rgba(16, 42, 71, 0.65) 24%,
    rgba(16, 42, 71, 0.79) 28%,
    rgba(16, 42, 71, 0.9) 32%,
    rgba(16, 42, 71, 0.97) 36%,
    rgba(16, 42, 71, 1) 40%,
    rgba(16, 42, 71, 1) 100%
  );
  scroll-margin-top: 58px;
}

.services-section .section-title {
  color: #3a3a3a;
}

.services-section .card-face {
  border-color: rgba(255, 255, 255, 0.28);
}

.services-section .flip-card:hover .card-face,
.services-section .flip-card:focus-visible .card-face {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 30px 70px rgba(0, 0, 0, 0.35);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.flip-card {
  perspective: 1200px;
  min-height: 410px;
  cursor: pointer;
  outline: none;
  transition: transform 0.25s ease;
}

.flip-card:hover,
.flip-card:focus-visible {
  transform: translateY(-6px);
}

.flip-card .card-face {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.flip-card:hover .card-face,
.flip-card:focus-visible .card-face {
  border-color: rgba(16, 42, 71, 0.6);
  box-shadow: 0 0 0 2px rgba(16, 42, 71, 0.35), 0 30px 70px rgba(16, 42, 71, 0.22);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 410px;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.flip-card.static-card {
  cursor: default;
  min-height: 205px;
}

.flip-card.static-card .card-inner {
  min-height: 205px;
}

/* Let static cards grow if content exceeds the reduced height. */
.flip-card.static-card .card-face {
  position: relative;
  min-height: 205px;
  height: 100%;
}

.card-face {
  position: absolute;
  inset: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 24px;
  backface-visibility: hidden;
  border: 1px solid rgba(16, 42, 71, 0.22);
  background: rgba(255,255,255,0.22);
  box-shadow: var(--shadow);
}

.card-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: rotateY(0deg);
  background: var(--offwhite);
  color: var(--dark);
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--dark);
  color: var(--offwhite);
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(16,42,71,0.08);
  color: var(--navy);
  font-family: "Archivo", "Arial", sans-serif;
  font-weight: 800;
  margin-bottom: 2rem;
}

.card-front h3,
.card-back h3 {
  font-family: "Libre Baskerville", "Georgia", serif;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.1;
  color: var(--navy);
}

.card-front h3,
.card-front p,
.card-front .card-list {
  color: var(--dark);
}

.card-back h3 {
  color: var(--offwhite);
  margin-bottom: 0.8rem;
}

.card-front p,
.card-back p {
  margin: 0.8rem 0 0;
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.6;
}

.card-back p {
  color: var(--offwhite);
}

.card-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted);
}

.card-list li + li {
  margin-top: 0.35rem;
}

.card-back .card-list {
  color: var(--offwhite);
}

.flip-hint {
  margin: -1.4rem 0 2rem;
  text-align: center;
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #c8c8c8;
}

.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}

/* Reserve two lines for titles so content lines up across cards. */
.services-section .card-face h3 {
  min-height: 2.2em;
}

.cube-scene {
  width: 90px;
  height: 90px;
  perspective: 600px;
}

.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: cube-spin 8s linear infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(58, 58, 58, 0.85);
  background: rgba(16, 42, 71, 0.08);
}

.cube-front  { transform: translateZ(45px); }
.cube-back   { transform: rotateY(180deg) translateZ(45px); }
.cube-right  { transform: rotateY(90deg) translateZ(45px); }
.cube-left   { transform: rotateY(-90deg) translateZ(45px); }
.cube-top    { transform: rotateX(90deg) translateZ(45px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(45px); }

@keyframes cube-spin {
  from { transform: rotateX(-24deg) rotateY(0deg); }
  to   { transform: rotateX(-24deg) rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cube {
    animation: none;
    transform: rotateX(-24deg) rotateY(35deg);
  }
}

.card-back .coming-soon-text {
  margin: 0;
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--offwhite);
}

.card-back .cube-face {
  border-color: rgba(253, 248, 237, 0.85);
  background: rgba(253, 248, 237, 0.06);
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  padding: 0;
  background: rgba(252, 248, 237, 0.98);
  border-bottom: 1px solid rgba(16, 42, 71, 0.16);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.5in;
  background: rgba(252, 248, 237, 1);
  border: none;
  backdrop-filter: none;
  box-shadow: none;
}

.logo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 26px;
  font-family: "Archivo", "Arial", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.6rem;
  color: rgba(16, 42, 71, 0.7);
}

.logo-slot img {
  height: 40px;
  width: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.copy-email,
.nav-button {
  appearance: none;
  border: 1px solid rgba(58, 58, 58, 0.24);
  background: #3a3a3a;
  color: #f4f4f4;
  min-width: 120px;
  min-height: 38px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-family: "Archivo", "Arial", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.copy-email:hover,
.nav-button:hover {
  transform: translateY(-1px);
  background: #2a2a2a;
}

.copy-email:active,
.nav-button:active {
  transform: translateY(0);
}

.contact-wrap {
  position: relative;
}

.contact-popover {
  position: absolute;
  top: 50%;
  right: calc(100% + 0.6rem);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  white-space: nowrap;
  z-index: 30;
}

.contact-popover[hidden] {
  display: none;
}

.contact-email {
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3a3a3a;
}

.contact-email:hover {
  text-decoration: underline;
}

.copy-icon {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(58, 58, 58, 0.24);
  border-radius: 8px;
  background: #3a3a3a;
  color: #f4f4f4;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.copy-icon:hover {
  background: #2a2a2a;
  border-color: rgba(58, 58, 58, 0.4);
}

.copy-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-icon .icon-check,
.copy-icon.is-copied .icon-copy {
  display: none;
}

.copy-icon.is-copied .icon-check {
  display: block;
}

.copy-icon.is-copied {
  color: #9be3b4;
}

.copy-status {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0.6rem;
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a3a3a;
}

.bottom-bar {
  position: relative;
  z-index: 16;
  background: #3a3a3a;
  color: var(--offwhite);
  border-top: 1px solid rgba(0, 0, 0, 0.3);
}

.bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.55rem 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding-left: calc(0.2rem + 0.5in);
  font-family: "Archivo", "Arial", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand img {
  height: 32px;
  width: auto;
}

/* Bubbles that rise from the bottom of the screen while scrolling down. */
.bubble-layer {
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.5;
}

.bubble {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 248, 237, 0.85);
  background: radial-gradient(circle at 32% 30%, rgba(253, 248, 237, 0.9) 0 12%, rgba(253, 248, 237, 0.28) 40%, rgba(253, 248, 237, 0.08) 72%);
  box-shadow: 0 0 8px rgba(253, 248, 237, 0.25);
  animation: bubble-rise var(--rise, 3s) cubic-bezier(0.3, 0.1, 0.6, 1) forwards;
}

@keyframes bubble-rise {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  50% {
    transform: translate(var(--sway, 16px), -45vh) scale(1);
  }
  100% {
    transform: translate(calc(var(--sway, 16px) * -0.5), -85vh) scale(1.05);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bubble-layer {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-row {
    flex-direction: column;
    gap: 1.4rem;
    padding-top: 5rem;
  }

  .hero-tagline {
    align-self: flex-end;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    left: 0.8rem;
    top: 0.8rem;
    min-width: 62px;
    min-height: 46px;
  }

  .mark-core {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
  }

  .bottom-bar-inner {
    width: min(100% - 1.2rem, 1200px);
  }

  .landing-screen {
    padding-top: 0.6rem;
  }

  h1 {
    font-size: clamp(3.3rem, 20vw, 6rem);
  }

  .subtitle {
    font-size: 1.17rem;
  }
}
