/*
 * Urbanstory main styles
 * ----------------------
 * Site-wide styles built on the tokens in tokens.css.
 * Sections: 1. Base  2. Buttons  3. Forms  4. Header  5. Footer
 *           6. Light zone  7. Accessibility
 * Layout (which element sits where) is set in Astra's Header/Footer
 * Builder; this file only controls how those elements look.
 */

/* ========== 1. Base ========== */

body {
	background-color: var(--us-bg);
	color: var(--us-fg);
	font-family: var(--us-font-body);
	line-height: var(--us-leading-body);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-content :where(h1, h2, h3, h4, h5, h6),
.entry-title {
	font-family: var(--us-font-display);
	font-weight: 800;
	color: var(--us-heading);
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1, .entry-content h1, .entry-title { font-size: var(--us-text-h1); }
h2, .entry-content h2 { font-size: var(--us-text-h2); }
h3, .entry-content h3 { font-size: var(--us-text-h3); }
h4, h5, h6 { font-size: var(--us-text-body); }

/* Breathing room between the header and page content on phones/tablets.
   Astra sets it to 0 below 1200px with this same selector; ours loads
   later, so it wins. Pages with a full-width hero can override it. */
@media (max-width: 1199px) {
	.ast-plain-container.ast-no-sidebar #primary {
		margin-top: var(--us-space-8);
		margin-bottom: var(--us-space-12);
	}
}

/* Small uppercase label style, reusable anywhere: <span class="us-label"> */
.us-label {
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: var(--us-text-label);
	letter-spacing: var(--us-tracking-label);
	text-transform: uppercase;
}

/* Small yellow line above a heading ("Collections", "Just in" …) */
.us-eyebrow {
	margin: 0;
	color: var(--us-yellow);
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: var(--us-text-label);
	letter-spacing: var(--us-tracking-label);
	text-transform: uppercase;
}

/* Devanagari text, e.g. <span lang="hi">शहर की कहानी</span> */
:lang(hi) {
	font-family: var(--us-font-label);
	font-weight: 600;
	letter-spacing: 0.02em;
}

::selection {
	background: var(--us-yellow);
	color: var(--us-ink);
}

/* Tables in page content (e.g. the Size Guide): quiet lines, header row tinted */
.entry-content .wp-block-table table,
.us-dialog__body .wp-block-table table {
	border-collapse: collapse;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.us-dialog__body .wp-block-table th,
.us-dialog__body .wp-block-table td {
	padding: 0.6em 0.8em;
	border: 1px solid var(--us-border);
	text-align: left;
}

.entry-content .wp-block-table thead,
.us-dialog__body .wp-block-table thead {
	border-bottom: 0;
}

.entry-content .wp-block-table th,
.us-dialog__body .wp-block-table th {
	background: var(--us-surface);
	color: var(--us-heading);
	font-weight: 600;
}

/* Footer menu links: comfortable 44px tap areas on phones and tablets */
@media (max-width: 921px) {
	.site-footer .menu-link {
		display: inline-flex;
		align-items: center;
		min-height: var(--us-tap);
	}
}

/* 404 page (inc/template-hooks.php, urbanstory_404_content) */
.error-404 .page-content,
.ast-404-layout-1 {
	text-align: left;
}

.us-404 {
	display: grid;
	gap: var(--us-space-4);
	justify-items: start;
	max-width: 640px;
	margin: 0 auto;
	padding-block: var(--us-space-8) var(--us-space-6);
}

.us-404 > * {
	margin: 0;
}

.us-404__plate {
	padding: 6px 18px 4px;
	border-radius: var(--us-radius-sm);
	background: var(--us-yellow);
	box-shadow: inset 0 0 0 2px var(--us-ink);
	color: var(--us-ink);
	font-family: var(--us-font-display);
	font-weight: 800;
	font-size: 1.5rem;
	letter-spacing: 0.08em;
	line-height: 1.2;
}

.us-404__title {
	font-size: var(--us-text-display);
	line-height: 1.05;
	text-transform: uppercase;
}

.us-404__text {
	max-width: 46ch;
	color: var(--us-text);
	font-size: 1.125rem;
}

.us-404__search {
	display: flex;
	width: 100%;
	max-width: 440px;
	margin-top: var(--us-space-2);
}

.us-404__search input[type="search"] {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	padding: 0 18px;
	border: 1.5px solid var(--us-field-border);
	border-right: 0;
	border-radius: var(--us-radius-pill) 0 0 var(--us-radius-pill);
	background: var(--us-field-bg);
	color: var(--us-field-fg);
	font-size: 1rem;
}

.us-404__search button {
	display: grid;
	place-items: center;
	width: 56px;
	min-height: 48px;
	padding: 0;
	border: 0;
	border-radius: 0 var(--us-radius-pill) var(--us-radius-pill) 0;
	background: var(--us-yellow);
	color: var(--us-ink);
	cursor: pointer;
}

.us-404__search button:hover {
	background: var(--us-yellow-hover);
	color: var(--us-ink);
}

.us-404__stories {
	max-width: 1200px;
	margin: 0 auto;
	padding-block: var(--us-space-8) 0;
	text-align: left;
}

.us-404__shop .button {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 28px;
	border-radius: var(--us-radius-pill);
	font-weight: 600;
}

/* The tiles row stays inside the page margins here (on the homepage it
   runs to the screen edge) */
.us-404__stories .us-photo-tiles {
	margin-inline: 0;
	padding-inline: 0;
	scroll-padding-inline: 0;
}

.us-404__stories-title {
	margin: 0 0 var(--us-space-6);
	font-size: var(--us-text-h2);
	text-transform: uppercase;
}

/* Coming soon (templates/coming-soon.html), shown to visitors while
   WooCommerce's "coming soon" mode is on: on store pages only, or on the
   whole site (then without the header, so it shows its own logo plate) */
.us-coming-soon {
	display: grid;
	gap: var(--us-space-6);
	justify-items: start;
	box-sizing: border-box;
	max-width: calc(720px + 2 * var(--us-gutter));
	margin: 0 auto;
	padding: clamp(3rem, 2rem + 6vw, 7rem) var(--us-gutter);
}

.us-coming-soon > * {
	margin: 0;
}

.us-coming-soon__plate {
	padding: 6px 16px 4px;
	border-radius: var(--us-radius-sm);
	background: var(--us-yellow);
	box-shadow: inset 0 0 0 2px var(--us-ink);
	color: var(--us-ink);
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: var(--us-text-label);
	letter-spacing: var(--us-tracking-label);
	text-transform: uppercase;
}

/* Logo plate, only when the whole site is hidden (no header then).
   Same look as the header's licence-plate logo. */
.us-coming-soon__brand {
	display: inline-grid;
	justify-items: center;
	gap: 2px;
	margin-bottom: var(--us-space-6);
	padding: 7px 14px 5px;
	border-radius: var(--us-radius-sm);
	background: var(--us-yellow);
	box-shadow: inset 0 0 0 2px var(--us-ink);
	color: var(--us-ink);
	line-height: 1;
}

.us-coming-soon__brand-name {
	font-family: var(--us-font-display);
	font-weight: 800;
	font-size: 1.125rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.us-coming-soon__brand-line {
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: 0.8125rem;
}

.us-coming-soon__title {
	font-size: var(--us-text-display);
	line-height: 1.04;
	text-transform: uppercase;
}

.us-coming-soon__text {
	max-width: 48ch;
	color: var(--us-text);
	font-size: 1.125rem;
}

.us-coming-soon__link a {
	display: inline-block;
	padding-block: 12px;
	color: var(--us-yellow);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* ========== 2. Buttons ========== */
/* Colors come from Astra (Brand color + button text set in Customizer). */

.ast-button,
.ast-custom-button,
.wp-block-button__link,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--us-radius-pill);
	font-family: var(--us-font-body);
	font-weight: 600;
	min-height: 48px;
	transition: background-color var(--us-duration-fast) var(--us-ease),
		color var(--us-duration-fast) var(--us-ease),
		border-color var(--us-duration-fast) var(--us-ease);
}

/* ========== 3. Forms (dark by default; light zone flips the tokens) ========== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="url"],
textarea,
select {
	background-color: var(--us-field-bg);
	color: var(--us-field-fg);
	border: 1.5px solid var(--us-field-border);
	border-radius: var(--us-radius-sm);
	font-family: var(--us-font-body);
}

input::placeholder,
textarea::placeholder {
	color: var(--us-muted);
	opacity: 1;
}

/* ========== 4. Header ========== */

/* Announcement bar (text is edited in Customizer → Header Builder → HTML 1) */
.ast-above-header-bar .ast-header-html-1 .ast-builder-html-element p {
	margin: 0;
	color: var(--us-ink);
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: var(--us-text-label);
	letter-spacing: var(--us-tracking-label);
	text-transform: uppercase;
	text-align: center;
}

/* Logo placeholder: the site title + tagline drawn as a taxi licence plate.
   Swap for a real logo in Customizer → Site Identity when it's ready. */
.ast-site-identity .ast-site-title-wrap {
	display: inline-grid;
	justify-items: center;
	gap: 2px;
	padding: 7px 14px 5px;
	background: var(--us-yellow);
	border-radius: var(--us-radius-sm);
	box-shadow: inset 0 0 0 2px var(--us-ink);
}
.ast-site-identity .site-title {
	margin: 0;
	line-height: 1;
}
.ast-site-identity .site-title a,
.ast-site-identity .site-title a:hover,
.ast-site-identity .site-title a:focus {
	color: var(--us-ink);
	font-family: var(--us-font-display);
	font-weight: 800;
	font-size: 1.125rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1;
}
.ast-site-identity .site-description {
	margin: 0;
	color: var(--us-ink);
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: 0.8125rem;
	line-height: 1;
}

/* Main menu */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
	color: var(--us-headlight);
	font-family: var(--us-font-body);
	font-weight: 600;
	font-size: 0.9375rem;
}
.ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:focus,
.ast-builder-menu-1 .main-header-menu > .current-menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .current-menu-ancestor > .menu-link {
	color: var(--us-yellow);
}

/* Dropdowns */
.ast-builder-menu-1 .main-header-menu .sub-menu {
	background: var(--us-asphalt);
	border: 1px solid var(--us-line);
	border-radius: var(--us-radius);
	padding: var(--us-space-2) 0;
	box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
}
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link {
	color: var(--us-text);
	font-size: var(--us-text-small);
	border: 0;
	padding: 10px 18px;
}
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-item:hover > .menu-link,
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link:focus {
	color: var(--us-yellow);
	background: transparent;
}

/* Header icons: search, account, cart, mobile menu button.
   At least 44×44px so they're easy to tap. */
.ast-header-search .astra-search-icon,
.ast-header-account .ast-header-account-link,
.ast-header-woo-cart .cart-container,
.ast-mobile-header-wrap .menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--us-tap);
	min-height: var(--us-tap);
	color: var(--us-headlight);
}
.ast-header-search .astra-search-icon:hover,
.ast-header-account .ast-header-account-link:hover,
.ast-header-woo-cart .cart-container:hover,
.ast-mobile-header-wrap .menu-toggle:hover {
	color: var(--us-yellow);
}
.ast-header-search .ast-icon svg,
.ast-header-account .account-icon {
	fill: currentColor;
	width: 20px;
	height: 20px;
}
.ast-mobile-header-wrap .menu-toggle {
	background: transparent;
	border: 0;
	padding: 0;
}

/* Cart: yellow outlined bag with the item count inside */
.ast-site-header-cart .ast-cart-menu-wrap .count {
	color: var(--us-yellow);
	border-color: var(--us-yellow);
	border-radius: 4px;
	font-family: var(--us-font-body);
	font-weight: 600;
}
.ast-site-header-cart .ast-cart-menu-wrap .count::after {
	border-color: var(--us-yellow);
}
.ast-site-header-cart .cart-container:hover .count {
	background: var(--us-yellow);
	color: var(--us-ink);
}

/* Search field that slides open */
.ast-header-search .search-field {
	background: var(--us-asphalt);
	color: var(--us-headlight);
	border-radius: var(--us-radius-pill);
}

/* Mobile: slide-in menu panel (background color is set in Astra: Off-Canvas) */
.ast-mobile-popup-drawer .ast-mobile-popup-inner {
	border-right: 1px solid var(--us-line);
}
.ast-mobile-popup-drawer .menu-toggle-close {
	color: var(--us-headlight);
	min-width: var(--us-tap);
	min-height: var(--us-tap);
}
.ast-mobile-popup-drawer .main-header-menu .menu-link {
	color: var(--us-headlight);
	font-family: var(--us-font-display);
	font-weight: 500;
	font-size: 1.0625rem;
	padding-block: 14px;
	border-color: var(--us-line);
}
.ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link {
	font-family: var(--us-font-body);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--us-text);
}
.ast-mobile-popup-drawer .main-header-menu .menu-item:hover > .menu-link,
.ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link {
	color: var(--us-yellow);
}
.ast-mobile-popup-drawer .main-header-menu .sub-menu {
	background: transparent;
}
.ast-mobile-popup-drawer .ast-menu-toggle {
	color: var(--us-headlight);
}

/* ========== 5. Footer ========== */

/* Main row: asphalt with a faint comic-book dot texture */
.site-primary-footer-wrap {
	background-image: radial-gradient(var(--us-halftone) 1.2px, transparent 1.3px);
	background-size: 12px 12px;
	padding-block: var(--us-space-16) var(--us-space-12);
}

/* Small licence-plate badge (text set in Customizer → Footer Builder → HTML 1) */
.us-footer-plate {
	display: inline-grid;
	justify-items: center;
	gap: 2px;
	margin: 0 0 var(--us-space-4);
	padding: 8px 16px 6px;
	background: var(--us-yellow);
	color: var(--us-ink);
	border-radius: var(--us-radius-sm);
	box-shadow: inset 0 0 0 2px var(--us-ink);
}
.us-footer-plate__name {
	font-family: var(--us-font-display);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: 0.03em;
	line-height: 1;
}
.us-footer-plate__tag {
	font-size: 0.875rem;
	line-height: 1;
}
.us-footer-blurb {
	margin: 0;
	max-width: 32ch;
	color: var(--us-text);
}

/* Link columns (edit the links in Appearance → Menus) */
.site-footer .widget-title {
	margin-bottom: var(--us-space-4);
	color: var(--us-smog);
	font-family: var(--us-font-label);
	font-weight: 600;
	font-size: var(--us-text-label);
	letter-spacing: var(--us-tracking-label);
	text-transform: uppercase;
}
.site-footer .widget_nav_menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: var(--us-space-2);
}
.site-footer .widget_nav_menu .menu-link {
	display: inline-block;
	padding-block: 4px;
	color: var(--us-text);
	text-decoration: none;
}
.site-footer .widget_nav_menu .menu-link:hover,
.site-footer .widget_nav_menu .menu-link:focus {
	color: var(--us-yellow);
}

/* Bottom row: copyright + legal links */
.site-below-footer-wrap .ast-footer-copyright,
.site-below-footer-wrap .ast-footer-copyright p {
	color: var(--us-smog);
	font-size: var(--us-text-small);
	margin: 0;
}
.site-below-footer-wrap .footer-bar-navigation .menu-link {
	color: var(--us-smog);
	font-size: var(--us-text-small);
}
.site-below-footer-wrap .footer-bar-navigation .menu-link:hover,
.site-below-footer-wrap .footer-bar-navigation .menu-link:focus {
	color: var(--us-yellow);
}
@media (min-width: 922px) {
	.site-below-footer-wrap .site-footer-below-section-2 {
		justify-content: flex-end;
	}
}

/* Phones and tablets: keep a side margin so text never touches the screen
   edge, and space the stacked footer groups apart */
@media (max-width: 921px) {
	.site-primary-footer-wrap,
	.site-below-footer-wrap {
		padding-inline: var(--us-gutter);
	}
	.site-primary-footer-inner-wrap {
		row-gap: var(--us-space-8);
	}
}

/* ========== 6. Light zone (cart, checkout, account) ========== */
/* The body class is added in inc/template-hooks.php. Tokens are in tokens.css. */

.us-light .site-content {
	background-color: var(--us-bg);
	color: var(--us-fg);
}
.us-light .site-content a:not(.button):not(.wp-block-button__link):not(.checkout-button) {
	color: var(--us-link);
}
.us-light .site-content a:not(.button):not(.wp-block-button__link):not(.checkout-button):hover {
	color: var(--us-link-hover);
}

/* ========== 7. Accessibility ========== */

:focus-visible {
	outline: 3px solid var(--us-focus);
	outline-offset: 2px;
}

/* Astra forces a thin dotted outline in the link's own text colour (with very
   specific selectors), which can vanish, e.g. the dark cart icon on a dark
   page. Keyboard focus must stay clearly visible, so this one wins.
   Story tiles ring the whole tile instead (home.css). */
html body a:focus-visible:not(.us-photo-tile__name a),
html body summary:focus-visible,
html body [tabindex]:focus-visible {
	outline: 3px solid var(--us-focus) !important;
	outline-offset: 2px !important;
}

/* Respect visitors who ask their device for less motion. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
