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

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --blue:         #003F8A;
  --blue-mid:     #0052b3;
  --blue-dark:    #002B7F;
  --blue-deeper:  #001a5c;
  --gold:         #F5A623;
  --gold-light:   #FFD07A;
  --sand:         #F2E8D5;
  --bg:           #F0F4FB;
  --white:        #FFFFFF;
  --text:         #1A1A2E;
  --muted:        #64748b;
  --radius:       18px;
  --radius-sm:    10px;
  --shadow-card:  0 8px 32px rgba(0,43,127,.12);
  --shadow-hover: 0 20px 48px rgba(0,43,127,.22);
  --trans:        0.25s ease;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-deeper) 0%, var(--blue) 50%, var(--blue-mid) 100%);
  color: var(--white);
  padding: 0;
}

/* Israeli flag-inspired white stripes at top and bottom */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 9px;
  background: rgba(255,255,255,0.9);
  z-index: 2;
}
.hero::before { top: 0; }
.hero::after  { bottom: 0; }

.hero__inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 64px 24px 72px;
}

/* Star of David */
.hero__star {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  color: var(--gold-light);
  filter: drop-shadow(0 4px 20px rgba(245,166,35,.45));
  animation: starPulse 4s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 4px 20px rgba(245,166,35,.45)); }
  50%       { transform: scale(1.07); filter: drop-shadow(0 6px 28px rgba(245,166,35,.65)); }
}

.hero__title {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0,0,0,.25);
}

.hero__subtitle {
  margin-top: 12px;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  opacity: 0.8;
  font-weight: 400;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Animated star particles in hero background ──────────────────────────── */
.hero__stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__stars span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255,255,255, 0.18);
  animation: floatStar linear infinite;
}

/* Individual star sizes and positions */
.hero__stars span:nth-child(1)  { width:6px;  height:6px;  left:12%;  animation-duration:14s; animation-delay:0s;    top:30%; }
.hero__stars span:nth-child(2)  { width:4px;  height:4px;  left:25%;  animation-duration:18s; animation-delay:-4s;   top:60%; }
.hero__stars span:nth-child(3)  { width:8px;  height:8px;  left:40%;  animation-duration:12s; animation-delay:-2s;   top:20%; }
.hero__stars span:nth-child(4)  { width:3px;  height:3px;  left:55%;  animation-duration:20s; animation-delay:-7s;   top:70%; }
.hero__stars span:nth-child(5)  { width:5px;  height:5px;  left:70%;  animation-duration:16s; animation-delay:-1s;   top:40%; }
.hero__stars span:nth-child(6)  { width:4px;  height:4px;  left:82%;  animation-duration:13s; animation-delay:-5s;   top:55%; }
.hero__stars span:nth-child(7)  { width:7px;  height:7px;  left:5%;   animation-duration:17s; animation-delay:-9s;   top:75%; }
.hero__stars span:nth-child(8)  { width:3px;  height:3px;  left:90%;  animation-duration:15s; animation-delay:-3s;   top:25%; }
.hero__stars span:nth-child(9)  { width:6px;  height:6px;  left:60%;  animation-duration:19s; animation-delay:-6s;   top:80%; }
.hero__stars span:nth-child(10) { width:4px;  height:4px;  left:33%;  animation-duration:11s; animation-delay:-8s;   top:15%; }
.hero__stars span:nth-child(11) { width:5px;  height:5px;  left:77%;  animation-duration:22s; animation-delay:-2s;   top:50%; }
.hero__stars span:nth-child(12) { width:3px;  height:3px;  left:18%;  animation-duration:16s; animation-delay:-11s;  top:85%; }
.hero__stars span:nth-child(13) { width:8px;  height:8px;  left:48%;  animation-duration:14s; animation-delay:-4s;   top:90%; }
.hero__stars span:nth-child(14) { width:4px;  height:4px;  left:88%;  animation-duration:18s; animation-delay:-7s;   top:10%; }
.hero__stars span:nth-child(15) { width:6px;  height:6px;  left:65%;  animation-duration:12s; animation-delay:-13s;  top:65%; }

@keyframes floatStar {
  0%   { transform: translateY(0)    scale(1);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(-80px) scale(0.6); opacity: 0; }
}

/* ── Tools Section ───────────────────────────────────────────────────────── */
.tools-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 24px 64px;
}

.tools-header {
  margin-bottom: 32px;
}

.tools-heading {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.tools-sub {
  font-size: 1rem;
  color: var(--muted);
}

/* ── Card Grid ───────────────────────────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ── Tool Card ───────────────────────────────────────────────────────────── */
.tool-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  /* Strong shadow at the bottom for the "floating" look */
  box-shadow: 0 4px 8px rgba(0,43,127,.06), 0 12px 32px rgba(0,43,127,.12);
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
  cursor: pointer;
  /* Entrance animation */
  animation: cardEntrance 0.5s cubic-bezier(.22,1,.36,1) both;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tool-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 4px 8px rgba(0,43,127,.06), var(--shadow-hover);
}

.tool-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Coming-soon card is not clickable */
.tool-card--coming {
  cursor: default;
  pointer-events: none;
  opacity: 0.65;
}

/* ── Card Image Area ─────────────────────────────────────────────────────── */
.tool-card__img {
  height: 200px;
  background: linear-gradient(135deg, #f5ead8 0%, #efe4cb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmering overlay */
.tool-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.tool-card:hover .tool-card__img::after {
  transform: translateX(100%);
}

.tool-card__img svg {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 4px 12px rgba(0,43,127,.15));
  transition: transform var(--trans);
}
.tool-card:hover .tool-card__img svg {
  transform: scale(1.06);
}

.tool-card__img--soon {
  background: linear-gradient(135deg, #eef2f8 0%, #e4ecf5 100%);
}

/* ── Card Body ───────────────────────────────────────────────────────────── */
.tool-card__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tool-card__tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0,63,138,.08);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
}

.tool-card__tag--soon {
  color: var(--muted);
  background: rgba(100,116,139,.1);
}

.tool-card__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.tool-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.tool-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,63,138,.07);
}

.tool-card__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.2px;
}

.tool-card__arrow {
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
  transition: transform var(--trans);
}
.tool-card:hover .tool-card__arrow {
  transform: translateX(4px);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px 20px 32px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid rgba(0,63,138,.07);
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero__inner      { padding: 48px 20px 56px; }
  .hero__star       { font-size: 52px; }
  .tools-section    { padding: 36px 16px 48px; }
  .tools-grid       { gap: 18px; }
  .tool-card__img   { height: 170px; }
  .tool-card__img svg { width: 100px; height: 100px; }
}

@media (max-width: 380px) {
  .hero__title     { font-size: 2rem; }
  .tools-grid      { grid-template-columns: 1fr; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero__star                 { animation: none; }
  .hero__stars span           { animation: none; opacity: 0.1; }
  .tool-card, .tool-card__img svg,
  .tool-card__arrow           { transition: none; }
  .tool-card                  { animation: none; }
}
