:root {
  --navy-deep: #07152c;
  --navy: #0b2346;
  --navy-soft: #173a6b;
  --cream: #f9f1e1;
  --paper: #efe1c7;
  --amber: #f29b43;
  --amber-deep: #ef7a2a;
  --line: rgba(7, 21, 44, 0.2);
  --card: linear-gradient(165deg, rgba(255, 250, 242, 0.9), rgba(240, 227, 201, 0.9));
  --card-border: rgba(11, 35, 70, 0.34);
  --radius: 18px;
  --shadow: 0 16px 30px rgba(7, 21, 44, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Libre Baskerville", serif;
  color: var(--navy-deep);
  background:
    radial-gradient(circle at 84% 8%, rgba(242, 155, 67, 0.3), transparent 34%),
    radial-gradient(circle at 16% 9%, rgba(23, 58, 107, 0.23), transparent 35%),
    linear-gradient(180deg, #fff8eb 0%, #f5ead5 56%, #ead8b4 100%);
  line-height: 1.6;
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(45deg, rgba(7, 21, 44, 0.08) 0 2px, transparent 2px 20px),
    repeating-linear-gradient(-45deg, rgba(7, 21, 44, 0.06) 0 1px, transparent 1px 18px);
  opacity: 0.5;
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid rgba(242, 155, 67, 0.55);
  background:
    linear-gradient(180deg, rgba(58, 98, 148, 0.94), rgba(34, 67, 112, 0.92));
  box-shadow: 0 10px 24px rgba(7, 21, 44, 0.48);
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 190px;
  height: auto;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
}

.brand-fallback {
  display: none;
  font-family: "Cinzel", serif;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--cream);
}

.brand-fallback span {
  color: var(--amber);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a,
.footer-wrap a {
  color: var(--cream);
  text-decoration: none;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  position: relative;
}

.site-nav a::after,
.footer-wrap a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.24rem;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep));
  transition: transform 0.28s ease;
}

.site-nav a:hover::after,
.footer-wrap a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(242, 155, 67, 0.65);
  background: linear-gradient(180deg, #1b406f, #0d264a);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  margin: 5px auto;
}

.hero {
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.5rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 2rem;
}

.eyebrow {
  font-family: "Cinzel", serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber-deep);
  font-size: 0.75rem;
  margin: 0 0 0.9rem;
}

h1,
h2,
h3 {
  font-family: "Cinzel", serif;
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.14;
  color: var(--navy-deep);
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  text-wrap: balance;
}

.hero-copy {
  margin-top: 1.15rem;
  max-width: 58ch;
  font-size: 1.02rem;
  color: #183a69;
}

.text-line {
  color: var(--navy);
}

.text-lever {
  color: var(--amber-deep);
}

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

.btn {
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-primary {
  color: #fff;
  border: 1px solid rgba(8, 27, 53, 0.75);
  background: linear-gradient(125deg, var(--amber), var(--amber-deep));
  box-shadow: 0 12px 26px rgba(239, 122, 42, 0.36);
}

.btn-ghost {
  color: var(--navy-deep);
  border: 1px solid rgba(11, 35, 70, 0.4);
  background: rgba(255, 255, 255, 0.54);
}

.hero-visual {
  display: grid;
  place-items: center;
}

.hero-visual svg {
  width: min(100%, 500px);
  overflow: visible;
}

.gear-body {
  fill: url(#gearFill);
  stroke: rgba(7, 21, 44, 0.55);
  stroke-width: 2;
}

.gear-inner {
  fill: rgba(255, 255, 255, 0.78);
  stroke: rgba(11, 35, 70, 0.36);
  stroke-width: 2;
}

.gear-tooth {
  fill: #102b52;
  stroke: rgba(7, 21, 44, 0.55);
  stroke-width: 1;
}

.lever-arm {
  stroke: #123160;
  stroke-width: 12;
  stroke-linecap: round;
}

.lever-pivot {
  fill: #173a6b;
  stroke: #f3c084;
  stroke-width: 4;
}

.lever-knob {
  fill: #ef7a2a;
  stroke: rgba(7, 21, 44, 0.7);
  stroke-width: 4;
}

.panel {
  fill: rgba(11, 35, 70, 0.08);
  stroke: rgba(11, 35, 70, 0.22);
  stroke-width: 1;
}

.panel-line {
  fill: rgba(11, 35, 70, 0.26);
}

.trace {
  stroke: url(#accentLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 840;
  stroke-dashoffset: 840;
  animation: drawLine 2.5s ease forwards 0.45s;
}

.section-pad {
  padding: clamp(2.4rem, 7vw, 5.2rem) 0;
}

.section-title {
  font-size: clamp(1.55rem, 3.8vw, 2.6rem);
  max-width: 19ch;
}

.cards,
.work-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.work-card,
.contact-box {
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.card,
.work-card {
  padding: 1.4rem;
  position: relative;
}

.card::before,
.work-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(11, 35, 70, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.card p,
.work-card p,
.timeline p,
.contact-box p {
  margin: 0.7rem 0 0;
}

.process {
  position: relative;
}

.process::before {
  content: "";
  position: absolute;
  inset: auto 0 1.3rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(11, 35, 70, 0.34), transparent);
}

.process-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 2.2rem;
  align-items: start;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(11, 35, 70, 0.28);
  border-radius: 15px;
  background: rgba(255, 249, 238, 0.62);
}

.timeline span {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--amber-deep);
  font-weight: 700;
}

.tag {
  font-size: 0.78rem;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-deep);
}

.contact-box {
  text-align: center;
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

.contact-box h2 {
  font-size: clamp(1.45rem, 3.2vw, 2.3rem);
  max-width: 22ch;
  margin-inline: auto;
}

.contact-box p {
  max-width: 62ch;
  margin: 0.95rem auto 1.3rem;
}

/* Contact Form Styles */
.contact-form {
  max-width: 540px;
  margin: 2rem auto 0;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  border: 2px solid rgba(11, 35, 70, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  font-family: "Libre Baskerville", serif;
  font-size: 0.95rem;
  color: var(--navy-deep);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 155, 67, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}

/* Thank You Message Styles */
.thank-you {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 540px;
  margin: 2rem auto 0;
}

.thank-you h3 {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy-deep);
  margin: 0 0 0.8rem;
}

.thank-you p {
  margin: 0 0 1.5rem;
  color: var(--navy-soft);
}

.site-footer {
  border-top: 2px solid rgba(242, 155, 67, 0.4);
  padding: 1.2rem 0 1.8rem;
  background: linear-gradient(180deg, rgba(58, 98, 148, 0.94), rgba(34, 67, 112, 0.92));
  color: var(--cream);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .cards,
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-title {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 1.25rem;
    width: min(280px, calc(100% - 2.5rem));
    display: grid;
    gap: 0.2rem;
    padding: 0.55rem;
    border: 1px solid rgba(242, 155, 67, 0.6);
    border-radius: 14px;
    background: rgba(9, 27, 53, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }

  .site-nav a {
    padding: 0.55rem;
    border-radius: 8px;
  }

  .site-nav a:hover {
    background: rgba(242, 155, 67, 0.14);
  }

  .site-nav.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .cards,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-form {
    margin: 1.5rem auto 0;
    padding: 0 1rem;
  }

  .thank-you {
    margin: 1.5rem auto 0;
    padding: 2rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
