/* ============ CMC SKY Portfolio — styles.css ============ */
:root {
  --blue: #1d3faa;
  --blue-dark: #14276b;
  --blue-ink: #0e1a4a;
  --red: #e23a45;
  --red-dark: #c22733;
  --orange: #f59e0b;
  --green: #16a34a;
  --ink: #101828;
  --muted: #5b6474;
  --line: #e4e8f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 10px 28px -8px rgba(16, 24, 40, .16);
  --shadow-lg: 0 24px 60px -16px rgba(20, 39, 107, .25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.icon { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .95rem;
  padding: 10px 20px; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(226, 58, 69, .55); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-outline { border-color: #c9d2e3; color: var(--blue-ink); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 52px; height: auto; border-radius: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--blue-ink); letter-spacing: .02em; display: block; line-height: 1.1; }
.brand-tag { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 600; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav > a:not(.nav-phone) {
  padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: .95rem; color: var(--muted);
  transition: color .15s, background .15s;
}
.site-nav > a:not(.nav-phone):hover { color: var(--blue-ink); background: #eef1f8; }
.site-nav > a.active { color: var(--blue); background: #e9edfa; }
.nav-phone { margin-left: 10px; padding: 9px 16px; font-size: .9rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.4px; background: var(--blue-ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(29, 63, 170, .10), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(226, 58, 69, .07), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  align-items: center; padding: 84px 0 90px; position: relative;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.12; letter-spacing: -.02em; color: var(--blue-ink);
}
.hero h1 .accent { color: var(--red); }
.hero-sub { margin: 20px 0 28px; max-width: 56ch; color: var(--muted); font-size: 1.06rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 42px; }
.stat strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--blue-ink); display: block; line-height: 1.1; }
.stat span { font-size: .85rem; color: var(--muted); }

.hero-visual { position: relative; min-height: 420px; }
.hero-ring {
  position: absolute; inset: 8% 4%;
  border: 1.5px dashed #c9d4ee; border-radius: 50%;
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.float-card {
  position: absolute; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
.float-card img { height: 130px; width: auto; object-fit: contain; margin-inline: auto; }
.float-label {
  display: inline-block; margin-top: 10px; font-family: var(--font-display);
  font-weight: 700; font-size: .85rem; color: var(--blue);
  background: #e9edfa; border-radius: 6px; padding: 3px 10px;
}
.fc-1 { top: 2%; left: 6%; transform: rotate(-3deg); z-index: 3; }
.fc-2 { top: 30%; right: 0; animation-delay: -2s; z-index: 2; }
.fc-3 { bottom: 0; left: 18%; animation-delay: -4s; transform: rotate(2.5deg); }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--red);
  margin-bottom: 10px;
}
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.01em; color: var(--blue-ink); }
.section-head p { margin-top: 12px; color: var(--muted); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-weight: 600; font-size: .85rem; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px -6px rgba(29, 63, 170, .5); }
.search-box {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; min-width: 240px; color: var(--muted);
}
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 63, 170, .12); }
.search-box input { border: 0; outline: 0; font: inherit; width: 100%; background: transparent; color: var(--ink); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #d4dcec; }
.card-media {
  background:
    radial-gradient(340px 130px at 50% 0%, rgba(29, 63, 170, .05), transparent),
    #fff;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: hidden;
}
.card-media img { max-height: 100%; object-fit: contain; transition: transform .25s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.card-cat {
  position: absolute; top: 14px; left: 14px;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-model { font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; color: var(--blue-ink); }
.card-name { font-size: .92rem; font-weight: 600; color: var(--ink); }
.card-tagline { font-size: .86rem; color: var(--muted); flex: 1; }
.card-link {
  margin-top: 12px; font-size: .88rem; font-weight: 700; color: var(--red);
  display: inline-flex; align-items: center; gap: 6px;
}
.card:hover .card-link { gap: 10px; }
.card-link .icon { transition: transform .2s; }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Applications ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.app-card {
  border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.app-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.app-card figcaption {
  padding: 14px 18px; font-weight: 700; font-size: .95rem; color: var(--blue-ink);
  border-top: 1px solid var(--line); background: #fff;
}

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.about-copy p { margin-bottom: 16px; color: var(--muted); }
.about-copy strong { color: var(--ink); }
.check-list { list-style: none; margin-top: 10px; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.check-list li::before {
  content: "✓"; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(22, 163, 74, .12); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; margin-top: 2px;
}
.about-side { display: grid; gap: 16px; }
.about-card {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff; border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--shadow-lg);
}
.about-card:nth-child(2) { background: linear-gradient(135deg, #b3242f, var(--red)); }
.about-card:nth-child(3) { background: linear-gradient(135deg, #b45309, var(--orange)); }
.about-card strong { font-family: var(--font-display); font-size: 1.9rem; display: block; line-height: 1.15; }
.about-card span { font-size: .92rem; opacity: .92; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4dcec; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: #e9edfa; color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 6px;
}
.contact-card strong { color: var(--blue-ink); }
.contact-value { color: var(--muted); font-size: .95rem; word-break: break-word; }

/* ---------- Detail view ---------- */
.detail-topbar { background: #fff; border-bottom: 1px solid var(--line); }
.detail-crumbs { display: flex; align-items: center; gap: 8px; padding: 16px 0; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.detail-crumbs a { color: var(--blue); font-weight: 600; }
.detail-crumbs a:hover { text-decoration: underline; }
.detail-section { padding: 56px 0 88px; }
.detail-head {
  display: grid; grid-template-columns: minmax(320px, 460px) 1fr; gap: 52px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 40px; box-shadow: var(--shadow-sm);
}
.detail-media {
  background: radial-gradient(400px 200px at 50% 0%, rgba(29, 63, 170, .06), transparent), #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 34px;
  align-self: start; position: sticky; top: 96px;
}
.detail-media img { max-height: 340px; object-fit: contain; }
.detail-cat {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.detail-info h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--blue-ink); letter-spacing: -.01em; }
.detail-info .model-tag { font-family: var(--font-display); color: var(--red); font-weight: 700; }
.detail-info .lead { margin: 14px 0 22px; color: var(--muted); font-size: 1.04rem; }
.detail-feats { list-style: none; display: grid; gap: 9px; margin-bottom: 26px; }
.detail-feats li { display: flex; gap: 10px; color: var(--ink); font-size: .96rem; }
.detail-feats li::before {
  content: "✓"; flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(22, 163, 74, .12); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; margin-top: 2px;
}
.detail-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-specs { margin-top: 46px; }
.detail-specs h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--blue-ink); margin-bottom: 18px; }
.spec-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 600; background: #fafbfe; }
.spec-table td { font-weight: 600; color: var(--blue-ink); }
.spec-table tr:nth-child(even) th { background: #f5f7fc; }
.related { margin-top: 64px; }
.related h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--blue-ink); margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-ink); color: #c7d0e8; margin-top: 40px; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 40px;
}
.footer-logo { width: 120px; border-radius: 10px; background: #fff; padding: 8px; margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; line-height: 1.65; }
.site-footer strong { color: #fff; font-size: .95rem; display: block; margin-bottom: 12px; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 9px; font-size: .93rem; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-social .social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #dfe6f7;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: background .15s, transform .15s;
}
.social-row a:hover { background: var(--red); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 0 70px; }
  .hero-visual { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .detail-head { grid-template-columns: 1fr; padding: 26px; gap: 30px; }
  .detail-media { position: static; }
}
@media (max-width: 760px) {
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 5%;
    display: none; box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.nav-phone) { padding: 12px 10px; }
  .nav-phone { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: block; }
  .search-box { margin-left: 0; width: 100%; }
  .hero-stats { gap: 26px; flex-wrap: wrap; }
  .section { padding: 64px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .spec-table th, .spec-table td { padding: 11px 14px; font-size: .88rem; }
  .detail-head { padding: 20px; }
  .detail-media img { max-height: 240px; }
}
