/* Home page redesign. Loaded last, and only by index.html, so every rule
   here is scoped to the home page. Other pages keep the original look. */

:root {
  --night: #2c4360;
  --night-2: #3a5577;
  --violet: #415d82;
  --violet-hover: #334a68;
  --violet-soft: #fdf0e4;
  --violet-glow: #f7b98a;
  --blue: #415d82;
  --blue-deep: #2c4360;
}

/* ---------- Hero ---------- */

.home-hero {
  height: auto;
  min-height: 700px;
  padding: 150px 0 120px;
  background:
    var(--night);
}

.home-hero::before {
  display: none;
}

.home-hero .hero-copy {
  max-width: 44rem;
}

.home-hero .hero-kicker {
  color: var(--violet-glow);
}

.home-hero h1 {
  max-width: 16ch;
}

.home-hero .btn-light {
  color: var(--night);
}

.home-hero .btn-light:hover {
  background: var(--violet-soft);
}

.btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--white);
  font-size: 0.95rem;
  margin-left: 4px;
}

/* ---------- Spreadsheet call to action ---------- */

.spreadsheet-cta {
  background: var(--paper);
  padding: 0 0 56px;
}

.spreadsheet-cta .tile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 40px;
  padding: 40px 48px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(12, 24, 44, 0.04), 0 16px 36px -24px rgba(12, 24, 44, 0.25);
}

.spreadsheet-cta .tile-question {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.spreadsheet-cta .tile-link {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  color: var(--violet);
  text-decoration: none;
  border-bottom: 2px solid var(--violet-soft);
  padding-bottom: 2px;
}

/* ---------- What we do ---------- */

.features {
  background: var(--paper);
  background-image: none;
  padding: 96px 0 28px;
}

.features .feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.features .section-intro {
  max-width: 44rem;
  margin-bottom: 48px;
}

.features .section-intro h2 {
  margin-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pill::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
}

.pill--light {
  background: rgba(252, 249, 242, 0.12);
  color: var(--white);
}

.pill--light::after {
  background: var(--violet-glow);
}

.features .feature {
  border-radius: 24px;
  padding: 36px 32px 34px;
  box-shadow: 0 1px 2px rgba(12, 24, 44, 0.04), 0 16px 36px -24px rgba(12, 24, 44, 0.22);
}

.features .feature::before {
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.features .feature-icon {
  background: var(--violet-soft);
  color: var(--violet);
  box-shadow: none;
}

.features .feature:hover .feature-icon {
  background: var(--violet);
  color: var(--white);
}

.features .feature {
  display: flex;
  flex-direction: column;
}

/* Two lines reserved, so body text starts at the same height in every card */
.features .feature h3 {
  min-height: 2.4em;
}

.features .feature a {
  display: inline-flex;
  gap: 6px;
  margin-top: auto;
  color: var(--violet);
}

/* ---------- How we work: blue process band ---------- */

.process {
  padding: 104px 0;
  color: var(--white);
  background:
    linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 55%, #5a7598 100%);
}

.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.process h2 {
  color: var(--white);
}

.process-head p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  margin-top: 18px;
}

.process .steps {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.process .steps::before {
  display: none;
}

.process .step {
  padding: 28px 26px;
  border-radius: 20px;
  background: rgba(252, 249, 242, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.process .step-num,
.process .steps.is-visible .step-num {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 26px;
  border: 0;
  background: none;
  color: var(--violet-glow);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.process .step h3 {
  color: var(--white);
}

.process .step p {
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- Clients ---------- */

.clients {
  padding: 96px 0 88px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.clients h2 {
  max-width: 22ch;
}

.clients .client-marquee {
  background: var(--white);
}

.clients .client-marquee::before {
  background: linear-gradient(90deg, var(--white), transparent);
}

.clients .client-marquee::after {
  background: linear-gradient(270deg, var(--white), transparent);
}

.clients .client-visit {
  color: var(--violet);
}

/* Logos that are taller than the standard box */
.client-logo--fit {
  height: 80px;
  width: auto;
  max-width: 100%;
}

.clients .client-link:hover,
.clients .client-link:focus-visible {
  border-color: var(--violet-soft);
}

/* ---------- About ---------- */

.about {
  padding: 104px 0;
}

.quote-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.about-quote-card {
  padding: 56px 52px;
  border-radius: 24px;
  background: var(--violet-soft);
}

.about-quote-card p {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--night);
}

.about .links a:not(.button) {
  border-bottom-color: var(--violet);
  color: var(--violet);
}

.about .button {
  background: var(--violet);
  border-bottom: 0;
}

.about .button:hover {
  background: var(--violet-hover);
}

/* ---------- Closing ---------- */

.closing {
  padding: 104px 0 112px;
  background:
    var(--night);
  border-top: 0;
  color: var(--white);
}

.closing .closing-line {
  color: var(--white);
  max-width: 22ch;
}

.closing .closing-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background-color: var(--violet);
  color: var(--white);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.closing .closing-email:hover {
  background-color: var(--violet-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px rgba(65, 93, 130, 0.6);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night);
  color: #a9b7c6;
  padding: 0;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding: 72px 0 56px;
}

.footer-brand p {
  color: #a9b7c6;
  margin: 14px 0 0;
  max-width: 28ch;
}

.footer-brand .brand {
  color: var(--white);
}

.footer-brand .brand:hover {
  color: var(--white);
}

.footer-brand .brand-logo img {
  filter: brightness(0) invert(1);
}

.footer-col h4 {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.site-footer .footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
}

.site-footer a {
  color: #dfe8f0;
}

.site-footer a:hover {
  color: var(--violet-glow);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .process .step {
    padding: 24px 22px;
  }

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

@media (max-width: 860px) {
  .home-hero {
    padding: 120px 0 88px;
  }

  .process-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .quote-band {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .spreadsheet-cta .tile {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .home-hero {
    min-height: 0;
  }

  .home-hero .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .spreadsheet-cta .tile {
    padding: 28px 24px;
  }

  .process .steps,
  .features .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .closing .closing-email {
    width: 100%;
    justify-content: center;
    word-break: normal;
  }
}

/* ---------- Inner pages (services, contact) ---------- */

.page-hero {
  display: block;
  height: auto;
  min-height: 0;
  padding: 150px 0 96px;
  background:
    var(--night);
}

.page-hero::before {
  display: none;
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .hero-kicker {
  color: var(--violet-glow);
}

.page-hero .hero-lede {
  color: rgba(255, 255, 255, 0.8);
  max-width: 40rem;
}

/* Text blocks become cards, as on the home page */
.split .text {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px 52px;
  box-shadow: 0 1px 2px rgba(12, 24, 44, 0.04), 0 16px 36px -24px rgba(12, 24, 44, 0.22);
}

/* Keep the pill above the heading in the two-column layout */
@media (min-width: 861px) {
  .split .text > .pill {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-bottom: 0;
  }

  .split .text > h2 {
    grid-row: 2 / span 19;
  }
}

.split .pill {
  margin-bottom: 18px;
}

.plain-list li {
  position: relative;
  padding: 12px 0 12px 26px;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--violet);
}

.button,
.btn-primary {
  background: var(--violet);
}

.button:hover,
.btn-primary:hover {
  background: var(--violet-hover);
}

.links a {
  color: var(--violet);
  border-bottom-color: var(--violet-soft);
}

.links .button {
  color: var(--white);
  border-bottom: 0;
}

.band {
  background:
    linear-gradient(140deg, #415d82 0%, #2c4360 60%, var(--night) 100%);
  border-radius: 24px;
}

.band h2 {
  color: var(--white);
}

.band p {
  color: rgba(255, 255, 255, 0.85);
}

.band .links a {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.6);
}

.contact-lines a {
  color: var(--violet);
  font-weight: 700;
}

/* Services: four cards in a two-column grid */
.services-section {
  padding: 96px 0 72px;
  background: var(--paper);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  padding: 44px 44px 40px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(12, 24, 44, 0.04), 0 16px 36px -24px rgba(12, 24, 44, 0.22);
}

.service-card h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  margin-bottom: 16px;
}

.service-card .plain-list {
  margin-bottom: 1.1em;
}

.service-card .links {
  margin-top: 8px;
}

@media (max-width: 860px) {
  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .service-card {
    padding: 32px 26px;
  }
}

/* Contact: intro card beside the brief checklist */
.contact-section {
  padding: 96px 0;
  background: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
}

.contact-card {
  padding: 48px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(12, 24, 44, 0.04), 0 16px 36px -24px rgba(12, 24, 44, 0.22);
}

.contact-card--intro {
  background:
    var(--night);
  border-color: transparent;
  color: var(--white);
}

.contact-card--intro h2 {
  color: var(--white);
}

.contact-card--intro p {
  color: rgba(255, 255, 255, 0.8);
}

.contact-card--intro .contact-lines {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

.contact-card--intro .contact-lines div {
  margin-bottom: 22px;
}

.contact-card--intro .contact-lines strong {
  display: block;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--violet-glow);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-card--intro .contact-lines br {
  display: none;
}

.contact-card--intro .contact-lines a {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .contact-card {
    padding: 32px 26px;
  }
}

/* Buttons inside link rows: no underline, no arrow, full padding */
.links .button {
  padding: 14px 26px;
  border-bottom: 0;
}

.links .button::after {
  content: none;
}

@media (max-width: 600px) {
  .page-hero {
    padding: 120px 0 72px;
  }

  .split .text {
    padding: 32px 26px;
  }
}

/* Wordmark logo. The image has a cream background and extra space, so it is
   cropped to the wordmark and set on a matching cream card. */
.brand-wordmark {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 172px;
  height: 56px;
  padding: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #fcf9f2;
}

.brand-wordmark img {
  position: absolute;
  left: 2px;
  top: -51px;
  width: 173px;
  height: 173px;
  max-width: none;
}

/* Phone: the same crop, scaled to fit the smaller header */
@media (max-width: 600px) {
  .brand-wordmark {
    width: 150px;
    height: 50px;
  }

  .brand-wordmark img {
    left: 3px;
    top: -43px;
    width: 149px;
    height: 149px;
  }
}

/* ---------- Depth for off-white elements on blue ---------- */

.process .step {
  box-shadow: 0 22px 40px -22px rgba(12, 24, 44, 0.6), 0 2px 6px rgba(12, 24, 44, 0.18);
}

.home-hero .btn-light {
  box-shadow: 0 14px 28px -12px rgba(12, 24, 44, 0.55);
}

.band {
  box-shadow: 0 30px 60px -28px rgba(12, 24, 44, 0.6);
}

/* ---------- Home hero on the off-white paper colour ---------- */

.home-hero {
  background: var(--paper);
  color: var(--ink);
}

.home-hero h1 {
  color: var(--night);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-hero .hl {
  color: var(--night);
}

.home-hero .hero-kicker {
  color: var(--teal);
}

.home-hero .hero-lede {
  color: var(--ink-2);
}

.home-hero .btn-light {
  background: var(--night);
  color: var(--white);
  box-shadow: 0 14px 28px -14px rgba(44, 67, 96, 0.6);
}

.home-hero .btn-light:hover {
  background: var(--violet-hover);
  color: var(--white);
}

.home-hero .btn-ghost {
  border-color: var(--night);
  color: var(--night);
}

.home-hero .btn-ghost:hover {
  border-color: var(--night);
  color: var(--night);
  background: var(--violet-soft);
}

/* A deeper warm tone for the home hero, so it is softer than the page */
.home-hero {
  background: #f2ebe0;
}

/* Hero: text on the left, a real project in a browser frame on the right */
.home-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-work {
  margin: 0;
}

.browser {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3dccf;
  box-shadow: 0 30px 60px -30px rgba(44, 67, 96, 0.45);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #ece5d8;
  border-bottom: 1px solid #e3dccf;
}

.browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9bfae;
}

.browser img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-work figcaption {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

@media (max-width: 860px) {
  .home-hero .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

/* Two-column hero: a slightly smaller headline so it wraps in fewer lines */
.home-hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  max-width: none;
}

/* The full-page capture is cropped to its top section in the hero frame */
.browser img {
  aspect-ratio: 947 / 872;
  object-fit: cover;
  object-position: top center;
}

/* A fan of project frames: two sit behind the front one, tilted */
.hero-stack {
  position: relative;
  padding: 0 0 72px;
}

.hero-stack .browser {
  position: absolute;
  width: 78%;
  transition: transform 0.4s var(--ease);
}

.hero-stack .fan-front {
  position: relative;
  width: 78%;
  margin-left: 22%;
  z-index: 3;
}

.hero-stack .fan-left {
  top: 0;
  left: 0;
  z-index: 1;
  transform: rotate(-7deg);
}

.hero-stack .fan-right {
  top: 64px;
  right: -22px;
  z-index: 2;
  transform: rotate(9deg);
}

.hero-stack .browser img {
  aspect-ratio: 947 / 872;
  object-fit: cover;
  object-position: top center;
}

.hero-work:hover .fan-left {
  transform: rotate(-9deg) translateX(-6px);
}

.hero-work:hover .fan-right {
  transform: rotate(7deg) translateX(6px);
}

@media (max-width: 860px) {
  .hero-stack {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* Depth for the fan: perspective, turned cards and deeper shadows */
.hero-stack {
  perspective: 1400px;
}

.hero-stack .browser {
  box-shadow: 0 46px 70px -30px rgba(44, 67, 96, 0.6), 0 12px 24px -10px rgba(44, 67, 96, 0.3);
}

.hero-stack .fan-left {
  transform: rotate(-7deg) rotateY(16deg) translateZ(-40px);
}

.hero-stack .fan-right {
  transform: rotate(9deg) rotateY(-14deg) translateZ(-40px);
}

.hero-stack .fan-front {
  transform: rotateY(-5deg) translateZ(20px);
  box-shadow: 0 56px 80px -32px rgba(44, 67, 96, 0.7), 0 18px 30px -12px rgba(44, 67, 96, 0.35);
}

.hero-work:hover .fan-left {
  transform: rotate(-9deg) rotateY(20deg) translateZ(-40px) translateX(-6px);
}

.hero-work:hover .fan-right {
  transform: rotate(11deg) rotateY(-18deg) translateZ(-40px) translateX(6px);
}

/* Frames stand out from the hero: darker bar, firmer edge, stronger dots */
.browser {
  border: 1px solid #cfc5b3;
}

.browser-bar {
  background: #d8cfbd;
  border-bottom: 1px solid #c4b9a5;
}

.browser-bar span {
  background: #a99c86;
}

/* Contact in the header is a filled button, so it stands out from Home and Services */
.main-nav a[href="contact.html"] {
  padding: 10px 20px;
  border-bottom: 0;
  border-radius: 999px;
  background: var(--night);
  color: var(--white);
  box-shadow: 0 8px 18px -10px rgba(44, 67, 96, 0.7);
}

.main-nav a[href="contact.html"]:hover,
.main-nav a[href="contact.html"][aria-current="page"] {
  background: var(--violet-hover);
  color: var(--white);
  border-bottom: 0;
}

/* Fit the home hero on one laptop screen: tighter padding and a smaller headline */
.home-hero {
  min-height: 0;
  padding: 110px 0 80px;
}

.home-hero h1 {
  font-size: clamp(2.1rem, 3.4vw, 3.1rem);
  line-height: 1.08;
}

.home-hero .hero-lede {
  margin: 20px 0 28px;
}

@media (min-width: 861px) and (max-height: 960px) {
  .home-hero {
    padding: 96px 0 56px;
  }
}
