/* Cabiny | About and related pages
 * Loaded after style.css on About, Team, FAQ and Services. These pages share
 * the compact banner. Edit image paths in the relevant HTML file.
 */

/* ABOUT 01 | Compact page banner */
.about-banner {
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 260px;
  padding: 32px 0;
  background: var(--navy-deep);
  color: #fff;
}

.about-banner-image,
.about-banner::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.about-banner-image { z-index: -2; object-fit: cover; object-position: 50% 44%; }
.team-banner .about-banner-image { object-position: 50% 25%; }
.faq-banner .about-banner-image { object-position: 50% 56%; }
.services-banner .about-banner-image { object-position: 50% 53%; }
.about-banner::before { content: ""; z-index: -1; background: rgba(6, 26, 45, .67); }

.about-banner h1 {
  margin-bottom: 12px;
  color: #fff;
  font: 700 clamp(2.25rem, 4.6vw, 3.5rem)/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}

.about-banner p { max-width: 62ch; color: #edf2f7; }
.about-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; color: #e1e9f2; font-size: .875rem; }
.about-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ABOUT 02 | Introduction, studio/site photos and company facts */
.about-introduction { padding: 44px 0 36px; }
.about-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(28px, 5vw, 64px); }
.about-intro-copy { min-width: 0; }
.about-intro-copy .eyebrow { color: var(--brand-orange); font-size: .875rem; letter-spacing: .08em; }
.about-intro-copy h2 { max-width: 18ch; margin-bottom: 20px; color: var(--navy); font-size: clamp(2rem, 3.1vw, 2.6rem); line-height: 1.15; }
.about-intro-copy p { max-width: 65ch; color: var(--muted); }
.about-intro-copy p + p { margin-top: 16px; }

/* The smaller site photo sits inside this frame, away from the introduction. */
.about-intro-media { position: relative; min-width: 0; padding: 0 28px 32px 0; }
.about-studio-image { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: 50% 40%; border-radius: 8px; }
.about-site-image { position: absolute; right: 0; bottom: 0; display: block; width: 45%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 5px solid #fff; border-radius: 8px; background: var(--paper); box-shadow: 0 4px 14px rgba(8, 29, 49, .12); }

/* ABOUT 02A | One continuous facts band, with a restrained accent per figure. */
.about-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 36px;
  padding: 22px 12px;
  border-radius: 8px;
  background: var(--navy-deep);
}
.about-facts > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 clamp(16px, 2.6vw, 36px);
  border-left: 1px solid rgba(226, 235, 245, .28);
}
.about-facts > div:first-child { border-left: 0; }
.about-facts > div::before {
  content: "";
  display: block;
  width: 29px;
  height: 3px;
  margin-bottom: 10px;
  background: var(--brand-orange);
}
.about-facts dt { order: 1; margin-top: 3px; color: #c7d4e1; font-size: .83rem; }
.about-facts dd { color: #fff; font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 750; line-height: 1.18; letter-spacing: -.025em; }
.about-facts .about-facts-reach dd { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.about-facts-reach dd span { white-space: nowrap; }
.about-facts [data-fact-count] {
  display: inline-grid;
  font-variant-numeric: tabular-nums;
}
/* The final number stays available to assistive technology and reserves its width. */
.about-facts [data-fact-count] > span { grid-area: 1 / 1; }
.about-facts .about-fact-final { opacity: 0; }
.about-facts .about-fact-animated { justify-self: end; }
@media print, (prefers-reduced-motion: reduce) {
  .about-facts .about-fact-final { opacity: 1; }
  .about-facts .about-fact-animated { display: none; }
}

/* ABOUT 03 | Mission and Vision */
.about-purpose { padding: 42px 0 48px; background: var(--paper); }
.about-section-heading { margin-bottom: 24px; }
.about-section-heading h2 { color: var(--navy); font-size: clamp(2rem, 3vw, 2.5rem); }
.about-section-heading p { margin-top: 8px; color: var(--muted); }
.about-purpose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.about-purpose-card {
  position: relative;
  min-width: 0;
  min-height: 228px;
  overflow: hidden;
  padding: 28px 32px 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff url("../images/about/mission-linework.svg") right bottom / 190px auto no-repeat;
  box-shadow: 0 8px 22px rgba(8, 29, 49, .045);
}
.about-purpose-card--vision { background-image: url("../images/about/vision-linework.svg"); }
/* The long navy top rule and shorter orange rule echo Cabiny's brand mark. */
.about-purpose-card::before,
.about-purpose-card::after { position: absolute; top: 0; left: 0; height: 4px; content: ""; }
.about-purpose-card::before { width: 100%; background: var(--navy); }
.about-purpose-card::after { width: 32%; background: var(--brand-orange); }
.about-purpose-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-orange);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.about-purpose-card h3 { margin-bottom: 12px; color: var(--navy); font-size: clamp(1.75rem, 2.3vw, 2rem); }
.about-purpose-card p { position: relative; max-width: 47ch; color: var(--muted); line-height: 1.65; }

/* ABOUT 04 | Why Choose Us. The six benefits stay readable HTML.
 * The profile image is displayed through a crop, keeping its original pixels.
 * For a standalone replacement photo, remove about-why-media--profile in HTML.
 */
.about-why { padding: 40px 0 44px; }
.about-why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 32px; }
.about-why-list { display: grid; gap: 10px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.about-why-list li { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); line-height: 1.5; }
.about-why-list svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--brand-orange); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.about-why-list span { min-width: 0; overflow-wrap: break-word; }
.about-why-media { position: relative; overflow: hidden; width: 100%; max-width: 440px; aspect-ratio: 21 / 20; justify-self: end; border-radius: 8px; background: var(--paper); }
.about-why-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Show only the building: x=642, y=114, width=420, height=400 in the
 * original 1072 x 535 profile screenshot. These percentages scale together.
 */
.about-why-media--profile img { position: absolute; width: 255.238095%; max-width: none; height: auto; left: -152.857143%; top: -28.5%; }

/* ABOUT 04A / TEAM 02 | Shared team profiles on About and Team pages. */
.about-team {
  padding: 40px 0 44px;
  background: var(--paper);
}

.about-team .about-section-heading {
  margin-bottom: 26px;
  text-align: center;
}

.about-team-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-orange);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.about-team .about-section-heading p {
  max-width: 56ch;
  margin-inline: auto;
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-team-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 5px 16px rgba(8, 29, 49, .045);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.about-team-image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--blue-soft);
}

.about-team-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transition: transform .35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .about-team-card:hover { border-color: #c6d4e2; box-shadow: 0 9px 22px rgba(8, 29, 49, .085); }
  .about-team-card:hover .about-team-portrait { transform: scale(1.035); }
}

.about-team-profile {
  min-height: 116px;
  padding: 14px 17px 16px;
  overflow-wrap: anywhere;
}

.about-team-profile h3 {
  margin: 5px 0 3px;
  color: var(--navy);
  font-size: 1.32rem;
  line-height: 1.2;
}

.about-team-department {
  color: var(--brand-orange);
  font-size: .7rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.about-team-profession {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.45;
}

/* Retain explicit field labels for screen readers without cluttering the cards. */
.about-team-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1000px) {
  .about-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .about-team { padding: 30px 0; }
  .about-team-grid { grid-template-columns: 1fr; gap: 16px; }
  .about-team-image { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .about-team-card,
  .about-team-portrait { transition: none; }
  .about-team-card:hover .about-team-portrait { transform: none; }
}

/* ABOUT 04B | Frequently Asked Questions */
.about-faq {
  padding: 44px 0;
  background: var(--white);
}

.about-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
}

.about-faq-heading { margin-bottom: 0; }
.about-faq-heading p { max-width: 36ch; }

.about-faq-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.about-faq-list details + details { border-top: 1px solid var(--line); }

.about-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  color: var(--navy);
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.about-faq-list summary::-webkit-details-marker { display: none; }
.about-faq-list summary:hover { background: var(--paper); }
.about-faq-list summary:focus-visible { outline-offset: -4px; }

.about-faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}

.about-faq-icon::before,
.about-faq-icon::after {
  content: "";
  position: absolute;
  inset: 6px 0;
  background: currentColor;
}

.about-faq-icon::after { transform: rotate(90deg); }
.about-faq-list details[open] .about-faq-icon { color: var(--brand-orange); }
.about-faq-list details[open] .about-faq-icon::after { display: none; }

.about-faq-list details > p {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
}

@media (max-width: 760px) {
  .about-faq { padding: 32px 0; }
  .about-faq-layout { grid-template-columns: minmax(0, 1fr); }
  .about-faq-heading.about-section-heading { margin-bottom: 0; }
  .about-faq-list summary,
  .about-faq-list details > p { padding-inline: 16px; }
}

/* TEAM 03 | How We Work */
.team-process {
  padding: 44px 0;
  background: var(--white);
}

.team-process .about-section-heading {
  margin-bottom: 26px;
  text-align: center;
}

.team-process-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-orange);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.team-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.team-process-phase {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-orange);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 5px 16px rgba(8, 29, 49, .045);
}

.team-process-phase-heading {
  padding: 13px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.team-process-phase-heading span {
  color: var(--brand-orange);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.team-process-phase-heading h3 {
  margin-top: 3px;
  color: var(--navy);
  font-size: 1.42rem;
  line-height: 1.2;
}

.team-process-steps {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  flex: 1;
  margin: 0;
  padding: 0 20px 0 50px;
  list-style-type: decimal-leading-zero;
}

.team-process-steps > li { padding: 16px 0 16px 5px; }
.team-process-steps > li + li { border-top: 1px solid var(--line); }

.team-process-steps > li::marker {
  content: counter(list-item, decimal-leading-zero) " ";
  color: var(--brand-orange);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.team-process-steps h4 {
  margin: 0 0 5px;
  color: var(--navy);
  font: 700 1.125rem/1.3 Georgia, "Times New Roman", serif;
}

.team-process-steps p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .team-process { padding: 32px 0; }
  .team-process-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .team-process-steps { grid-template-rows: auto; }
}

/* Applied only after team.js confirms motion support; ordinary content stays visible. */
.team-page .team-process [data-team-process-reveal] {
  transition: opacity 420ms ease-out var(--team-process-delay, 0ms),
              transform 420ms ease-out var(--team-process-delay, 0ms);
}

.team-page .team-process [data-team-process-reveal].is-team-process-pending {
  opacity: 0;
  transform: translateY(12px);
  transition: none;
}

@media (prefers-reduced-motion: reduce), print {
  .team-page .team-process [data-team-process-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* SERVICES 02 | Dedicated service catalogue. The cards use style.css. */
.service-catalogue {
  padding: 44px 0;
  background: var(--paper);
}

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

/* SERVICES 03 | Separate the portfolio examples from the service catalogue. */
.services-page .sample-projects { background: var(--white); }

/* ABOUT 05 | Primary enquiry action and a quieter portfolio link */
.about-consultation { padding: 32px 0; background: var(--navy); }
.about-consultation .closing-inner h2 { font-size: clamp(1.75rem, 2.7vw, 2.2rem); }
.about-consultation-actions { display: flex; flex: 0 0 250px; flex-direction: column; gap: 10px; }
.about-consultation-actions .button { width: 100%; gap: 12px; }
.about-consultation-button { background: var(--brand-orange); color: #fff; }
.about-consultation-button:hover { background: #963b0e; }
.about-projects-button { border: 1px solid rgba(255, 255, 255, .85); background: transparent; color: #fff; }
.about-projects-button:hover { background: rgba(255, 255, 255, .12); }
.about-page .site-footer { padding-top: 44px; }
.about-page .footer-bottom { margin-top: 32px; }
.about-page .footer-contact a { overflow-wrap: anywhere; }

/* About page | Tablet */
@media (max-width: 1100px) {
  .about-why-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .about-facts > div { padding-inline: 20px; }
}

@media (max-width: 860px) {
  .about-intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-intro-copy h2 { max-width: 24ch; }
  .about-intro-media { width: 100%; max-width: 680px; margin-inline: auto; }
  .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px 16px; }
  .about-facts > div { padding-block: 18px; }
  .about-facts > div:nth-child(odd) { border-left: 0; }
  .about-facts > div:nth-child(n+3) { border-top: 1px solid rgba(226, 235, 245, .28); }
  .about-purpose-grid { grid-template-columns: 1fr; gap: 18px; }
  .about-why-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-why-media { justify-self: center; }
}

/* About page | Phones */
@media (max-width: 600px) {
  .about-banner { min-height: 210px; padding: 28px 0; }
  .about-banner h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
  .about-breadcrumb { margin-top: 16px; }
  .about-introduction { padding: 30px 0; }
  .about-intro-copy h2 { font-size: 2rem; }
  .about-intro-media { padding: 0 16px 24px 0; }
  .about-site-image { width: 47%; border-width: 4px; }
  .about-facts { margin-top: 28px; padding-inline: 8px; }
  .about-facts > div { padding: 17px 12px; }
  .about-facts dd { font-size: 2rem; }
  .about-facts .about-facts-reach dd { font-size: 1.4rem; }
  .about-facts dt { font-size: .75rem; }
  .about-purpose,
  .about-why { padding: 30px 0; }
  .about-section-heading { margin-bottom: 20px; }
  .about-section-heading h2 { font-size: 1.9rem; }
  .about-purpose-card { min-height: 0; padding: 23px 22px 28px; background-size: 140px auto; }
  .about-purpose-card h3 { font-size: 1.6rem; }
  .about-why-list li { gap: 10px; padding: 12px 14px; }
  .about-consultation { padding: 28px 0; }
  .about-consultation-actions { width: 100%; flex-basis: auto; }
}

/* About page | One-time reveals managed by js/main.js.
 * JavaScript prepares only off-screen content. Layout and hover effects remain
 * unchanged; reduced-motion and printed pages always show all content. */
.about-page .about-reveal-pending { opacity: 0; }
@media (prefers-reduced-motion: reduce), print {
  .about-page .about-reveal-pending { opacity: 1 !important; }
}
