/*
Theme Name: Imran
Theme URI: https://yourdomain.com/
Author: Imran
Author URI: https://yourdomain.com/
Description: A modern, advanced WordPress block theme for senior developers, architects and technology consultants. Built for Full Site Editing (FSE) with Gutenberg: modular block patterns for every section, a complete design system in theme.json, zero jQuery, accessible markup and a dark-first editorial look.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imran
Tags: block-patterns, block-styles, full-site-editing, one-column, two-columns, wide-blocks, portfolio, blog, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready, accessibility-ready
*/

/* ==========================================================================
   TABLE OF CONTENTS
   01. Design tokens (custom properties)
   02. Reset & base
   03. Base typography
   04. Links & forms
   05. Accessibility
   06. Utility classes
   --------------------------------------------------------------------------
   Everything else lives in:
     assets/css/theme.css   → components & block style variations
     theme.json             → palette, type scale, spacing, block styles
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS
   Mirror of theme.json — kept here so plain CSS and third-party blocks can
   use the same values without depending on generated preset classes.
   ========================================================================== */

:root {
  /* Surfaces */
  --imran-base: #1c1c1b;
  --imran-base-deep: #141413;
  --imran-surface: #242423;
  --imran-surface-2: #2c2c2a;
  --imran-card: #f5f3ef;

  /* Ink */
  --imran-ink: #171716;
  --imran-ink-soft: #5f5e59;
  --imran-contrast: #f4f4f1;
  --imran-muted: #a5a5a0;
  --imran-faint: #4c4c49;

  /* Lines */
  --imran-line: rgba(255, 255, 255, 0.1);
  --imran-line-strong: rgba(255, 255, 255, 0.2);

  /* Accents */
  --imran-accent: #ff5a1f;
  --imran-accent-hover: #ff7440;
  --imran-accent-deep: #c2350a;
  --imran-lime: #d9f24e;
  --imran-success: #5ed67b;

  /* Type */
  --imran-font-display: "Archivo", "Inter", ui-sans-serif, system-ui, sans-serif;
  --imran-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --imran-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Radius */
  --imran-radius-sm: 8px;
  --imran-radius: 14px;
  --imran-radius-lg: 24px;
  --imran-radius-xl: 28px;
  --imran-radius-pill: 999px;

  /* Shadow */
  --imran-shadow-card: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
  --imran-shadow-pill: 0 20px 45px -30px rgba(0, 0, 0, 0.95);

  /* Motion */
  --imran-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --imran-transition: 200ms var(--imran-ease);

  /* Structure */
  --imran-nav-height: 86px;
}

/* Light surfaces keep the same accents but swap ink and canvas. */
.imran-scheme-light,
.is-style-scheme-light {
  --imran-base: #f1efea;
  --imran-base-deep: #ffffff;
  --imran-surface: #ffffff;
  --imran-surface-2: #f6f4f0;
  --imran-contrast: #171716;
  --imran-muted: #5d5c57;
  --imran-faint: #d9d6cf;
  --imran-line: rgba(20, 20, 18, 0.13);
  --imran-line-strong: rgba(20, 20, 18, 0.26);
}

/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--imran-nav-height) + 16px);
}

body {
  margin: 0;
  background-color: var(--imran-base);
  color: var(--imran-contrast);
  font-family: var(--imran-font-body);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--imran-base-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--imran-surface-2);
  border-radius: var(--imran-radius-pill);
  border: 2px solid var(--imran-base-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--imran-line-strong);
}

/* ==========================================================================
   03. BASE TYPOGRAPHY
   Headings inherit the theme.json element styles; these are the fallbacks
   and the details theme.json cannot express.
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 0.5em;
  font-family: var(--imran-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-block-end: 0;
}

code,
kbd,
pre,
samp {
  font-family: var(--imran-font-mono);
  font-size: 0.9em;
}

code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--imran-line);
  border-radius: var(--imran-radius-sm);
  background: var(--imran-surface);
}

pre {
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--imran-line);
  border-radius: var(--imran-radius);
  background: var(--imran-base-deep);
  overflow-x: auto;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
}

blockquote {
  margin-inline: 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--imran-accent);
}

hr,
.wp-block-separator {
  border: 0;
  border-block-start: 1px solid var(--imran-line);
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--imran-line);
  text-align: start;
}

th {
  font-weight: 600;
}

/* ==========================================================================
   04. LINKS & FORMS
   ========================================================================== */

a {
  color: var(--imran-accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--imran-transition);
}

a:hover {
  color: var(--imran-contrast);
}

input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--imran-line);
  border-radius: 12px;
  background: var(--imran-surface);
  color: var(--imran-contrast);
  transition: border-color var(--imran-transition), box-shadow var(--imran-transition),
    background-color var(--imran-transition);
}

input::placeholder,
textarea::placeholder {
  color: var(--imran-muted);
  opacity: 0.8;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--imran-accent);
  background: var(--imran-base-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--imran-accent) 25%, transparent);
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23a5a5a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 15px;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

label {
  display: block;
  margin-block-end: 0.4rem;
  font-family: var(--imran-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--imran-muted);
}

/* ==========================================================================
   05. ACCESSIBILITY
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--imran-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.assistive-text,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   06. UTILITY CLASSES
   Small, predictable helpers that patterns may attach to any core block.
   ========================================================================== */

.imran-tight {
  padding-block: clamp(20px, 3vw, 36px) !important;
}

.imran-flush {
  padding-block: 0 !important;
}

.imran-text-accent {
  color: var(--imran-accent);
}

.imran-text-muted {
  color: var(--imran-muted);
}

.imran-text-center {
  text-align: center;
}

.imran-mono {
  font-family: var(--imran-font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.imran-nowrap {
  white-space: nowrap;
}

.imran-rounded {
  border-radius: var(--imran-radius-lg);
  overflow: hidden;
}

.imran-shadow {
  box-shadow: var(--imran-shadow-card);
}

.imran-hide-empty:empty {
  display: none;
}
