/* =========================================================
   3BerryTech — HOME v2 (AI / futuristic tech look) + 404
   ========================================================= */
.bt-dark { background: var(--bt-dark); color: #a8b3c7; position: relative; overflow: hidden; }
.bt-dark h1, .bt-dark h2, .bt-dark h3, .bt-dark h4 { color: #fff; }
.bt-dark .bt-lead, .bt-dark p { color: #97a3ba; }
.bt-dark .bt-eyebrow { color: #a5f3fc; background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.25); }
.bt-dark .bt-container { position: relative; z-index: 2; }
.bt-ai-text, .bt-dark .bt-grad-text {
    background: linear-gradient(100deg, #22d3ee 0%, #60a5fa 35%, #a78bfa 70%, #f0abfc 100%);
    background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent; animation: btShine 6s linear infinite;
}
@keyframes btShine { to { background-position: 200% center; } }

/* Decorations */
.bt-gridlines::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image: linear-gradient(rgba(148,163,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.06) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 80%);
}
.bt-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; animation: btOrb 18s ease-in-out infinite alternate; }
.bt-orb-1 { width: 520px; height: 520px; background: #4f46e5; top: -160px; right: -120px; }
.bt-orb-2 { width: 460px; height: 460px; background: #0ea5e9; bottom: -200px; left: -160px; animation-delay: -6s; }
.bt-orb-3 { width: 300px; height: 300px; background: #c026d3; top: 40%; left: 45%; opacity: .22; animation-delay: -12s; }
@keyframes btOrb { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.1); } 100% { transform: translate(-30px,40px) scale(.95); } }
.bt-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* ---------- Hero v2 ---------- */
.bt-hero2 { padding: 110px 0 140px; min-height: calc(100vh - 116px); display: flex; align-items: center; }
.bt-hero2 .bt-container { width: 100%; }
.bt-hero2 h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 24px; font-weight: 800; color: #fff; }
.bt-hero2 .bt-hero-text { color: #a1acc2 !important; }
.bt-status {
    display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; margin-bottom: 26px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: #cbd5e1; font-size: 13.5px; font-weight: 500;
    backdrop-filter: blur(8px);
}
.bt-status b { background: var(--bt-grad); color: #fff; font-size: 11px; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.bt-pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: btPulse 2s infinite; }
@keyframes btPulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.bt-caret { display: inline-block; width: .07em; height: .85em; background: #60a5fa; margin-left: 8px; vertical-align: -0.06em; animation: btBlink 1s steps(1) infinite; }
@keyframes btBlink { 50% { opacity: 0; } }

/* Animated conic glow border */
@property --bt-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.bt-glow {
    position: relative; border-radius: 20px; padding: 1.5px;
    background: conic-gradient(from var(--bt-angle), rgba(34,211,238,0), #22d3ee, #6d5dfc, #f0abfc, rgba(34,211,238,0) 60%);
    animation: btSpin 6s linear infinite;
}
.bt-glow::after { content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 30px; background: inherit; filter: blur(40px); opacity: .35; }
@keyframes btSpin { to { --bt-angle: 360deg; } }
.bt-glow > .bt-mock { transform: none !important; border: 0; box-shadow: none; }
.bt-mock-wrap { position: relative; transform: perspective(1600px) rotateY(-10deg) rotateX(4deg); transition: transform .8s ease; }
.bt-mock-wrap:hover { transform: perspective(1600px) rotateY(0) rotateX(0); }

/* Terminal card */
.bt-term {
    position: absolute; left: -60px; bottom: -52px; z-index: 4; width: 310px; border-radius: 14px;
    background: rgba(10,16,36,.94); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
    backdrop-filter: blur(12px); font-family: Consolas, 'SFMono-Regular', 'Liberation Mono', monospace; font-size: 12.5px; color: #cbd5e1;
    animation: btFloat 7s ease-in-out infinite;
}
.bt-term-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); align-items: center; }
.bt-term-bar span { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.bt-term-bar em { margin-left: 8px; font-style: normal; color: #64748b; font-size: 11px; }
.bt-term pre { margin: 0; padding: 14px 16px; background: none; border: 0; color: inherit; font: inherit; line-height: 1.75; white-space: pre; overflow: hidden; border-radius: 0; }
.bt-term .k { color: #c084fc; } .bt-term .f { color: #60a5fa; } .bt-term .s { color: #34d399; } .bt-term .c { color: #64748b; }
.bt-hero2 .bt-float { background: rgba(15,23,42,.88); color: #fff; border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); }
.bt-hero2 .bt-float small { color: #94a3b8; }
.bt-hero2 .bt-float-2 { right: -30px; top: 40px; }

.bt-scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.25); border-radius: 14px; }
.bt-scroll-hint::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #60a5fa; animation: btScroll 1.8s ease-in-out infinite; }
@keyframes btScroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.bt-marquee {
    position: relative; background: #050a19; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); padding: 22px 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.bt-marquee-track { display: flex; width: max-content; animation: btMarquee 45s linear infinite; }
.bt-marquee:hover .bt-marquee-track { animation-play-state: paused; }
.bt-marquee-track span { display: inline-flex; align-items: center; font-family: var(--bt-font-head); font-weight: 700; font-size: 18px; color: #64748b; white-space: nowrap; transition: color .2s; }
.bt-marquee-track span:hover { color: #fff; }
.bt-marquee-track span::after { content: "\2726"; margin: 0 36px; color: #6d5dfc; font-size: 14px; }
@keyframes btMarquee { to { transform: translateX(-50%); } }

/* ---------- Glass + spotlight cards ---------- */
.bt-glass {
    position: relative; border-radius: 20px; padding: 32px; overflow: hidden; isolation: isolate;
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
    border: 1px solid rgba(255,255,255,.09); transition: transform .35s ease, border-color .35s ease;
}
.bt-glass::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(96,165,250,.16), transparent 45%);
}
.bt-glass::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(34,211,238,.85), rgba(109,93,252,.5) 40%, transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.bt-glass:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.14); }
.bt-glass:hover::before, .bt-glass:hover::after { opacity: 1; }
.bt-glass h3, .bt-glass h4 { color: #fff; font-size: 19px; font-weight: 700; margin: 0 0 10px; }
.bt-glass p { color: #94a3b8 !important; margin: 0; line-height: 1.75; font-size: 15px; }
.bt-glass .bt-ico { background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.25); color: #7dd3fc; box-shadow: 0 0 30px -6px rgba(56,189,248,.5); }
.bt-glass:hover .bt-ico { background: var(--bt-grad); color: #fff; border-color: transparent; }

/* Bento */
.bt-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.bt-b-wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; padding: 40px !important; }
.bt-b-wide h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; font-weight: 800; margin: 0 0 18px; }
.bt-b-wide .bt-rotator > span { background: linear-gradient(100deg,#22d3ee,#a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bt-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.bt-chip { font-size: 12.5px; font-weight: 600; color: #cbd5e1; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.bt-chip i { color: #22d3ee; margin-right: 6px; }

/* Services v2 */
.bt-svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bt-svc { display: flex; align-items: center; gap: 18px; padding: 28px; min-height: 120px; }
.bt-svc .bt-ico { margin: 0; }
.bt-svc h3 { margin: 0; font-size: 17.5px; padding-right: 26px; }
.bt-svc .bt-idx { position: absolute; right: 22px; top: 18px; font-family: Consolas, monospace; font-size: 12px; color: #475569; }
.bt-svc .bt-arrow { position: absolute; right: 24px; bottom: 20px; color: #60a5fa; opacity: 0; transform: translateX(-6px); transition: all .3s ease; }
.bt-svc:hover .bt-arrow { opacity: 1; transform: translateX(0); }

/* Process v2 */
.bt-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.bt-flow::before {
    content: ""; position: absolute; left: 12%; right: 12%; top: 44px; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,.4), rgba(167,139,250,.4), transparent);
}
.bt-flow::after {
    content: ""; position: absolute; top: 42px; left: 12%; width: 120px; height: 6px; border-radius: 6px;
    background: linear-gradient(90deg, transparent, #22d3ee, #a78bfa, transparent); filter: blur(1px);
    animation: btFlow 4s ease-in-out infinite;
}
@keyframes btFlow { 0% { left: 12%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(88% - 120px); opacity: 0; } }
.bt-flow-step { text-align: center; position: relative; z-index: 1; }
.bt-flow-node {
    width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 24px; display: flex; align-items: center; justify-content: center;
    background: #0d1630; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 8px #070d1f, 0 0 40px -6px rgba(96,165,250,.5);
    position: relative; transition: transform .3s ease;
}
.bt-flow-step:hover .bt-flow-node { transform: translateY(-6px) rotate(-3deg); }
.bt-flow-node img { width: 50px; height: 50px; object-fit: cover; border-radius: 12px; }
.bt-flow-node > i { font-size: 30px; color: #7dd3fc; }
.bt-flow-n { position: absolute; top: -10px; right: -10px; font-family: Consolas, monospace; font-size: 11px; font-weight: 700; color: #fff; background: var(--bt-grad); border-radius: 8px; padding: 3px 7px; }
.bt-flow-step h4 { font-size: 19px; margin: 0; color: #fff; }

.bt-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.bt-shot { display: block; border-radius: 18px; overflow: hidden; position: relative; aspect-ratio: 16 / 11; border: 1px solid rgba(255,255,255,.1); background: #0d1630; }
.bt-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.4s ease, filter .4s ease; filter: saturate(.9) brightness(.85); }
.bt-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7,13,31,.85)); }
.bt-shot span { position: absolute; left: 18px; bottom: 16px; z-index: 1; color: #fff; font-family: var(--bt-font-head); font-weight: 700; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.bt-shot:hover img { transform: scale(1.07); filter: none; }

/* Light mesh section */
.bt-mesh {
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(14,165,233,.09), transparent 60%),
        radial-gradient(600px 300px at 100% 100%, rgba(109,93,252,.09), transparent 60%), #f7f9fd;
}

/* CTA v2 */
.bt-cta2 { position: relative; border-radius: 28px; padding: 2px; background: conic-gradient(from var(--bt-angle), #0ea5e9, #6d5dfc, #f0abfc, #22d3ee, #0ea5e9); animation: btSpin 8s linear infinite; }
.bt-cta2 > .bt-cta { border-radius: 26px; }

/* ---------- 404 ---------- */
.bt-404 { position: relative; overflow: hidden; background: radial-gradient(700px 400px at 50% 0%, rgba(109,93,252,.35), transparent 60%), var(--bt-dark); padding: 90px 0 110px; text-align: center; color: #97a3ba; }
.bt-404 .bt-container { position: relative; z-index: 2; }
.bt-404-code {
    font-family: var(--bt-font-head); font-weight: 800; font-size: clamp(120px, 22vw, 240px); line-height: 1; letter-spacing: -0.06em; margin: 24px 0 8px;
    background: linear-gradient(100deg, #22d3ee, #60a5fa, #a78bfa, #f0abfc); background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; animation: btShine 6s linear infinite; filter: drop-shadow(0 20px 60px rgba(109,93,252,.35));
}
.bt-404 h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin: 0 0 12px; }
.bt-404 p { font-size: 17px; margin: 0 0 32px; color: #97a3ba; }
.bt-404-links { margin: 56px auto 0; max-width: 720px; padding: 26px; border-radius: 20px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); }
.bt-404-links h4 { color: #fff; font-size: 16px; margin: 0 0 16px; }
.bt-404-links div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bt-404-links a { color: #cbd5e1; padding: 8px 16px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); font-weight: 600; font-size: 14px; }
.bt-404-links a:hover { color: #fff; background: var(--bt-grad); border-color: transparent; }

/* Dark glass header (home page) */
#siteHeader.bt-header-dark { background: rgba(7,13,31,.97); border-bottom-color: rgba(255,255,255,.06); }
#siteHeader.bt-header-dark.is-scrolled { background: rgba(7,13,31,.9); border-bottom-color: rgba(255,255,255,.08); box-shadow: 0 10px 30px -18px rgba(0,0,0,.8); }
.bt-header-dark .bt-menu > li > a { color: #cbd5e1; }
.bt-header-dark .bt-menu > li > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.bt-header-dark .bt-menu > li.active > a { color: #fff; }
.bt-header-dark .bt-sub { background: #0d1630; border-color: rgba(255,255,255,.1); }
.bt-header-dark .bt-sub a { color: #cbd5e1; }
.bt-header-dark .bt-sub a:hover { background: rgba(255,255,255,.06); color: #fff; }
.bt-header-dark .bt-burger { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.bt-hero2 h1 { font-size: clamp(38px, 5.2vw, 68px); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) { .bt-term { left: -10px; } .bt-hero2 .bt-float-2 { right: -6px; } }
@media (max-width: 991px) {
    .bt-hero2 { min-height: 0; padding: 80px 0 120px; }
    .bt-mock-wrap { transform: none; max-width: 620px; margin: 0 auto; }
    .bt-term { left: 10px; bottom: -44px; }
    .bt-bento { grid-template-columns: repeat(2, 1fr); }
    .bt-svc-grid { grid-template-columns: repeat(2, 1fr); }
    .bt-flow { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
    .bt-flow::before, .bt-flow::after { display: none; }
}
@media (max-width: 767px) {
    .bt-bento, .bt-svc-grid, .bt-shots { grid-template-columns: 1fr; }
    .bt-b-wide { grid-column: auto; grid-row: auto; padding: 28px !important; }
    .bt-term, .bt-scroll-hint { display: none; }
    .bt-orb { opacity: .3; }
    .bt-hero2 { padding: 64px 0 80px; }
}
@media (max-width: 480px) { .bt-flow { grid-template-columns: repeat(2, 1fr); row-gap: 32px; } .bt-flow-node { width: 76px; height: 76px; } .bt-flow-step h4 { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) {
    .bt-orb, .bt-glow, .bt-cta2, .bt-marquee-track, .bt-flow::after, .bt-ai-text, .bt-dark .bt-grad-text, .bt-term, .bt-404-code { animation: none !important; }
}
@media (max-width: 991px) {
    .bt-header-dark .bt-menu { background: #0b1226; border-bottom-color: rgba(255,255,255,.08); }
    .bt-header-dark .bt-sub { background: transparent; }
}

/* =========================================================
   Responsive hardening — every screen size
   ========================================================= */
/* Grid children may shrink below their content width (prevents grid blow-outs) */
.bt-grid > *, .bt-split > *, .bt-hero-grid > *, .bt-contact-grid > *, .bt-bento > *,
.bt-svc-grid > *, .bt-process > *, .bt-flow > *, .bt-shots > *, .bt-work-strip > *,
.bt-values > *, .bt-footer-main > *, .bt-project > * { min-width: 0; }
h1, h2, h3, h4, h5, p, li, a, span { overflow-wrap: break-word; }
img, video, iframe { max-width: 100%; }

/* Rotating words wrap instead of forcing the heading wider than its box */
.bt-rotator { max-width: 100%; }
.bt-rotator > span { white-space: normal !important; }

/* Portfolio card columns */
.bt-project { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.bt-meta span { white-space: normal; line-height: 1.4; }

/* FAQ collapsed preview line ends with an ellipsis instead of a hard cut */
.bt-faq section.toggle > p:not(.preview-active) { text-overflow: ellipsis; white-space: nowrap; color: var(--bt-muted); }

/* Large desktops */
@media (min-width: 1600px) {
    .bt-container { max-width: 1320px; }
}

/* Small laptops: keep the 5-item menu + CTA on one line */
@media (min-width: 992px) and (max-width: 1199px) {
    .bt-nav { gap: 14px; }
    .bt-logo img { height: 38px; }
    .bt-menu > li > a { padding: 10px 10px; font-size: 14.5px; }
    .bt-nav-cta .bt-btn-sm { padding: 10px 14px; font-size: 13.5px; }
    .bt-hero-grid { gap: 40px; }
}
@media (max-width: 1279px) {
    .bt-hero2 .bt-float-2 { right: 0; top: 24px; }
    .bt-float-1 { left: 0; }
}

/* Tablets */
@media (max-width: 991px) {
    .bt-project { grid-template-columns: minmax(0, 1fr); }
    .bt-cta h2 { font-size: clamp(22px, 4vw, 30px); }
    .bt-footer-cta { padding: 48px 0 36px; }
}

/* Phones */
@media (max-width: 767px) {
    .bt-container { padding: 0 16px; }
    .bt-title { font-size: clamp(26px, 7vw, 34px); }
    .bt-lead, .bt-prose p { font-size: 15.5px; }
    .bt-svc { padding: 22px 20px; gap: 14px; min-height: 0; }
    .bt-svc .bt-ico { width: 48px; height: 48px; font-size: 19px; border-radius: 14px; }
    .bt-svc h3 { font-size: 16px; padding-right: 18px; }
    .bt-glass { padding: 24px 22px; }
    .bt-hero-tags, .bt-chip-row { gap: 6px; }
    .bt-cta { padding: 34px 24px; }
    .bt-cta .bt-btn, .bt-footer-cta .bt-btn { width: 100%; }
    .bt-footer-cta { flex-direction: column; align-items: flex-start; }
    .bt-footer-bottom { flex-direction: column; align-items: flex-start; }
    .bt-footer-bottom ul { flex-wrap: wrap; gap: 14px 22px; }
    .bt-filter.nav-pills > li > a { padding: 8px 16px; font-size: 13px; }
    .bt-project-body h3 { font-size: 22px; }
    .bt-accordion .panel-body { padding: 14px 18px 18px; }
    .bt-accordion .panel-title > a { padding: 16px !important; font-size: 15px; }
    .bt-faq section.toggle label { font-size: 15px; padding: 16px 50px 16px 18px !important; }
    .bt-faq section.toggle > p { padding: 0 18px 18px !important; }
    .bt-map-wrap .google-map { height: 300px; }
    .bt-404-links a { padding: 7px 12px; font-size: 13px; }
    .bt-page-hero h1 { font-size: clamp(28px, 8vw, 40px); }
    .bt-crumbs { font-size: 13px; }
    .bt-quote::before { left: 20px; }
    .bt-form-card .row { margin-left: -8px; margin-right: -8px; }
    .bt-form-card [class*="col-"] { padding-left: 8px; padding-right: 8px; }
}

/* Very small phones (320–374px) */
@media (max-width: 374px) {
    .bt-container { padding: 0 14px; }
    .bt-logo img { height: 32px; }
    .bt-burger { width: 40px; height: 40px; }
    .bt-topbar { font-size: 12px; }
    .bt-topbar-right, .bt-topbar-left { gap: 12px; }
    .bt-hero2 h1, .bt-hero h1 { font-size: 34px; }
    .bt-status { font-size: 12px; }
    .bt-btn { padding: 13px 20px; font-size: 14px; }
    .bt-card, .bt-glass { padding: 22px 18px; }
    .bt-svc { padding: 20px 16px; }
    .bt-project-body { padding: 22px 18px; }
    .bt-project-media { padding: 12px; }
    .bt-form-card, .bt-info-card { padding: 22px 16px; }
    .bt-info-list li i { width: 34px; height: 34px; font-size: 14px; }
    .bt-404-code { font-size: 110px; }
}

/* Landscape phones / short screens: hero should not force full height */
@media (max-height: 560px) and (orientation: landscape) {
    .bt-hero2 { min-height: 0; padding: 60px 0 70px; }
    .bt-scroll-hint { display: none; }
}

/* Footer: 2x2 on small laptops so the newsletter field has room */
@media (min-width: 768px) and (max-width: 1199px) {
    .bt-footer-main { grid-template-columns: 1fr 1fr; gap: 36px 48px; }
}
/* Portfolio text stays left-aligned on every size (theme centres it on phones) */
.bt-portfolio, .bt-project-body { text-align: left; }

/* Contact map (keyless Google Maps embed) */
.bt-map-embed { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 767px) { .bt-map-embed { height: 300px; } }

/* =========================================================
   Portfolio — web-app covers, technology chips, brief viewer
   ========================================================= */
.bt-cover {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center;
    background:
        radial-gradient(circle at 20% 15%, rgba(255,255,255,.22), transparent 40%),
        linear-gradient(135deg, var(--c1, #0ea5e9), var(--c2, #6d5dfc));
    color: #fff; overflow: hidden;
}
.bt-cover::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 28px 28px;
}
.bt-cover > * { position: relative; }
.bt-cover-ico { width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5); backdrop-filter: blur(6px); }
.bt-cover-label { font-family: var(--bt-font-head); font-weight: 800; font-size: clamp(18px, 2.2vw, 26px); letter-spacing: -0.02em; line-height: 1.2; }
.bt-cover-tech { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bt-cover-tech em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
.bt-tech li { background: #eef6ff; border-color: #d6e8fb; }
.bt-tech li i { color: var(--bt-accent); }
.bt-project-body button.bt-btn { border: 0; }

/* Viewer shell */
.bt-doc[hidden] { display: none !important; }
.bt-doc {
    position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column;
    background: rgba(15, 18, 28, .96); backdrop-filter: blur(6px);
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    animation: btDocIn .25s ease;
}
@keyframes btDocIn { from { opacity: 0; } to { opacity: 1; } }
.bt-doc-bar {
    flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 18px; background: #2a2d36; color: #e5e7eb; border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.bt-doc-file { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 14px; }
.bt-doc-file i { color: #f87171; font-size: 18px; flex-shrink: 0; }
.bt-doc-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-doc-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bt-doc-count, .bt-doc-zoom { font-size: 13px; color: #cbd5e1; padding: 0 8px; white-space: nowrap; }
.bt-doc-zoom { min-width: 52px; text-align: center; }
.bt-doc-btn {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06);
    color: #e5e7eb; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s;
}
.bt-doc-btn:hover { background: rgba(255,255,255,.14); }
.bt-doc-close { margin-left: 6px; background: rgba(248,113,113,.15); border-color: rgba(248,113,113,.35); color: #fecaca; }
.bt-doc-close:hover { background: #ef4444; color: #fff; }
.bt-doc-body { flex: 1; overflow: auto; padding: 28px 16px 40px; -webkit-overflow-scrolling: touch; }
.bt-doc-pages { width: max-content; margin: 0 auto; zoom: var(--z, 1); }
.bt-doc-note { flex-shrink: 0; text-align: center; font-size: 12px; color: #94a3b8; padding: 8px; background: #1f2128; border-top: 1px solid rgba(255,255,255,.06); }
.bt-doc-note i { color: #fbbf24; margin-right: 4px; }
body.bt-doc-open { overflow: hidden; }

/* A4 page */
.bt-page {
    position: relative; width: 794px; min-height: 1123px; margin: 0 auto 24px; padding: 56px 64px 90px;
    background: #fff; color: #334155; box-shadow: 0 10px 40px rgba(0,0,0,.45); overflow: hidden;
    font-family: var(--bt-font); font-size: 14.5px; line-height: 1.7;
}
.bt-page::after {
    content: "3BerryTech Solutions \00B7 View Only"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-32deg);
    font-family: var(--bt-font-head); font-weight: 800; font-size: 58px; color: rgba(15, 23, 42, .045); white-space: nowrap; pointer-events: none;
}
.bt-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 30px; border-bottom: 2px solid #e2e8f0; }
.bt-page-head img { height: 34px; width: auto; }
.bt-page-head span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #64748b; text-align: right; }
.bt-page-kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #0b9be8; background: #e0f2fe; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.bt-page h1 { font-family: var(--bt-font-head); font-size: 30px; line-height: 1.2; font-weight: 800; color: #0f172a; margin: 0 0 8px; letter-spacing: -0.02em; }
.bt-page-sub { font-size: 15.5px; color: #64748b; margin: 0 0 26px; }
.bt-page h2 { font-family: var(--bt-font-head); font-size: 17px; font-weight: 800; color: #0f172a; margin: 26px 0 12px; padding-left: 12px; border-left: 4px solid #0b9be8; line-height: 1.3; }
.bt-page p { margin: 0 0 10px; color: #334155; }
.bt-page-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0 0 6px; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.bt-page-facts div { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.bt-page-facts div:nth-child(odd) { border-right: 1px solid #e2e8f0; }
.bt-page-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.bt-page-facts dt { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; margin-bottom: 2px; }
.bt-page-facts dd { margin: 0; font-weight: 600; color: #0f172a; font-size: 14px; }
.bt-page-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.bt-page-list li { position: relative; padding-left: 22px; }
.bt-page-list li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: linear-gradient(135deg, #0b9be8, #6d5dfc); }
.bt-page-table { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid #e2e8f0; }
.bt-page-table th, .bt-page-table td { padding: 10px 14px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.bt-page-table th { width: 32%; background: #f1f5f9; color: #0f172a; font-weight: 700; }
.bt-page-cta { margin-top: 30px; padding: 18px 20px; border-radius: 12px; background: linear-gradient(135deg, #eff6ff, #f5f3ff); border: 1px solid #dbeafe; display: grid; gap: 4px; }
.bt-page-cta strong { color: #0f172a; font-family: var(--bt-font-head); }
.bt-page-cta span { color: #475569; font-size: 13.5px; }
.bt-page-foot { position: absolute; left: 64px; right: 64px; bottom: 32px; display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #e2e8f0; font-size: 11px; color: #94a3b8; }

@media (max-width: 767px) {
    .bt-doc-bar { padding: 8px 10px; }
    .bt-doc-file { font-size: 13px; }
    .bt-doc-count { display: none; }
    .bt-doc-zoom { min-width: 44px; padding: 0 4px; }
    .bt-doc-body { padding: 14px 8px 24px; }
    .bt-doc-btn { width: 32px; height: 32px; }
}

/* Printing is blocked while a brief is open */
@media print {
    body.bt-doc-open * { display: none !important; }
    body.bt-doc-open::after { content: "Printing is disabled for this document."; display: block; padding: 40px; font: 16px sans-serif; }
}

/* Home "Our Work" card with a designed cover (project without screenshot) */
.bt-shot .bt-shot-cover { position: absolute; inset: 0; padding: 18px 18px 56px; gap: 10px; transition: transform 1.4s ease; }
.bt-shot:hover .bt-shot-cover { transform: scale(1.05); }
.bt-shot .bt-shot-cover .bt-cover-ico { width: 56px; height: 56px; font-size: 24px; border-radius: 16px; }
.bt-shot .bt-shot-cover .bt-cover-label { font-size: 19px; }
.bt-shot .bt-shot-cover .bt-cover-tech em { font-size: 11px; }
.bt-shot > span:not(.bt-cover) { right: 18px; line-height: 1.35; }
.bt-shot .bt-shot-cover span { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; }
.bt-shot .bt-shot-cover .bt-cover-ico { display: flex; }
.bt-shot .bt-shot-cover .bt-cover-tech { display: flex; }
/* Cover adapts to the card's own width so the long title never overlaps it */
.bt-shot { container-type: inline-size; }
@container (max-width: 420px) {
    .bt-shot .bt-shot-cover { padding-bottom: 80px; }
    .bt-shot .bt-shot-cover .bt-cover-tech { display: none; }
    .bt-shot .bt-shot-cover .bt-cover-ico { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
    .bt-shot .bt-shot-cover .bt-cover-label { font-size: 16px; }
}
@container (max-width: 260px) {
    .bt-shot .bt-shot-cover .bt-cover-label { display: none; }
    .bt-shot > span:not(.bt-cover) { font-size: 13px; }
}

/* Contact form: spam honeypot (hidden from people), field errors, button state */
.bt-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.bt-form-card .form-control.bt-invalid { border-color: #ef4444; background: #fff7f7; box-shadow: 0 0 0 4px rgba(239,68,68,.1) !important; }
.bt-field-error { display: block; margin-top: 6px; color: #dc2626; font-size: 13px; font-weight: 500; }
#contactSubmit { display: inline-flex; align-items: center; gap: 10px; }
#contactSubmit[disabled] { opacity: .75; cursor: progress; }
.bt-form-card .alert { margin-bottom: 20px; }

/* =========================================================
   Services page
   ========================================================= */
.bt-sv-hero { padding-bottom: 96px; }
.bt-sv-intro { color: #a8b3c7; font-size: 18px; line-height: 1.7; max-width: 640px; margin: 14px 0 30px; }

/* Service cards */
.bt-sv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.bt-sv-card {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    background: #fff; border: 1px solid var(--bt-line); border-radius: 20px; padding: 28px 26px 24px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.bt-sv-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0;
    background: linear-gradient(135deg, #0b9be8, #6d5dfc 60%, #22d3ee);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    transition: opacity .3s ease;
}
.bt-sv-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(15,23,42,.3); border-color: transparent; }
.bt-sv-card:hover::before { opacity: 1; }
.bt-sv-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.bt-sv-ico {
    width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 23px;
    background: var(--bt-grad-soft); color: var(--bt-primary); border: 1px solid rgba(11,155,232,.15); transition: all .3s ease;
}
.bt-sv-card:hover .bt-sv-ico { background: var(--bt-grad); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -10px rgba(11,155,232,.6); transform: rotate(-6deg); }
.bt-sv-num { font-family: var(--bt-font-head); font-weight: 800; font-size: 34px; line-height: 1; color: transparent; -webkit-text-stroke: 1px #d5deeb; }
.bt-sv-card h3 { font-size: 18px; font-weight: 800; margin: 0 0 10px; line-height: 1.3; }
.bt-sv-card p { font-size: 14.5px; line-height: 1.7; color: var(--bt-text); margin: 0 0 18px; }
.bt-sv-tags { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.bt-sv-tags li { font-size: 12px; font-weight: 600; color: #334155; background: var(--bt-bg-soft); border: 1px solid var(--bt-line); padding: 4px 10px; border-radius: 999px; }
.bt-sv-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--bt-font-head); font-weight: 700; font-size: 14px; color: var(--bt-primary); }
.bt-sv-link i { transition: transform .2s ease; }
.bt-sv-card:hover .bt-sv-link i { transform: translateX(4px); }

/* Industries */
.bt-sv-industries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bt-sv-ind {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px; min-width: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1);
    color: #e2e8f0; font-family: var(--bt-font-head); font-weight: 700; font-size: 15.5px; transition: all .3s ease;
}
.bt-sv-ind i {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
    background: rgba(96,165,250,.12); border: 1px solid rgba(96,165,250,.25); color: #7dd3fc;
}
.bt-sv-ind:hover { transform: translateY(-4px); border-color: rgba(125,211,252,.45); background: rgba(255,255,255,.08); }
.bt-sv-ind:hover i { background: var(--bt-grad); color: #fff; border-color: transparent; }

/* Tech stack */
.bt-sv-stack { max-width: 980px; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.bt-sv-stack-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bt-sv-stack-row:last-child { border-bottom: 0; }
.bt-sv-stack-row h4 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc; }
.bt-sv-stack-row ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bt-sv-stack-row li { font-size: 13.5px; font-weight: 600; color: #e2e8f0; padding: 6px 14px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); transition: all .2s ease; }
.bt-sv-stack-row li:hover { background: var(--bt-grad); border-color: transparent; color: #fff; }

/* Process steps */
.bt-sv-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; counter-reset: none; position: relative; }
.bt-sv-steps::before { content: ""; position: absolute; top: 52px; left: 10%; right: 10%; height: 2px; background: repeating-linear-gradient(90deg, #c7d2fe 0 8px, transparent 8px 16px); }
.bt-sv-step { position: relative; text-align: center; padding: 0 8px; min-width: 0; }
.bt-sv-step-ico {
    position: relative; z-index: 1; width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--bt-line); box-shadow: var(--bt-shadow); font-size: 34px; color: var(--bt-primary); transition: all .3s ease;
}
.bt-sv-step:hover .bt-sv-step-ico { background: var(--bt-grad); color: #fff; transform: translateY(-6px); }
.bt-sv-step-n { position: absolute; z-index: 2; top: -6px; left: calc(50% + 26px); background: var(--bt-grad); color: #fff; font-family: var(--bt-font-head); font-weight: 800; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 3px solid #fff; }
.bt-sv-step h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.bt-sv-step p { font-size: 14.5px; color: var(--bt-text); line-height: 1.7; margin: 0; }

/* Benefits */
.bt-sv-benefits { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.bt-sv-benefit-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bt-sv-benefit-list li {
    display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--bt-line);
    color: var(--bt-ink); font-weight: 600; font-size: 14.5px; line-height: 1.55; transition: all .25s ease; min-width: 0;
}
.bt-sv-benefit-list li i {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bt-grad); color: #fff; font-size: 15px; box-shadow: 0 10px 20px -10px rgba(11,155,232,.6);
}
.bt-sv-benefit-list li:hover { transform: translateY(-3px); box-shadow: var(--bt-shadow); border-color: rgba(11,155,232,.35); }

/* Services page — responsive */
@media (max-width: 1199px) {
    .bt-sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .bt-sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bt-sv-industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bt-sv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
    .bt-sv-steps::before { display: none; }
    .bt-sv-benefits { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 767px) {
    .bt-sv-hero { padding-bottom: 64px; }
    .bt-sv-intro { font-size: 16px; }
    .bt-sv-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .bt-sv-card { padding: 24px 20px 20px; }
    .bt-sv-stack-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 18px; }
    .bt-sv-benefit-list { grid-template-columns: minmax(0, 1fr); }
    .bt-sv-step-ico { width: 88px; height: 88px; font-size: 28px; }
    .bt-sv-step-n { left: calc(50% + 20px); }
}
@media (max-width: 480px) {
    .bt-sv-industries { grid-template-columns: minmax(0, 1fr); }
    .bt-sv-steps { grid-template-columns: minmax(0, 1fr); }
}

/* Footer newsletter states */
.bt-footer .bt-newsletter .form-control.bt-invalid { box-shadow: inset 0 0 0 1px #f87171 !important; }
.bt-footer .bt-newsletter .alert { font-size: 13px; padding: 10px 12px; margin-bottom: 12px; border: 0; }
.bt-footer .bt-newsletter .alert-success { background: rgba(34,197,94,.15); color: #bbf7d0; }
.bt-footer .bt-newsletter .alert-danger { background: rgba(239,68,68,.15); color: #fecaca; }
.bt-footer .bt-newsletter .btn[disabled] { opacity: .75; }

/* Portfolio designed covers adapt to the frame width (very small phones) */
.bt-project-media .bt-frame { container-type: inline-size; }
@container (max-width: 340px) {
    .bt-frame-shot.bt-cover { gap: 8px; padding: 14px; }
    .bt-frame-shot.bt-cover .bt-cover-ico { width: 46px; height: 46px; font-size: 21px; border-radius: 13px; }
    .bt-frame-shot.bt-cover .bt-cover-label { font-size: 16px; }
    .bt-frame-shot.bt-cover .bt-cover-tech em { font-size: 10px; padding: 3px 8px; }
}
@container (max-width: 270px) {
    .bt-frame-shot.bt-cover .bt-cover-tech { display: none; }
}
