@import url('https://fonts.googleapis.com/css2?family=Belanosima:wght@400;600;700&family=Google+Sans+Code:ital,wght,MONO@0,300..800,1;1,300..800,1&family=Google+Sans+Flex:opsz,wght@6..144,1..1000&family=Noto+Sans+Bengali:wght@100..900&display=swap');

/* ==========================================================================
   Unijoy for Android — custom theme
   Modern dark UI layered on top of Bootstrap 5.3.3.
   Structure is preserved; this file refines typography, color, spacing,
   components (nav, hero, cards, buttons) and interaction states.
   ========================================================================== */

/* ------------------------------------------------------------------ Tokens */
:root {
	/* Surfaces — built on Bootstrap's standard gray scale (bg = gray-900) */
	--bg:            #212529;
	--surface:       #2b3035;
	--surface-2:     #343a40;
	--surface-media: #eceef3;
	--border:        rgba(255, 255, 255, 0.09);
	--border-strong: rgba(255, 255, 255, 0.16);

	/* Text */
	--text:          #dee2e6;
	--text-muted:    #adb5bd;
	--heading:       #ffffff;

	/* Brand / accent */
	--accent:        #5555ff;
	--accent-hover:  #7070ff;
	--accent-contrast:#ffffff;
	--accent-soft:   rgba(85, 85, 255, 0.14);
	--link:          #9c9cff;
	--link-hover:    #c1c1ff;

	/* Shape & motion */
	--radius:        14px;
	--radius-sm:     10px;
	--shadow:        0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.28);
	--shadow-lg:     0 12px 40px rgba(0,0,0,0.45);
	--ease:          200ms cubic-bezier(0.4, 0, 0.2, 1);
	--maxw:          1120px;
}

/* --------------------------------------------------------------- Base type */
html {
	scroll-behavior: smooth;
}

/* Any section that is an anchor target gets a consistent scroll offset, so
   in-page links land just below the viewport top instead of flush against it.
   Applies automatically to future <section id="..."> — no per-section rule. */
section[id] {
	scroll-margin-top: 2rem;
}

body {
	background-color: var(--bg);
	color: var(--text);
	font-family: "Noto Sans Bengali", "Google Sans Flex", sans-serif;
	font-size: clamp(15px, 0.45vw + 13.5px, 17px);
	line-height: 1.85;
	text-align: left;              /* replaces global justify — cleaner rag */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--heading);
	text-align: left;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

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

/* Hero title: Bootstrap's .display-4 is already fluid, but combined with the
   inline icon it can wrap on narrow screens. Tightens the fluid curve and
   sets a floor so it never reads as "small" for an h1 (~28px min). */
.jumbotron.feature .hero-title {
  font-size: clamp(28px, 6vw, 56px);
}

/* Hero subtitle: shrinks on small screens to avoid the <br> forcing an
   awkward wrap, but never drops below a comfortably readable size (~15px).
   Below that width, letting it wrap is preferable to shrinking further. */
.jumbotron.feature .hero-subtitle {
  font-size: clamp(15.2px, 4vw, 22px);
}

/* Hero logo: scales in step with .hero-title instead of jumping at a single
   breakpoint, so the icon and text stay proportional at every width. */
.jumbotron.feature h1 img {
  height: clamp(44px, 8vw, 56px);
}

/* Hero CTA button: font-size is inherited from body (already fluid), but
   nudged to keep the same 14px-17px range explicitly since the hero sits
   on a dark background and reads slightly small otherwise. Padding/radius
   are handled by the base .btn rule above, shared with every other button
   on the page. */
.jumbotron.feature .btn {
  font-size: clamp(14px, 3.2vw, 17px);
}

/* Latin runs embedded in Bengali copy render in Google Sans Flex */
.latin { font-family: "Google Sans Flex", sans-serif; }
/* The hero title "Unijoy for Android" uses the Belanosima display face */
.brand { font-family: "Belanosima", sans-serif; font-weight: 400; }
a {
	color: var(--link);
	text-decoration: none;
	transition: color var(--ease);
}
a:hover, a:focus {
	color: var(--link-hover);
	text-decoration: none;
}

::selection {
	background: var(--accent);
	color: #fff;
}

/* Visible keyboard-focus ring for accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
	outline: 2px solid var(--accent-hover);
	outline-offset: 2px;
}

.container {
	max-width: var(--maxw);
}

/* --------------------------------------------------------------- Page head */
.page-header {
	border-bottom: 1px solid var(--border);
	padding-bottom: 14px;
	margin: 56px 0 28px;
	font-size: clamp(22px, 1.8vw + 16px, 30px);
	font-weight: 600;
}
/* When a page-header is the first content of an anchored section, the section's
   own padding owns the top spacing — drop the header's top margin so anchoring
   doesn't leave a large gap above the title. */
section[id] .page-header:first-child {
	margin-top: 0;
}
.page-header small {
	display: inline-block;
	margin-top: 6px;
	color: var(--text-muted);
	font-size: 60%;
	font-family: "Noto Sans Bengali", serif;
}

/* ------------------------------------------------------------------- Hero */
.jumbotron.feature {
	position: relative;
	margin-bottom: 0;
	padding: 96px 0 104px;
	background-color: #1a1d20;
	color: #fff;
	overflow: hidden;
	border-bottom: 1px solid var(--border);
}
/* Legibility overlay over the background photo */
.jumbotron.feature::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(26,29,32,0.95) 0%, rgba(26,29,32,0.72) 42%, rgba(26,29,32,0.35) 100%),
		linear-gradient(0deg, rgba(26,29,32,0.6), rgba(26,29,32,0));
	pointer-events: none;
}
.jumbotron.feature .container { position: relative; z-index: 1; }
.jumbotron.feature h1 {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 14px;
	font-weight: 600;
	color: #fff;
	line-height: 1.1;
}
.jumbotron.feature h1 img { flex: none; }
.jumbotron.feature p {
	margin: 0;
	max-width: 540px;
	color: rgba(255,255,255,0.82);
}

/* ---------------------------------------------------------- Section intro */
.container > .col-lg-12 > h2 {
	text-align: center;
	font-size: clamp(22px, 1.8vw + 16px, 30px);
	font-weight: 600;
	margin: 56px 0 8px;
}

/* ---------------------------------------------------- Feature cards (intro) */
/* Equal-height cards once they sit side by side (>=900px) */
.feature-row {
	/* .article-intro supplies its own padding (below), which replaces the
	   gutter padding Bootstrap relies on to offset .row's -12px margin.
	   Cancel that margin here so cards don't shift past the container edge. */
	margin-left: 0;
	margin-right: 0;
}
/* Below 900px, override col-md-4 (which goes horizontal at 768px) so the
   cards stack vertically instead of colliding side by side. */
@media (max-width: 899.98px) {
	.feature-row > .article-intro {
		float: none;
		width: 100%;
		max-width: 100%;
		flex: 0 0 100%;
	}
}
@media (min-width: 900px) {
	.feature-row {
		display: flex;
		flex-wrap: wrap;
		gap: 28px;                 /* visible gutter between cards */
	}
	.feature-row > .article-intro {
		flex: 1 1 0;               /* equal widths, shrink to make room for the gap */
		min-width: 0;
		display: flex;
		flex-direction: column;
	}
}
.article-intro {
	margin-bottom: 28px;
	margin-top: 28px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
/* Gate the "lift" hover styling to real pointer devices. On touch browsers
   (notably Firefox for Android) :hover sticks after a tap, so navigating to
   #apps left the first card visibly stuck in its hover state. */
@media (hover: hover) and (pointer: fine) {
	.article-intro:hover {
		transform: translateY(-4px);
		border-color: var(--border-strong);
		box-shadow: var(--shadow-lg);
	}
}
.article-intro img {
	width: 100%;
	height: 176px;
	object-fit: contain;
	background: #e8e8e8;
	border-radius: var(--radius-sm);
	padding: 10px;
	margin-bottom: 18px;
}
/* The phone photo fills its panel edge-to-edge (no inset) */
.article-intro img[src="./img/mockup.jpg"] {
	padding: 0;
	object-fit: cover;
	background: #000;
}
.article-intro h3 {
	font-size: clamp(17px, 0.9vw + 14px, 21px);
	font-weight: 600;
	margin: 0 0 10px;
}
.article-intro p {
	color: var(--text-muted);
	margin-bottom: 0;
	font-size: clamp(14px, 0.45vw + 12.5px, 16px);
	line-height: 1.8;
}

/* ---------------------------------------------- Supported apps section */
.apps-section {
	padding: 20px 0 56px;
	background: transparent;
	color: var(--text);
}
.apps-section .page-header {
	color: #fff;
	border-bottom-color: var(--border);
}
.app-card {
	flex: 1 1 0;                   /* equal widths, shrink to make room for the gap */
	min-width: 0;
	width: 100%;                   /* overrides col-sm-3's 25% once the row is display:block */
	padding: 24px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
	display: flex;
	flex-direction: column;
}
@media (hover: hover) and (pointer: fine) {
	.app-card:hover {
		transform: translateY(-4px);
		border-color: var(--border-strong);
		box-shadow: var(--shadow-lg);
	}
}
.app-card h3 {
	font-size: clamp(16px, 0.7vw + 13.5px, 19px);
	font-weight: 600;
	margin: 0 0 12px;
	overflow-wrap: break-word;
	word-break: break-word;
}
.app-card h3 img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	border-radius: 6px;
	vertical-align: middle;
	margin-right: 10px;
}
.app-card p {
	color: var(--text-muted);
	font-size: clamp(13px, 0.45vw + 11.5px, 15px);
	line-height: 1.7;
	flex: 1 1 auto;
	overflow-wrap: break-word;
}
/* Keep the four app cards on one flex row so heights match */
.apps-section .row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;                     /* visible gutter between app cards */
	/* .app-card supplies its own padding, so cancel .row's -12px margin
	   here (see .feature-row above for the same reasoning). */
	margin-left: 0;
	margin-right: 0;
}
.apps-section .row > .col-lg-12 { width: 100%; flex: 0 0 100%; }
.app-card p:last-child { flex: none; margin-top: 16px; margin-bottom: 0; }

/* --------------------------------------------------------------- Buttons */
/* Fixed padding/border-radius stopped scaling once the hero title/subtitle
   went fluid via clamp(), making buttons look oversized on wide screens
   and cramped-but-still-too-fixed on narrow ones. Applying clamp() here
   (on the base .btn rule, not just the hero one) means every button on
   the page — hero CTA, HeliBoard/FlorisBoard/FUTO/etc. "Get it" links —
   shrinks by the same modest amount together. Floors are kept close to
   the ceilings (7px/16px padding, 8px radius) so buttons stay easy to
   tap even on the smallest phones; font-size is inherited from body,
   which is already fluid. */
.btn {
	border-radius: clamp(8px, 1vw, 10px);
	font-family: inherit;
	font-weight: 600;
	padding: clamp(7px, 1.4vw, 9px) clamp(16px, 3vw, 20px);
	transition: transform var(--ease), background-color var(--ease),
	            border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-default {
	background-color: var(--accent);
	border: 1px solid var(--accent);
	color: var(--accent-contrast);
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active {
	background-color: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #fff;
	box-shadow: 0 6px 18px rgba(85, 85, 255, 0.35);
}

/* --------------------------------------------------------------- Site footer */
.site-footer {
	background-color: #1a1d20;
	border-top: 1px solid var(--border);
	padding: 28px 0;
	color: var(--text-muted);
	font-size: clamp(13px, 0.25vw + 12px, 14px);
}
.site-footer p { margin-bottom: 6px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: #fff; }

.site-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
}
.site-footer-text {
	flex: 1 1 auto;
	min-width: 0;
}
.site-footer-text p:last-child { margin-bottom: 0; }
.site-footer-brand {
	display: inline-flex;
	align-items: center;
	flex: none;
	opacity: 0.85;
	transition: opacity var(--ease);
}
.site-footer-brand:hover,
.site-footer-brand:focus {
	opacity: 1;
	text-decoration: none;
}
.site-footer-brand img { display: block; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 899.98px) {
	.apps-section .row {
		display: block;
	}
	.app-card { margin-bottom: 20px; }
	.jumbotron.feature { padding: 64px 0 68px; }
	.jumbotron.feature h1 { gap: 12px; }
	.jumbotron.feature::before {
		background:
			linear-gradient(90deg, rgba(26,29,32,0.92) 0%, rgba(26,29,32,0.7) 100%),
			linear-gradient(0deg, rgba(26,29,32,0.7), rgba(26,29,32,0));
	}
}

/* Very narrow screens: the title is likely to wrap onto two lines. Centering
   a single-line-sized icon against that taller block makes the icon look
   undersized, so stack icon above title instead of trying to keep them
   side-by-side. */
@media (max-width: 295px) {
	.jumbotron.feature h1 {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.jumbotron.feature h1 img {
		height: 44px;
	}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
	.article-intro:hover,
	.app-card:hover { transform: none; }
}
