:root{
  /* BLUE Material 3 inspired */
  --primary:#0B57D0;
  --primary-soft:#E8F0FE;

  --surface:#F8FAFD;
  --card:#FFFFFF;

  --text:#1A1C1E;
  --text-soft:#5F6368;

  --outline:#E3E7EF;
  --shadow: 0 20px 40px rgba(0,0,0,0.06);

  --radius:24px;
}

/* Auto dark if no manual override */
@media (prefers-color-scheme: dark){
  :root{
    --surface:#0F141A;
    --card:#151B22;

    --text:#E3E7EF;
    --text-soft:#9AA0A6;

    --outline:#26303A;
    --primary:#6EA8FF;
    --primary-soft:#132C55;

    --shadow: 0 22px 55px rgba(0,0,0,0.45);
  }
}

/* Manual overrides via data-theme attribute */
:root[data-theme="light"]{
  --primary:#0B57D0;
  --primary-soft:#E8F0FE;
  --surface:#F8FAFD;
  --card:#FFFFFF;
  --text:#1A1C1E;
  --text-soft:#5F6368;
  --outline:#E3E7EF;
  --shadow: 0 20px 40px rgba(0,0,0,0.06);
}
:root[data-theme="dark"]{
  --surface:#0F141A;
  --card:#151B22;
  --text:#E3E7EF;
  --text-soft:#9AA0A6;
  --outline:#26303A;
  --primary:#6EA8FF;
  --primary-soft:#132C55;
  --shadow: 0 22px 55px rgba(0,0,0,0.45);
}

*{box-sizing:border-box}
html, body{min-height:100%}
body{
  margin:0;
  font-family:'Inter',system-ui;
  background:var(--surface);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}

/* Container with guaranteed side paddings on mobile */
.container{
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Top bar */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
  font-weight:800;
  letter-spacing:-0.2px;
}
.badge{
  width:36px;
  height:36px;
  border-radius:12px;
  background: var(--primary-soft);
  display:grid;
  place-items:center;
  color: var(--primary);
}

/* Theme toggle */
.toggle{
  border:1px solid var(--outline);
  background: var(--card);
  color: var(--text);
  border-radius:999px;
  padding:10px 14px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.toggle:hover{ transform: translateY(-1px); }
.toggle:active{ transform: translateY(0px); }
.icon{
  width:18px;
  height:18px;
  display:inline-block;
}

/* Header */
header{
  /* bigger padding above MakeevDevStudio */
  padding: 110px 0 60px;
  text-align:center;
}
h1{
  font-size: clamp(36px, 5vw, 52px);
  font-weight:800;
  margin:0 0 16px;
  letter-spacing:-0.8px;
}
.studio-hero {
  padding-block: clamp(48px, 6vw, 72px) 44px;
}
.studio-logo {
  display: block;
  width: clamp(120px, 12vw, 140px);
  height: auto;
  margin: 0 auto 24px;
}
.subtitle{
  font-size:18px;
  color:var(--text-soft);
  max-width:640px;
  margin: 0 auto;
  line-height:1.65;
}

/* Apps grid */
.apps{
  padding-block: 30px 110px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 34px;
}

/* Ensure nice spacing on narrow screens */
@media (max-width: 420px){
  .apps{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  padding:32px;
  border:1px solid var(--outline);

  display:flex;
  flex-direction:column;
  height:100%;

  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--outline) 70%, var(--primary) 30%);
}

.app-header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}
.app-icon{
  width:72px;
  height:72px;
  border-radius:20px;
  object-fit:cover;
  border:1px solid var(--outline);
  background:#fff;
}
.app-title{
  font-size:20px;
  font-weight:800;
  margin:0;
}
.app-desc{
  color:var(--text-soft);
  font-size:15px;
  line-height:1.65;
  margin: 0 0 28px;
}

.buttons{
  display:flex;
  gap:12px;
  flex-wrap:nowrap;
  margin-top:auto;
}

.btn{
  padding:11px 18px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  transition: all .18s ease;
  border:1px solid transparent;
  white-space: nowrap;
}

.btn-primary{
  background:var(--primary);
  color:white;
}
.btn-primary:hover{ opacity:.92; }

.btn-outline{
  border:1px solid var(--primary);
  color:var(--primary);
  background: transparent;
}
.btn-outline:hover{ background:var(--primary-soft); }

/* Footer */
.site-footer {
  padding-block: 34px 60px;
  border-top: 1px solid var(--outline);
  text-align:center;
  font-size:14px;
  color:var(--text-soft);
}
.site-footer p { margin: 0; line-height: 1.6; }
.site-footer p + p { margin-top: 14px; }
.site-footer a { overflow-wrap: anywhere; }

/* Shared navigation and accessible interaction. */
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
a { color: var(--primary); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: 12px;
}
.skip-link:focus { top: 12px; }
.topbar-inner { min-height: 70px; gap: 16px; }
.topbar > .topbar-inner { padding-inline: clamp(20px, 4vw, 48px); }
.brand { font-size: 15px; }
.buttons { flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.btn-primary { color: #fff; background: #0b57d0; }
.app-title a { color: inherit; text-decoration: none; }
.app-title a:hover { color: var(--primary); }
.app-icon { flex-shrink: 0; }

/* App detail pages share the homepage's colors and typography. */
.breadcrumb { padding-top: 30px; font-size: 14px; }
.breadcrumb a { text-decoration: none; }
.detail-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 64px;
  align-items: center;
  padding-block: 48px 64px;
  text-align: left;
}
.detail-hero h1 { max-width: 650px; font-size: clamp(36px, 4.5vw, 58px); line-height: 1.08; }
.product-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.product-icon { width: 88px; height: 88px; border-radius: 24px; border: 1px solid var(--outline); }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.6px; }
.platform { color: var(--text-soft); font-size: 14px; margin: 8px 0 0; }
.product-tagline { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; margin: 20px 0 16px; font-weight: 600; letter-spacing: -0.5px; }
.product-description { max-width: 560px; color: var(--text-soft); line-height: 1.75; margin: 0 0 28px; }
.product-meta { color: var(--text-soft); font-size: 13px; line-height: 1.6; margin: 18px 0 0; }
.hero-visual {
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  border-radius: 36px;
  background: var(--primary-soft);
}
.hero-visual img { display: block; width: min(100%, 246px); height: auto; border-radius: 18px; box-shadow: var(--shadow); }
.section-nav { display: flex; gap: 28px; flex-wrap: wrap; border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); padding: 20px 0; font-size: 14px; font-weight: 600; }
.section-nav a { text-decoration: none; }
.detail-section { padding-block: 56px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.section-heading h2, .resources h2 { font-size: 28px; letter-spacing: -0.6px; margin: 0; }
.section-heading p { color: var(--text-soft); font-size: 14px; margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.feature { border-top: 2px solid var(--outline); padding-top: 22px; }
.feature-number { color: var(--primary); font-size: 13px; font-weight: 700; }
.feature h3 { margin: 16px 0 10px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-soft); line-height: 1.7; font-size: 15px; }
.screenshots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.screenshots figure { min-width: 0; margin: 0; }
.screenshots a { display: block; border-radius: 14px; }
.screenshots img { display: block; width: 100%; height: auto; border: 1px solid var(--outline); border-radius: 14px; background: #fff; }
.screenshots figcaption { color: var(--text-soft); font-size: 12px; line-height: 1.5; margin-top: 12px; }
.section-note { color: var(--text-soft); line-height: 1.7; font-size: 14px; margin: 24px 0 0; }
.resources { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: var(--card); border: 1px solid var(--outline); border-radius: 24px; padding: 36px; margin-block: 16px 64px; }
.resources p { color: var(--text-soft); line-height: 1.7; }
.resources .support-email { display: inline-block; font-weight: 600; overflow-wrap: anywhere; }
.resource-links { list-style: none; padding: 0; margin: 20px 0 0; }
.resource-links li + li { border-top: 1px solid var(--outline); }
.resource-links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; text-decoration: none; font-size: 14px; min-height: 48px; }
.resource-links a::after { content: "↗"; }
@media (max-width: 900px) {
  .detail-hero { gap: 32px; }
  .screenshots { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 6px 20px; margin-inline: -6px; }
  .screenshots figure { flex: 0 0 220px; scroll-snap-align: start; }
  .resources { gap: 32px; }
}
@media (max-width: 640px) {
  .detail-hero { grid-template-columns: 1fr; padding-block: 32px 40px; }
  .detail-hero h1 { font-size: 38px; }
  .hero-visual { padding: 24px; }
  .hero-visual img { width: 200px; }
  .features { grid-template-columns: 1fr; gap: 24px; }
  .detail-section { padding-block: 36px; }
  .section-nav { gap: 24px; }
  .resources { grid-template-columns: 1fr; padding: 24px; margin-bottom: 40px; }
  .card { padding: 24px; }
  .brand { font-size: 14px; }
  .toggle { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .card:hover, .toggle:hover { transform: none; }
}
