/* ============================================================
   KTech & Capital LTD – main.css
   Shared base styles. Device-specific rules live in:
     • desktop.css  (min-width: 768px)  — linked in every HTML page
     • mobile.css   (max-width: 767px)  — linked in every HTML page
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
   ---------------------------------------------------------- */
:root {
  --color-navy:        #0a1628;
  --color-navy-mid:    #112040;
  --color-teal:        #00b4d8;
  --color-teal-dark:   #0096b7;
  --color-teal-light:  #e0f7fc;
  --color-light-bg:    #f8f9fa;
  --color-white:       #ffffff;
  --color-dark-text:   #212529;
  --color-muted:       #6c757d;
  --color-border:      #dee2e6;
  --color-success:     #28a745;
  --color-danger:      #dc3545;
  --color-warning:     #ffc107;

  --font-sans:         'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:         'Consolas', 'Courier New', monospace;

  --radius-sm:         4px;
  --radius-md:         8px;
  --radius-lg:         16px;
  --radius-xl:         24px;

  --shadow-sm:         0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md:         0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:         0 10px 30px rgba(0,0,0,.15);

  --transition:        .25s ease;

  --container-max:     1200px;
  --container-pad:     clamp(1rem, 4vw, 2rem);

  --nav-height:        68px;
}

/* ----------------------------------------------------------
   2. Reset / Normalize
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: var(--color-dark-text);
  background: var(--color-white);
}

img, video, svg { display: block; max-width: 100%; }
a { color: var(--color-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ----------------------------------------------------------
   3. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-navy);
}

h1 { font-size: clamp(2rem,    5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem,  3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem,  2.5vw, 1.75rem); }
h4 { font-size: clamp(1.05rem, 2vw,   1.35rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-muted   { color: var(--color-muted); }
.text-teal    { color: var(--color-teal); }
.text-center  { text-align: center; }
.text-white   { color: var(--color-white); }
.fw-bold      { font-weight: 700; }
.lead         { font-size: 1.2rem; line-height: 1.7; }

/* ----------------------------------------------------------
   4. Layout Utilities
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.section--alt {
  background: var(--color-light-bg);
}

.section--dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--color-white); }

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-1  { grid-template-columns: 1fr; }
.grid-2  { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3  { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4  { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-centered { display: flex !important; justify-content: center; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none !important; }

/* ----------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-teal);
  color: var(--color-navy);
  border-color: var(--color-teal);
}
.btn-primary:hover {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-outline {
  background: transparent;
  color: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
}
.btn-outline:hover {
  background: var(--color-teal);
  color: var(--color-navy);
  border-color: var(--color-teal);
}

.btn-dark {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}
.btn-dark:hover { background: var(--color-navy-mid); }

.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }

/* ----------------------------------------------------------
   6. Cards
   ---------------------------------------------------------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.card__icon svg { width: 28px; height: 28px; fill: var(--color-teal-dark); }

.card__title { margin-bottom: .6rem; }
.card__body  { color: var(--color-muted); flex: 1; }
.card__footer { margin-top: 1.5rem; }

.card--featured {
  border-top: 4px solid var(--color-teal);
}

.card--dark {
  background: var(--color-navy);
  border-color: var(--color-navy-mid);
  color: var(--color-white);
}
.card--dark h3, .card--dark h4 { color: var(--color-white); }
.card--dark .card__body { color: rgba(255,255,255,.75); }

/* ----------------------------------------------------------
   7. Hero Section
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 60%, #0e2a50 100%);
  overflow: hidden;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(0,180,216,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(0,180,216,.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(0,180,216,.15);
  border: 1px solid rgba(0,180,216,.4);
  color: var(--color-teal);
  padding: .3rem .9rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 1.25rem;
}

.hero p.lead { color: rgba(255,255,255,.82); margin-bottom: 2rem; }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
  padding: clamp(1rem, 2vw, 1.5rem) 0;
  text-align: center;
}

.page-hero h1 { color: var(--color-white); }
.page-hero p  { color: rgba(255,255,255,.78); max-width: 640px; margin-inline: auto; }

/* ----------------------------------------------------------
   8. Navigation (host element support; shadow DOM in component)
   ---------------------------------------------------------- */
ktech-nav {
  display: block;
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--nav-height);
}

/* ----------------------------------------------------------
   9. Section Headings
   ---------------------------------------------------------- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-header .eyebrow {
  display: inline-block;
  color: var(--color-teal-dark);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

/* ----------------------------------------------------------
   10. Badges / Tags
   ---------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-teal    { background: var(--color-teal-light); color: var(--color-teal-dark); }
.badge-navy    { background: var(--color-navy);       color: var(--color-white);     }
.badge-success { background: #d4edda; color: #155724; }

/* ----------------------------------------------------------
   11. Feature List
   ---------------------------------------------------------- */
.feature-list { display: flex; flex-direction: column; gap: .75rem; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  line-height: 1.5;
}
.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300b4d8'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ----------------------------------------------------------
   12. Pricing Cards
   ---------------------------------------------------------- */
.pricing-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.pricing-card:hover { border-color: var(--color-teal); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pricing-card--featured {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
  position: relative;
}
.pricing-card--featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-teal);
  color: var(--color-navy);
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .9rem;
  border-radius: 50px;
  letter-spacing: .04em;
}
.pricing-card__price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1;
  margin-bottom: .3rem;
}
.pricing-card__price span { font-size: 1rem; font-weight: 500; color: var(--color-muted); }
.pricing-card__features { flex: 1; margin: 1.5rem 0; }
.pricing-card__cta { margin-top: auto; }

/* ----------------------------------------------------------
   13. Blog Cards
   ---------------------------------------------------------- */
.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card__img {
  height: 200px;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-teal-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card__img svg { width: 64px; height: 64px; opacity: .4; fill: var(--color-white); }
.blog-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta { font-size: .82rem; color: var(--color-muted); margin-bottom: .75rem; }
.blog-card__title { margin-bottom: .6rem; font-size: 1.15rem; }
.blog-card__title a { color: var(--color-navy); }
.blog-card__title a:hover { color: var(--color-teal-dark); text-decoration: none; }
.blog-card__excerpt { color: var(--color-muted); font-size: .93rem; flex: 1; }
.blog-card__link { margin-top: 1rem; font-size: .88rem; font-weight: 600; color: var(--color-teal-dark); }

/* ----------------------------------------------------------
   14. Forms
   ---------------------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .4rem;
  color: var(--color-dark-text);
}

.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .95rem;
  line-height: 1.5;
  background: var(--color-white);
  color: var(--color-dark-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0,180,216,.15);
}

.form-control.is-valid  { border-color: var(--color-success); }
.form-control.is-invalid { border-color: var(--color-danger); }

.valid-feedback   { color: var(--color-success); font-size: .82rem; margin-top: .3rem; display: none; }
.invalid-feedback { color: var(--color-danger);  font-size: .82rem; margin-top: .3rem; display: none; }

.form-control.is-valid   ~ .valid-feedback   { display: block; }
.form-control.is-invalid ~ .invalid-feedback { display: block; }

textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control   { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* ----------------------------------------------------------
   15. Job Listings
   ---------------------------------------------------------- */
.job-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.job-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-teal); }
.job-card__info { flex: 1; min-width: 200px; }
.job-card__title { font-size: 1.15rem; margin-bottom: .4rem; color: var(--color-navy); }
.job-card__meta { color: var(--color-muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.job-card__meta span::before { content: '•'; margin-right: .5rem; }
.job-card__meta span:first-child::before { content: ''; margin: 0; }
.job-card__salary { font-weight: 700; color: var(--color-teal-dark); font-size: 1.05rem; white-space: nowrap; margin-bottom: .75rem; }

/* ----------------------------------------------------------
   16. Team Cards
ge   ---------------------------------------------------------- */
.team-card { text-align: center; width: 25%; min-width: 260px; max-width: 340px; margin: 0 auto; }
.team-card__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-teal-light);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--color-teal);
}
.team-card__avatar svg { width: 70px; height: 70px; fill: var(--color-teal-dark); }
.team-card__name { font-size: 1.1rem; margin-bottom: .25rem; }
.team-card__role { color: var(--color-teal-dark); font-size: .9rem; font-weight: 600; margin-bottom: .5rem; }
.team-card__bio  { color: var(--color-muted); font-size: .88rem; }

/* ----------------------------------------------------------
   17. Process Steps
   ---------------------------------------------------------- */
.process-steps { display: flex; flex-direction: column; gap: 2rem; }
.process-step  { display: flex; gap: 1.5rem; align-items: flex-start; }
.process-step__num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.process-step__content h4 { margin-bottom: .4rem; }
.process-step__content p  { color: var(--color-muted); margin: 0; }

/* ----------------------------------------------------------
   18. CTA Banner
   ---------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 60%;
  height: 300%;
  background: radial-gradient(ellipse, rgba(0,180,216,.15) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { color: var(--color-white); margin-bottom: 1rem; }
.cta-banner p  { color: rgba(255,255,255,.78); max-width: 540px; margin-inline: auto; margin-bottom: 2rem; }
.cta-banner__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }

/* ----------------------------------------------------------
   19. Stats Bar
   ---------------------------------------------------------- */
.stats-bar {
  background: var(--color-teal);
  padding: 2rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  text-align: center;
}
.stat__value { font-size: 2rem; font-weight: 800; color: var(--color-navy); line-height: 1; }
.stat__label { font-size: .85rem; font-weight: 600; color: var(--color-navy-mid); margin-top: .3rem; }

/* ----------------------------------------------------------
   20. Legal / Prose
   ---------------------------------------------------------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 2.5rem; margin-bottom: .75rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: .5rem; font-size: 1.15rem; }
.prose p  { color: var(--color-dark-text); }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul li { margin-bottom: .4rem; color: var(--color-dark-text); }
.prose a  { color: var(--color-teal-dark); }

/* ----------------------------------------------------------
   21. Contact Page
   ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.contact-info-card {
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-info-card h3 { color: var(--color-white); margin-bottom: 1.5rem; }
.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.contact-info-item svg { width: 22px; height: 22px; fill: var(--color-teal); flex-shrink: 0; margin-top: 2px; }
.contact-info-item strong { display: block; color: var(--color-teal); font-size: .85rem; }
.contact-info-item p { color: rgba(255,255,255,.8); margin: 0; font-size: .9rem; }

.map-placeholder {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1.5rem;
  background: #1a2d50;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------------------------------------
   22. Footer (light host styles)
   ---------------------------------------------------------- */
ktech-footer {
  display: block;
}

/* ----------------------------------------------------------
   23. Breadcrumb
   ---------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: var(--color-white); }
.breadcrumb__sep { color: rgba(255,255,255,.4); }

/* ----------------------------------------------------------
   24. Divider
   ---------------------------------------------------------- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: 2rem;
}

/* ----------------------------------------------------------
   25. Alert / Notice
   ---------------------------------------------------------- */
.alert {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .93rem;
  border-left: 4px solid;
}
.alert-info    { background: #e8f4fd; border-color: var(--color-teal); color: #0c4a6e; }
.alert-success { background: #d4edda; border-color: var(--color-success); color: #155724; }
.alert-warning { background: #fff3cd; border-color: var(--color-warning); color: #856404; }
.alert-danger  { background: #f8d7da; border-color: var(--color-danger); color: #721c24; }

/* ----------------------------------------------------------
   26. Responsive – device-specific stylesheets
   Desktop enhancements live in desktop.css (linked separately
   in each HTML page) and mobile overrides in mobile.css.
   Both files carry their own @media queries internally.
   ---------------------------------------------------------- */
