/* ==========================================================================
   Correct Coffee | Consulting page
   Palette and type are taken from the client brief (PDF):
   burgundy #6D1F2B, gold #B39155, cream #F6F0E5, ink #252525
   Headings: Calibri (Carlito fallback). Body: Arial.
   ========================================================================== */

:root {
  /* colour */
  --cc-burgundy: #6D1F2B;
  --cc-burgundy-deep: #4A121C;
  --cc-burgundy-night: #3A0D15;
  --cc-burgundy-soft: #8A3040;
  --cc-gold: #B39155;
  --cc-gold-light: #D2B77F;
  --cc-cream: #F6F0E5;
  --cc-cream-light: #FBF8F2;
  --cc-white: #FFFFFF;
  --cc-ink: #252525;
  --cc-muted: #5E5B57;
  --cc-line: rgba(109, 31, 43, 0.22);
  --cc-line-light: rgba(246, 240, 229, 0.22);

  /* type */
  --font-head: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: Arial, "Liberation Sans", Helvetica, sans-serif;

  /* layout */
  --header-h: 68px;
  --header-h-full: 88px;
  --section-space: clamp(4rem, 8vw, 7.5rem);
  --radius-sm: 4px;
  --focus-ring: 0 0 0 3px var(--cc-cream), 0 0 0 6px var(--cc-burgundy);

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- base ---------- */
html { scroll-padding-top: calc(var(--header-h) + 1.5rem); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}


h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--cc-burgundy);
  letter-spacing: -0.01em;
}

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

a { color: inherit; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--cc-burgundy);
  color: var(--cc-cream);
}
.skip-link:focus { top: 1rem; }

/* ---------- buttons and links ---------- */
.btn {
  font-family: "Manrope", sans-serif ;
  font-weight: 500;
  line-height: 1;
  font-size: 14px;
  letter-spacing: 0;
  border-radius: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-lg { 
  font-size: 16px; 
  padding: 10px 15px; 
}

.btn-gold {
  background: #C9A66B;
  border: 2px solid #C9A66B;
  color: #fff;
}
.btn-gold:hover,
.btn-gold:focus-visible {
  background: transparent;
  border-color: #C9A66B;
  color: #C9A66B;
}

.btn-burgundy {
  background: var(--cc-burgundy);
  border: 2px solid #6B3F45;
  color: #6B3F45;
}

.btn-burgundy:hover,
.btn-burgundy:focus-visible {
  background: var(--cc-burgundy-deep);
  border-color: var(--cc-burgundy-deep);
  color: var(--cc-white);
}

.link-cream,
.link-burgundy {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  padding-bottom: 3px;
  transition: background-size 0.35s var(--ease-out);
}
.link-cream { color: #6B3F45; }
.link-burgundy { color: var(--cc-burgundy); white-space: nowrap; }
.link-cream:hover, .link-burgundy:hover { background-size: 0% 2px; background-position: 100% 100%; }

.hero :focus-visible,
.cta :focus-visible {
  box-shadow: 0 0 0 3px var(--cc-burgundy-night), 0 0 0 6px var(--cc-gold-light);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h-full) + clamp(2.5rem, 5vw, 4.5rem));
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.hero .container{
  height: 100%;
}

.hero .container .row{
  height: 100%;
}

/* .hero::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -35%;
  width: 62vw;
  max-width: 900px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(179, 145, 85, 0.28);
  box-shadow: 0 0 0 26px rgba(179, 145, 85, 0.06), 0 0 0 27px rgba(179, 145, 85, 0.22);
  pointer-events: none;
} */

.hero-crumbs { margin-bottom: 1.75rem; font-size: 0.95rem; }
.hero-crumbs .breadcrumb { --bs-breadcrumb-divider-color: var(--cc-gold-light); --bs-breadcrumb-item-active-color: var(--cc-cream); }
.hero-crumbs a { color: var(--cc-gold-light); text-decoration: none; }
.hero-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.hero-title {
  color:  #1A1A1A;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
}
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.hero-title .line b{
  color: #6B3F45;
}

.hero-title .line > span { display: block; }

.hero-lede {
  max-width: 52ch;
  font-size: 1.2rem;
  color: #1A1A1A;
  margin-bottom: 2.25rem;
  font-family: "Manrope", sans-serif;
}

/* hero image: arched frame with an offset gold outline */
.hero-figure {
  position: relative;
  max-width: 440px;
  margin-inline: auto;
}
.hero-figure-outline {
  position: absolute;
  inset: 0;
  transform: translate(18px, 18px);
  border: 2px solid var(--cc-gold);
  border-radius: 999px 999px 0 0;
}
.hero-figure-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: var(--cc-burgundy-deep);
}
.hero-figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- services ---------- */
.services {
  background: var(--cc-cream);
  padding-block: var(--section-space);
}

.service-index { position: sticky; top: calc(var(--header-h) + 2rem); }
.service-index-title {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
}
.service-index-body { display: flex; gap: 1.25rem; }

.rail {
  position: relative;
  width: 2px;
  flex: none;
  background: var(--cc-line);
}
.rail-fill {
  position: absolute;
  inset: 0;
  background: var(--cc-gold);
  transform-origin: top;
  transform: scaleY(0);
}

.service-index-list li + li { margin-top: 0.15rem; }
.service-index-list a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--cc-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.service-index-list a:hover { color: var(--cc-burgundy); }
.service-index-list a.is-active {
  color: var(--cc-burgundy);
  font-weight: 700;
  transform: translateX(6px);
}

.service {
  padding-block: 3rem;
  border-top: 1px solid var(--cc-line);
}
.service:first-child { padding-top: 0; border-top: 0; }
.service:last-child { padding-bottom: 0; }

.service-figure {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--cc-burgundy-deep);
}
.service-figure img { width: 100%; height: 100%; object-fit: cover; }

.service-title {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.service-text { max-width: 46ch; margin-bottom: 0; }

/* ---------- connect ---------- */
.connect {
  background: var(--cc-cream-light);
  padding-block: var(--section-space);
}

.connect-title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
  margin-bottom: 1.25rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
}

.connect-text { 
  max-width: 44ch; 
  color: #1A1A1A; 
  font-family: "Manrope", sans-serif;
}

.connect-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--cc-line);
}
.connect-row:last-child { border-bottom: 1px solid var(--cc-line); }
.connect-row > div { flex: 1 1 22rem; }
.connect-row-title { 
  font-size: 24px; 
  margin-bottom: 0.4rem; 
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
}
.connect-row-text { 
  margin-bottom: 0; 
  max-width: 46ch; 
  color: var(--cc-ink); 
  font-family: "Manrope", sans-serif;
}

/* ---------- CTA ---------- */
.cta {
  background: var(--cc-burgundy-deep);
  color: var(--cc-cream);
  padding-block: var(--section-space);
}
.cta-title {
  color: var(--cc-cream);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  margin-bottom: 1.5rem;
}
.cta-text {
  max-width: 54ch;
  color: rgba(246, 240, 229, 0.9);
  margin-bottom: 2.25rem;
}

.cta-share {
  border-left: 3px solid var(--cc-gold);
  padding-left: 2rem;
}
.cta-share-title {
  font-size: 1.35rem;
  color: var(--cc-gold-light);
  margin-bottom: 1rem;
}
.cta-share-list li {
  padding-block: 0.85rem;
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--cc-cream);
  border-top: 1px solid var(--cc-line-light);
}
.cta-share-list li:last-child { border-bottom: 1px solid var(--cc-line-light); }

/* ---------- animation start states (only when JS + GSAP run) ---------- */
.js .hero-title .line > span { transform: translateY(105%); }
.js [data-hero] { opacity: 0; transform: translateY(16px); }
.js .hero-figure-frame { clip-path: inset(0 0 100% 0); }
.js .hero-figure-outline { opacity: 0; }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  :root { --header-h-full: 76px; --header-h: 64px; }

  .service-index { position: static; }
  .service-index-body { display: block; }
  .rail { display: none; }

  /* index becomes a swipeable row of pills on tablet and mobile */
  .service-index-list {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
  }
  .service-index-list li + li { margin-top: 0; }
  .service-index-list a {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border: 1px solid var(--cc-line);
    border-radius: 999px;
    font-size: 1rem;
    scroll-snap-align: start;
  }
  .service-index-list a.is-active { transform: none; background: var(--cc-burgundy); color: var(--cc-cream); border-color: var(--cc-burgundy); }

  .service-index-title { font-size: 1.6rem; margin-bottom: 1rem; }
  .cta-share { margin-top: 0.5rem; }
}

@media (max-width: 767.98px) {
  .service { padding-block: 2.25rem; }
  .service-figure { aspect-ratio: 16 / 10; }
  .hero-figure { max-width: 320px; }
  .hero-figure-outline { transform: translate(12px, 12px); }
  .connect-row > div { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

/* ============== Innovation page =========================== */

/* hero without the large background ring */
.hero--plain::before { display: none; }

/* round hero image (a cup ring) */
.hero-figure--round { max-width: 460px; }
.hero-figure--round .hero-figure-outline,
.hero-figure--round .hero-figure-frame { border-radius: 50%; }
.hero-figure--round .hero-figure-frame { aspect-ratio: 1; }

/* what we develop */
.develop {
  position: relative;
}
.develop-figure {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--cc-burgundy-deep);
  margin-bottom: 1.75rem;
}
.develop-figure img { width: 100%; height: 100%; object-fit: cover; }

.develop-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.08;
  margin-bottom: 15px;
}

.develop-text { 
  max-width: 48ch; 
  margin-bottom: 0; 
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  color:  #1A1A1A;
}

@media (min-width: 768px) {
  /* second column sits lower so the pair reads as two separate offers */
  .develop .col-md-6:nth-child(2) { padding-top: 5rem; }
}

/* how development works: a real sequence, so the steps are numbered */
.process {
  position: relative;
}
.process-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.08;
  margin-bottom: 15px;
}

.step-line {
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--cc-line);
}
.step-line-fill {
  position: absolute;
  inset: 0;
  background: var(--cc-gold);
  transform-origin: top;
  transform: scaleY(0);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.75rem;
  padding-bottom: 3rem;
}
.step:last-child { padding-bottom: 0; }

.step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--cc-burgundy);
  background: var(--cc-burgundy);
  color: var(--cc-cream);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.js .step:not(.is-reached) .step-marker {
  background: var(--cc-cream-light);
  color: var(--cc-burgundy);
  border-color: var(--cc-line);
}

.step-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.08;
  margin-bottom: 15px;
}
.step-text { 
    max-width: 50ch; 
    margin-bottom: 0; 
    font-family: "Manrope", sans-serif;
    font-weight: 500;
}

.process-figure {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--cc-burgundy-deep);
}
.process-figure img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 991.98px) {
  .process-figure { position: static; aspect-ratio: 16 / 10; }
}

/* handoff section reuses .connect on a cream ground */
.connect--cream { 
  position: relative;
  background-color: transparent;

}


.statement-text {
  max-width: 44ch;
  margin: 0;
  padding-left: 1.75rem;
  border-left: 4px solid #6B3F45;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 1.2;
  color: #1A1A1A;
}

/* image captions sit on a soft gradient at the bottom of the image */
.develop-figure,
.process-figure { position: relative; }
.figure-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.1rem 0.9rem;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--cc-cream);
  background: linear-gradient(to top, rgba(58, 13, 21, 0.88), rgba(58, 13, 21, 0));
}

/* ==========================================================================
   Hero fail-safe: if the animation script does not run (missing file, blocked
   CDN, script error) the hero still appears after 2.6 seconds.
   ========================================================================== */
@keyframes cc-show { to { opacity: 1; transform: none; } }
@keyframes cc-fade { to { opacity: 1; } }
@keyframes cc-show-clip { to { clip-path: inset(0 0 0 0); } }

.js .hero-title .line > span,
.js [data-hero] { animation: cc-show 0.01s 2.6s forwards; }
.js .hero-figure-outline { animation: cc-fade 0.01s 2.6s forwards; }
.js .hero-figure-frame { animation: cc-show-clip 0.01s 2.6s forwards; }
