/* =========================================================================
   DigiDors — Home page (index.html)
   Loads after styles.css and portfolio.css, reusing the portfolio's dark
   theme (px-* components) and restyling the home sections to match.
   ========================================================================= */

.hx-h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; color: #fff; }
.hx-h2 .serif { font-size: 1.1em; }
.px-home .px-section { padding: clamp(72px, 9vw, 130px) 0; }
.px-home .px-head { margin-bottom: clamp(40px, 5vw, 72px); }
.px-home .px-head h2 { font-size: clamp(28px, 3.2vw, 44px); }
.px-home .btn--outline { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.px-home .btn--outline:hover { background: #fff; border-color: #fff; color: var(--navy-950); }

/* Hero ------------------------------------------------------------------ */
.hx-hero-services {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 24px; margin-top: 4px;
  border-top: 1px solid var(--px-border); font-size: 14px; font-weight: 500; color: #C9D6EC;
  animation: px-rise 1s 0.6s var(--ease) both;
}
.hx-hero-services li { display: flex; align-items: center; gap: 10px; }
.hx-hero-services li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.px-home .px-shot--1 { width: 72%; top: 14%; }
.px-home .px-shot--1 img { aspect-ratio: 6 / 5; }
.px-home .px-shot--2 { width: 46%; }
.px-home .px-shot--2 img, .px-home .px-shot--3 img { aspect-ratio: 16 / 10; }
.px-home .px-shot--3 { width: 50%; bottom: 4%; }
.px-home .px-chip { max-width: 290px; }

/* Trust bar */
.hx-trust {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--px-border); border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(255, 255, 255, 0.03); animation: px-rise 1s 0.7s var(--ease) both;
}
.hx-trust > div { display: flex; align-items: center; gap: 14px; padding: 22px 24px; }
.hx-trust > div + div { border-left: 1px solid var(--px-border); }
.hx-trust svg {
  width: 44px; height: 44px; flex: none; padding: 11px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}
.hx-trust strong { display: block; font-family: var(--font-display); color: #fff; font-size: 15px; line-height: 1.3; }
.hx-trust span { display: block; font-size: 13.5px; line-height: 1.4; margin-top: 2px; }

/* Why DigiDors ---------------------------------------------------------- */
.hx-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hx-intro-copy { display: flex; flex-direction: column; gap: 20px; }
.hx-intro-copy .lead { color: #DCE8FA; font-size: clamp(17px, 1.3vw, 19px); }
.hx-intro-copy strong { color: #fff; }
.hx-chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.hx-chips span {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
  background: var(--px-glass); border: 1px solid var(--px-border);
}
.hx-intro-media { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: end; }
.hx-intro-media::before {
  content: ""; position: absolute; inset: 12% 8%; z-index: -1; border-radius: 40px; filter: blur(70px); opacity: 0.45;
  background: linear-gradient(135deg, var(--brand), var(--accent) 50%, var(--px-violet));
}
.hx-intro-media img { width: 100%; object-fit: cover; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.8); }
.hx-intro-media > img { aspect-ratio: 4 / 5; }
.hx-intro-media .col { display: flex; flex-direction: column; gap: 16px; }
.hx-intro-media .col img { aspect-ratio: 1; }
.hx-quote-card {
  border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(145deg, var(--brand), #3B2FB8);
  box-shadow: 0 30px 60px -24px rgba(10, 75, 214, 0.7);
}
.hx-quote-card p { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 26px; line-height: 1.2; color: #fff; }
.hx-quote-card span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); font-weight: 700; }

/* Services (tabs) ------------------------------------------------------- */
.px-home .services-grid { display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.1fr; gap: 40px; align-items: start; }
.px-home .service-tabs { border-top: 1px solid var(--px-border); }
.px-home .service-tab { border-bottom: 1px solid var(--px-border); border-radius: 0; padding: 22px 18px; }
.px-home .service-tab:hover { background: rgba(255, 255, 255, 0.04); }
.px-home .service-tab .num { color: #7F92B2; }
.px-home .service-tab .title { color: #fff; }
.px-home .service-tab .sub { color: var(--on-dark-muted); }
.px-home .service-tab svg { color: #7F92B2; }
.px-home .service-tab[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(10, 75, 214, 0.35), rgba(30, 155, 255, 0.04));
  box-shadow: inset 3px 0 0 var(--accent);
}
.px-home .service-tab[aria-selected="true"] .num,
.px-home .service-tab[aria-selected="true"] svg { color: var(--accent-light); }
.px-home .service-panel {
  background: #0B1A3A; border: 1px solid var(--px-border); border-radius: 24px;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.85);
}
.px-home .service-panel h3 { color: #fff; font-size: clamp(21px, 1.9vw, 26px); letter-spacing: -0.03em; }
.px-home .service-panel p { color: var(--on-dark-muted); }
.px-home .service-panel li { color: #C9D6EC; }
.px-home .service-panel li::before {
  background: rgba(30, 155, 255, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237CC8FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.px-home .link-arrow { color: var(--accent-light); }
.px-home .link-arrow:hover { color: #fff; }

/* Approach -------------------------------------------------------------- */
.hx-approach-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.hx-approach-head > div:first-child { display: flex; flex-direction: column; gap: 20px; }
.hx-approach-head .copy { display: flex; flex-direction: column; gap: 14px; }
.hx-approach-head .lead { color: #DCE8FA; font-size: clamp(17px, 1.3vw, 19px); }
.px-home .pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; background: none; border: 0; border-radius: 0; overflow: visible; }
.px-home .pillar {
  position: relative; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--px-border); border-radius: 22px;
  padding: 30px 24px; gap: 14px; transition: transform 400ms var(--ease), border-color 300ms, background 300ms;
}
.px-home .pillar:hover { transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.45); background: rgba(30, 155, 255, 0.07); }
.px-home .pillar svg {
  width: 52px; height: 52px; padding: 13px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 30px -12px rgba(30, 155, 255, 0.8);
}
.px-home .pillar h3 { font-size: 18px; letter-spacing: -0.02em; }
.px-home .pillar p { font-size: 15px; }

/* Work ------------------------------------------------------------------ */
.px-home .work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.px-home .work-card { border-radius: 24px; border: 1px solid var(--px-border); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); transition: transform 500ms var(--ease), border-color 400ms; }
.px-home .work-card:hover { transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.45); }
.px-home .work-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 400ms;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 200, 255, 0.22), transparent 45%);
}
.px-home .work-card:hover::before { opacity: 1; }
.px-home .work-card::after { background: linear-gradient(180deg, rgba(3, 11, 28, 0) 30%, rgba(3, 11, 28, 0.6) 60%, rgba(3, 11, 28, 0.97) 100%); }
.px-home .work-card h3 { font-size: clamp(19px, 1.7vw, 23px); letter-spacing: -0.03em; }
.px-home .work-card .body { z-index: 2; }

/* Process --------------------------------------------------------------- */
.px-home .steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.px-home .step {
  padding: 28px 22px; gap: 14px; border: 1px solid var(--px-border); border-radius: 22px;
  background: rgba(255, 255, 255, 0.03); transition: transform 400ms var(--ease), border-color 300ms;
}
.px-home .step:hover { transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.45); }
.px-home .step::before {
  top: 54px; left: 74px; right: -21px; width: auto; height: 1px;
  background: linear-gradient(90deg, rgba(124, 200, 255, 0.6), rgba(124, 200, 255, 0));
}
.px-home .step:last-child::before { display: none; }
.px-home .step .num {
  width: 52px; height: 52px; border-radius: 50%; border: 0; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 0 0 6px rgba(30, 155, 255, 0.12), 0 14px 30px -10px rgba(30, 155, 255, 0.8);
}
.px-home .step h3 { font-size: 19px; letter-spacing: -0.02em; }
.px-home .step p { font-size: 15px; }

/* Testimonials ---------------------------------------------------------- */
.px-home .testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.px-home .testimonial {
  position: relative; border-radius: 24px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--px-border); overflow: hidden;
}
.px-home .testimonial::after {
  content: "“"; position: absolute; right: 24px; top: 14px; font-family: "Instrument Serif", Georgia, serif; font-size: 120px; line-height: 0.8;
  background: linear-gradient(135deg, var(--accent-light), var(--px-violet)); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.35;
}
.px-home .testimonial .avatar { color: #fff; }
.px-home .testimonial h3 { font-size: 19px; letter-spacing: -0.02em; }
.px-home .testimonial blockquote { font-size: 15.5px; }

/* FAQ ------------------------------------------------------------------- */
.px-home .faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.px-home .faq-intro { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 32px); }
.px-home .faq-intro a { color: var(--accent-light); }
.px-home .faq-intro strong { color: var(--accent-light); }
.px-home .faq-list { background: #0B1A3A; border: 1px solid var(--px-border); border-radius: 24px; box-shadow: none; }
.px-home .faq-item + .faq-item { border-top: 1px solid var(--px-border); }
.px-home .faq-item summary { color: #fff; font-size: 16.5px; }
.px-home .faq-item summary:hover { color: var(--accent-light); }
.px-home .faq-item summary::after {
  background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237CC8FF' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.px-home .faq-item[open] summary::after { background-color: rgba(30, 155, 255, 0.25); }
.px-home .faq-item p { color: var(--on-dark-muted); font-size: 15.5px; }

/* Contact --------------------------------------------------------------- */
.hx-contact { position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--px-border); }
.px-home .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.px-home .contact-copy { display: flex; flex-direction: column; gap: 20px; }
.px-home .contact-copy h2 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; }
.px-home .contact-copy h2 .serif { font-size: 1.1em; }
.px-home .contact-details { border-top-color: var(--px-border); }
.px-home .form-card { background: rgba(11, 26, 58, 0.7); border-color: rgba(255, 255, 255, 0.12); border-radius: 26px; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9); }
.px-home .form-success h3 { color: #fff; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .px-home .pillars { grid-template-columns: repeat(3, 1fr); }
  .px-home .steps { grid-template-columns: repeat(3, 1fr); }
  .px-home .step::before { display: none; }
  .px-home .testimonials { grid-template-columns: 1fr 1fr; }
  .hx-trust { grid-template-columns: 1fr 1fr; }
  .hx-trust > div:nth-child(3) { border-left: 0; }
  .hx-trust > div:nth-child(n+3) { border-top: 1px solid var(--px-border); }
}
@media (max-width: 900px) {
  .hx-intro, .hx-approach-head, .px-home .services-grid, .px-home .faq-grid, .px-home .contact-grid, .px-home .work-grid { grid-template-columns: 1fr; }
  .px-home .faq-intro { position: static; }
}
@media (max-width: 640px) {
  .hx-trust, .px-home .pillars, .px-home .steps, .px-home .testimonials { grid-template-columns: 1fr; }
  .hx-trust > div { border-left: 0 !important; }
  .hx-trust > div + div { border-top: 1px solid var(--px-border); }
  .px-home .px-chip--1 { max-width: 240px; }
}
.hx-center { display: flex; justify-content: center; margin-top: clamp(36px, 4vw, 56px); }
@media (max-width: 640px) {
  .px-home .px-stage-inner { --ry: -6deg; --rx: 4deg; }
  .px-home .px-chip--1 { left: 3%; bottom: 16%; }
}

/* Selected Work: image-only cards. The text stays in the HTML (visually hidden)
   so each link still has a readable name for screen readers and search engines. */
.px-home .work-card::after { display: none; }
.px-home .work-card .body > div { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px-home .work-card .go {
  position: absolute; top: 20px; right: 20px; opacity: 0; transform: scale(0.8);
  transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}
.px-home .work-card .body { inset: 0; padding: 0; }
.px-home .work-card:hover .go, .px-home .work-card:focus-visible .go { opacity: 1; transform: rotate(45deg); }
@media (hover: none) { .px-home .work-card .go { opacity: 1; transform: none; } }
/* Selected Work uses website screenshots — show more of each page, anchored to the top */
.px-home .work-card img { aspect-ratio: 4 / 3; object-position: top center; }
@media (max-width: 640px) { .px-home .work-card img { aspect-ratio: 16 / 15; } }

/* Selected Work — two infinite-scrolling rows (websites, social media) ---- */
.px-home #work { overflow: hidden; }
.wk-rows { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 36px); width: 100vw; margin-left: calc(50% - 50vw); }
.wk-row { display: flex; flex-direction: column; gap: 12px; }
.wk-label {
  align-self: flex-start; margin-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: var(--px-glass); border: 1px solid var(--px-border);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-light);
}
.wk-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.wk-marquee {
  overflow: hidden; padding: 12px 0 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.wk-track { display: flex; width: max-content; animation: wk-scroll var(--wk-dur, 50s) linear infinite; }
.wk-marquee--reverse .wk-track { animation-direction: reverse; }
/* pause the row while the pointer (or keyboard focus) is on it */
.wk-marquee:hover .wk-track, .wk-marquee:focus-within .wk-track { animation-play-state: paused; }
@keyframes wk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.wk-item {
  position: relative; flex: none; margin-right: 20px; display: block; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--px-border); background: #0B1A3A;
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.9);
  transition: transform 500ms var(--ease), border-color 300ms, box-shadow 400ms, opacity 400ms;
}
.wk-item--web { width: clamp(280px, 30vw, 440px); aspect-ratio: 16 / 12; }
.wk-item--social { width: clamp(190px, 17vw, 260px); aspect-ratio: 4 / 5; }
.wk-item img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 900ms var(--ease); }
.wk-marquee:hover .wk-item:not(:hover) { opacity: 0.55; }
.wk-item:hover, .wk-item:focus-visible {
  transform: translateY(-6px); border-color: rgba(124, 200, 255, 0.6);
  box-shadow: 0 30px 60px -30px rgba(30, 155, 255, 0.55);
}
.wk-item:hover img { transform: scale(1.05); }
.wk-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wk-go {
  position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--navy-950);
  opacity: 0; transform: scale(0.7); transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}
.wk-go svg { width: 18px; height: 18px; }
.wk-item:hover .wk-go, .wk-item:focus-visible .wk-go { opacity: 1; transform: rotate(45deg); }

/* Reduced motion: no auto-scroll — rows become swipeable instead */
@media (prefers-reduced-motion: reduce) {
  .wk-track { animation: none; }
  .wk-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; padding-inline: var(--gutter); }
  .wk-item[aria-hidden="true"] { display: none; }
}
@media (hover: none) { .wk-go { opacity: 1; transform: none; width: 36px; height: 36px; } }
