/* === SwishTask Landing Page === */

/* --- Variables --- */
:root {
  --bg-color: #0e0e0e;
  --card-bg: #1c1c1e;
  --card-hover: #252528;
  --text-main: #ffffff;
  --text-sub: #86868b;
  --accent: #0071e3;
  --gap-size: 20px;
}

/* --- Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}
body.i18n-ready { opacity: 1; }

/* --- Header --- */
header {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.05em;
}
.controls {
  display: flex;
  gap: 16px;
  align-items: center;
}
.reset-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.reset-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.2); }
.support-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  margin-left: 10px;
}

/* --- Language Selector --- */
.lang-selector {
  position: relative;
}
.lang-selector select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 28px 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.lang-selector select:hover {
  background: rgba(255, 255, 255, 0.15);
}
.lang-selector::after {
  content: '\25BC';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: #fff;
  pointer-events: none;
}

/* --- Grid Container --- */
.bento-grid {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}
.bento-grid.muuri-loaded { opacity: 1; }

/* --- Card Styles --- */
.bento-item {
  position: absolute;
  background-color: var(--card-bg);
  border-radius: 32px;
  padding: 32px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  margin: calc(var(--gap-size) / 2);
  transition: background-color 0.2s, transform 0.2s;
  border: 1px solid rgba(255,255,255,0.05);
}
.bento-item.swish-ready {
  background-color: var(--card-hover);
  border-color: var(--accent);
  cursor: grabbing;
  z-index: 50;
}
.bento-item.muuri-dragging {
  z-index: 100;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  border: 2px solid var(--accent);
  opacity: 0.9;
}
@media (hover: hover) {
  .bento-item:hover {
    background-color: var(--card-hover);
  }
}

/* --- Sizing --- */
.bento-item { width: calc(25% - var(--gap-size)); height: 240px; }
.col-span-2 { width: calc(50% - var(--gap-size)); }
.row-span-2 { height: calc(480px + var(--gap-size)); }

/* --- Card Content --- */
.label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
h2 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #fff;
}
p {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.card-content-overlay {
  position: relative;
  z-index: 2;
}
.card-img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  border-top-left-radius: 16px;
  box-shadow: -10px -10px 40px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
  pointer-events: none;
  transform: translate(15%, 25%);
}
.card-img.shift-up { transform: translate(15%, 5%); }

/* --- Hero Card --- */
.card-hero {
  background-color: #f5f5f7;
  background-image: url('../images/panorama_notext.png?v=4');
  background-size: cover;
  background-position: 120% center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 48px;
}
.card-hero.swish-ready,
.card-hero.muuri-dragging,
.card-hero:hover {
  background-color: #f5f5f7 !important;
}
.card-hero h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.1;
  color: #1d1d1f;
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
}
:lang(en) .card-hero h1,
:lang(de) .card-hero h1,
:lang(es) .card-hero h1,
:lang(fr) .card-hero h1 {
  font-size: 38px;
}
.card-hero .label {
  color: #555;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.card-hero p {
  color: #333;
  margin-bottom: 24px;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}
.hero-content {
  position: relative;
  z-index: 10;
  padding-left: 40px;
  max-width: 60%;
}
.app-store-badge-img {
  height: 48px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
}

/* --- Individual Cards --- */
.card-calendar { background: #1e1e20; }
.card-input { background: #1e1e20; }
.card-matrix { background: #1e1e20; }
.card-pipeline { background: #1e1e20; }

.card-haptics {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
}
.vibration-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: shake 2s infinite;
}
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(-2deg); }
  20%, 40%, 60%, 80% { transform: rotate(2deg); }
}

/* --- Features Card --- */
.feature-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.feature-tag {
  background: #333;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
}

/* --- Footer Card --- */
.card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.footer-copyright {
  margin-top: 8px;
  font-size: 12px;
}
.footer-links {
  margin-top: 12px;
  font-size: 12px;
}
.footer-links a {
  color: #666;
  text-decoration: none;
}
.producthunt-footer {
  display: inline-block;
  margin-top: 12px;
}
.producthunt-footer img {
  height: 40px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .bento-item { width: calc(50% - var(--gap-size)); }
  .col-span-2 { width: calc(100% - var(--gap-size)); }
  .row-span-2 { height: 400px; }
  .card-hero h1 { font-size: 36px; }
  .card-hero { background-position: 100% center; }
}

@media (max-width: 600px) {
  .bento-grid { padding: 0 10px 80px; }
  :root { --gap-size: 16px; }
  .bento-item { width: calc(100% - var(--gap-size)); }
  .col-span-2 { width: calc(100% - var(--gap-size)); }
  .row-span-2 { height: 420px; }
  .card-img { width: 80%; }
  .controls { flex-direction: column; align-items: flex-start; }

  .card-hero {
    justify-content: flex-start;
    padding-top: 32px;
    background-position: right bottom;
    background-size: 80%;
  }
  .hero-content {
    padding-left: 24px;
    max-width: 100%;
  }
  .card-hero h1 { font-size: 32px; }
}
