/* ==========================================================================
   WUNDER – howitworks.css (embed)
   - No header/footer; just the interactive section for iframe usage
   - 100% width, fixed height (tweak --hiw-height)
   - Notebook screen overlay is positioned via CSS variables for pixel-perfect control
   ========================================================================= */

:root {
  /* Overall height of the embedded area (between 550-600px as requested) */
  --hiw-height: 690px; /* 710 680px; 580 px -- influences the space between Notebook and Cards !! */

  /* Notebook screen overlay box (relative to the notebook image box) */
  /* Tune these to match your PNG: */
  --screen-left: 14.3%;
  --screen-top: 11.3%;
  --screen-width: 71.3%;
  --screen-height: 71.5%;
  
   --screen-fit: cover;     /* 'cover' or 'contain' */
  --screen-obj-x: 50%;     /* object-position X (%, px) */
  --screen-obj-y: 50%;     /* object-position Y (%, px) */
  --screen-scale: 1;       /* 0.95–1.15 is usually enough */
  --screen-shift-x: 0px;   /* fine translation on X */
  --screen-shift-y: 0px;   /* fine translation on Y */

  /* Timings */
  --fade-duration: 500ms;
  --card-expand-duration: 280ms;
  --autoplay-card-visible-ms: 2000; /* JS reads this as a number; keep in sync */

  /* Visuals */
  --bg: #0b0c10;         /* Dark neutral under landing page */
  --ink: #e7ecef;        /* Light text */
  --muted: #a9b0b6;      /* Secondary text */
  --brand: #ff6500;      /* Accent (teal/green)  #34d399; */
  
  /* Cards */
  --card-width: 260px; /* 240 tweak 200–260px to taste */
  --card-bg: rgba(95, 174, 230,1.0);    /* Card background   #111318;*/
   --card-border: rgba(95, 174, 230, 0.5);    /* Card border  #1f2430; */
  /* --card-border: #ff6500;  Card border * #1f2430; */
  --cards-offset-y: 24px; /* try 12px–40px */
}




/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.0rem;
  font-family: neuehaasdisplaythin, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; 
  /* line-height: 1.45;  keep the previous line-height */
  
}


/* Root area sized for iframe , i.e. notebook and cards*/
.hiw { 
width: 100%; 
height: var(--hiw-height); 
display: grid; 
grid-template-rows: 1fr auto; 
gap: 30px;  /* Spacing between Notebook and Cards 16px; BUT needs to increase overall image height on top*/
padding: 5px 5px 5px 5px; /* 12px 16px 16px 16px;  */
/* background: red; */
}

/* Row 1: notebook */
.hiw-row--notebook { 
display: grid; 
place-items: center; 
min-height: 280px; /* 280px; */
/* background-color: blue; */
}

.notebook { 
position: relative; 
width: min(960px, 95%); 
aspect-ratio: 16 / 9; 
}

.notebook__img { 
width: 100%; 
height: 100%; 
object-fit: contain; 
display: block; 
/* background-color: green; */
} 

/* Dynamic screen overlay (positioned over the transparent area of the PNG) */
.screen { 
position: absolute; 
left: var(--screen-left); 
top: var(--screen-top); 
width: var(--screen-width); 
height: var(--screen-height); 
overflow: hidden; 
border-radius: 8px; 
background: #000; 
}

.screen__layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: var(--screen-fit);                /* was: cover */
  object-position: var(--screen-obj-x) var(--screen-obj-y);
  transform: translate(var(--screen-shift-x), var(--screen-shift-y)) scale(var(--screen-scale));
  transform-origin: center;
  opacity: 0; 
  transition: opacity var(--fade-duration) ease;
}

.screen__layer.is-visible { opacity: 1; }



/* CARDS */
/* Row 2: cards */

.hiw-row--cards { 
align-self: end; 
/* background: red; */
}



/* .cards — ensure horizontal 4-up layout */
.cards {
  display: grid; /* ADD */
  grid-template-columns: repeat(4, minmax(0, var(--card-width))); /* keep */
  gap: 12px; /* ADD: spacing between cards */
  justify-content: center; /* keep centering under the notebook */
  margin-inline: auto; /* keep */
  max-width: calc(4 * var(--card-width) + 3 * 12px); /* keep */
  /* optionally remove the debug background: background: transparent; */
}


.card { 
position: relative; 
background: rgba(95, 174, 230, 0.08); /* white;   var(--card-bg); */
color: black !important; 
border: 3px solid var(--card-border); 
border-radius: 24px; 
border-color: rgba(95, 174, 230, 0.42);    
padding: 14px 14px 14px 14px; 
min-height: 124px; 
isolation: isolate; 
transition: transform var(--card-expand-duration) ease, 
/* box-shadow: 0 18px 50px rgba(95, 174, 230, 0.18); */
backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
box-shadow var(--card-expand-duration) ease, 
border-color var(--card-expand-duration) ease; 
};


.card:hover { 
border-color: red; /*#2a3446; */
}

.card.is-active { 
transform: translateY(-8px); 
background: rgba(95, 174, 230, 0.20); 
box-shadow: 0 12px 24px rgba(95, 174, 230,.35);   /*  0 18px 36px rgba(95, 174, 230,.35); */
/* border-color: rgba(52,211,153,.35); */

}


/* Card TYPOGRAPHY */

/* Static Card part */

.card__title { 
margin: 0 0 10px 0; 
font-size: 1.6rem;; 
line-height: 1.0;
}

.card__kicker { 
margin: 0; 
color: black; /* var(--muted); */
font-size: 1.0rem; 
}


/* Dynamic Card part */

.card__dynamic { 
margin-top: 1px; /* 10px */
margin-bottom: 10px;
color: black; /* var(--ink); */
font-size: 0.9rem;
display: grid; 
/* gap: 8px; */
max-height: 0; 
overflow: hidden; 
transition: max-height var(--card-expand-duration) ease; 
}



.card.is-active .card__dynamic { 
max-height: 160px; 
}

.card__bullets { 
margin: 0; 
padding-left: 18px; 
color: var(--muted); 
}

.card__expand { 
position: absolute; 
right: 12px; 
bottom: 10px; 
border: none; 
background: transparent; 
/* color: var(--brand); */
font-size: 1.0rem;
font-weight: 600; 
cursor: pointer; 
padding: 6px 8px; /* 6px 8px; */
border-radius: 10px; 
color: #ff6500;
text-decoration: none; 
}

.card__expand:focus-visible { 
outline: 2px solid var(--brand); 
outline-offset: 2px; 
}


.card__expand link { 
color: #ff6500;
text-decoration: none; 
}



/* Responsive */


@media (max-width: 560px) {
  :root { --hiw-height: 560px; }
  .cards { grid-template-columns: 1fr; }
}

/* Reduced motion prefers less animation */
@media (prefers-reduced-motion: reduce) {
  :root { --fade-duration: 0ms; --card-expand-duration: 0ms; }
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, var(--card-width)));
    justify-content: center;
    max-width: calc(2 * var(--card-width) + 1 * 12px);
  }
}

@media (max-width: 560px) {
  .cards {
    grid-template-columns: minmax(0, var(--card-width));
    justify-content: center;
    max-width: var(--card-width);
  }
}



/* Overriding card with blue and orang */

.card { 
position: relative; 
background: radial-gradient(1200px 800px at 20% -10%, #2a1a80 0%, #0a0b18 40%, #03040a 100%);
/* background: rgba(95, 174, 230, 0.08); */
color: white !important; 
border: 1px solid var(--card-border); 
border-radius: 24px; 
border-color: rgba(42, 26, 128, 0.5);    
padding: 14px 14px 14px 14px; 
min-height: 124px; /* 124px; */
isolation: isolate; 
transition: transform var(--card-expand-duration) ease, 
/* box-shadow: 0 18px 50px rgba(95, 174, 230, 0.18); */
backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
box-shadow var(--card-expand-duration) ease, 
border-color var(--card-expand-duration) ease; 
};


.card:hover { 
border-color: #ff6500;  /*#2a3446; */
border: 1px solid #ff6500;
}

.card.is-active { 
transform: translateY(-8px); 
background: #ff6500; 
box-shadow: 0 12px 24px rgba(255, 101, 0,.35);   
border-color: rgba(255,101,0,.5); */

}


/* Card TYPOGRAPHY */

/* Static Card part */

.card__title { 
margin: 0 0 10px 0; 
font-size: 1.3rem;
line-height: 1.0;
font-weight: 600 !important;
}

.card__kicker { 
margin: 0; 
margin-top: 10px;
color: white !important; /* var(--muted); */
font-size: 0.9rem; 
}


/* Dynamic Card part */

.card__dynamic { 
margin-top: 1px; /* 10px */
margin-bottom: 10px;
color: white; /* var(--ink); */
font-size: 0.9rem;
display: grid; 
/* gap: 8px; */
max-height: 0; 
overflow: hidden; 
transition: max-height var(--card-expand-duration) ease; 
}



.card.is-active .card__dynamic { 
max-height: 160px; 
}

.card__bullets { 
margin: 0; 
padding-left: 18px; 
color: var(--muted); 
}

.card__expand { 
position: absolute; 
right: 12px; 
bottom: 10px; 
border: none; 
background: transparent; 
/* color: var(--brand); */
font-size: 0.9rem;
font-weight: 600; 
cursor: pointer; 
padding: 6px 8px; /* 6px 8px; */
border-radius: 10px; 
color: white;
text-decoration: none; 
}

.card__expand:focus-visible { 
outline: 2px solid var(--brand); 
outline-offset: 2px; 
}


.card__expand link { 
color: white;
text-decoration: none; 
}



/* Make number and title in ONE line */

.card__static .card__number {
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
}

.card__static .card__title {
  display: inline;      /* was block by default */
  margin: 0;            /* keeps the line tight (you already set this) */
  line-height: 1.0;     /* you already have this in your CSS */
}











