:root{
    --bg: #07090f;
    --fg: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.72);
    --hair: rgba(255,255,255,0.10);
    --card: rgba(10,12,20,0.60);
    --card2: rgba(10,12,20,0.35);
    --shadow: 0 30px 80px rgba(0,0,0,0.55);
    --radius: 18px;
    --max: 980px;
  }
  
  *{ box-sizing: border-box; }
  html,body{ height:100%; }
  body{
    margin:0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    background: var(--bg);
    color: var(--fg);
    overflow-x:hidden;
  }
  
  /* Ensure all text uses monospace */
  * {
    font-family: inherit;
  }
  
  .wrap{
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
  }
  
  a{ color: var(--fg); text-decoration: none; }
  a:hover{ text-decoration: underline; }
  
  .topbar{
    position: fixed;
    top: 0;
    left:0;
    right:0;
    z-index: 20;
    background: linear-gradient(to bottom, rgba(7,9,15,0.80), rgba(7,9,15,0));
    backdrop-filter: blur(10px);
  }
  
  .topbar-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 18px 0;
  }
  
  .brand{
    letter-spacing: 0.08em;
    text-transform: lowercase;
    font-weight: 650;
    font-size: 14px;
    opacity: 0.95;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
  }

  .brand:hover{
    opacity: 1;
    text-decoration: none;
  }
  
  .nav{
    display:flex;
    gap: 18px;
    font-size: 14px;
    opacity: 0.85;
  }
  
  main{
    position: relative;
    z-index: 10;
  }
  
  .bg-stage{
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #05070c;
  }
  
  .bg-frame{
    position:absolute;
    inset:0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    filter: saturate(1.1) contrast(1.05);
    will-change: background-image;
    filter: saturate(1.0) contrast(1.12) brightness(0.95);
  }
  
  .bg-overlay{
    position:absolute;
    inset:0;
    background:
    radial-gradient(1200px 600px at 50% 30%, rgba(120,240,255,0.08), rgba(255,255,255,0.00) 58%),
    linear-gradient(to bottom, rgba(7,9,15,0.20), rgba(7,9,15,0.82));
    pointer-events:none;
  }
  
  .bg-vignette{
    position:absolute;
    inset:-2px;
    background: radial-gradient(90% 70% at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.70) 100%);
    pointer-events:none;
  }
  
  .scroll-scene{
    /* creates scroll distance to scrub frames */
    min-height: 240vh;
    padding-top: 110px;
    padding-bottom: 80px;
  }
  
  .hero{
    margin-top: 40px;
    padding: 26px 24px;
    border: 1px solid var(--hair);
    border-radius: var(--radius);
    background: linear-gradient(to bottom, var(--card), var(--card2));
    box-shadow: var(--shadow);
  }
  
  .hero h1{
    margin: 0 0 14px 0;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: 0.02em;
    line-height: 1.15;
    font-weight: 600;
  }
  
  .hero p{
    margin: 12px 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }

  .hero ul, .hero ol{
    margin: 14px 0 14px 20px;
  }

  .hero li{
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }
  
  .lede{
    font-size: 18px;
    color: rgba(255,255,255,0.86);
  }
  
  .hint{
    margin-top: 18px;
    display:flex;
    align-items:center;
    gap: 10px;
    color: rgba(255,255,255,0.82);
    font-size: 14px;
    opacity: 0.9;
  }
  
  .hint .dot{
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 0 18px rgba(255,255,255,0.55);
  }
  
  .bg-spacer{
    /* Creates scroll distance for background animation between sections */
    height: 50vh;
    min-height: 400px;
    width: 100%;
    pointer-events: none;
  }

  .content{
    padding: 90px 0;
  }
  
  .content .wrap{
    padding: 26px 24px;
    border: 1px solid var(--hair);
    border-radius: var(--radius);
    background: linear-gradient(to bottom, var(--card), var(--card2));
    box-shadow: var(--shadow);
  }
  
  .content h2{
    margin: 0 0 10px 0;
    font-size: 26px;
    letter-spacing: 0.02em;
    font-weight: 600;
  }
  
  .content p, .content li{
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }
  
  .content ul, .content ol{
    margin: 14px 0 14px 20px;
  }

  .machine-item{
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid var(--hair);
  }

  .machine-item:first-of-type{
    margin-top: 20px;
    border-top: none;
    padding-top: 0;
  }

  .machine-item h3{
    margin: 0 0 12px 0;
    font-size: 20px;
    letter-spacing: 0.02em;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
  }

  .machine-item p{
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }

  .example-header{
    margin: 28px 0 18px 0;
    font-size: 18px;
    letter-spacing: 0.02em;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
  }

  .video-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 0;
  }

  .video-footer{
    margin: 24px 0 0 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
    text-align: center;
  }

  .video-footer a{
    color: rgba(255,255,255,0.92);
    text-decoration: underline;
  }

  .video-footer a:hover{
    color: rgba(255,255,255,1);
  }

  .video-wrapper{
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20,25,35,0.8), rgba(15,20,30,0.9));
    border: 1px solid var(--hair);
    aspect-ratio: 16 / 9;
  }

  .example-video{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(0,0,0,0.3);
  }

  .example-video:focus{
    outline: 2px solid rgba(255,255,255,0.4);
    outline-offset: 2px;
  }

  .video-poster{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 2;
    visibility: visible;
  }

  .video-poster::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20,25,35,0.15), rgba(15,20,30,0.2));
    z-index: 1;
    pointer-events: none;
  }

  .video-tile-1 .video-poster{
    background-image: url('https://storage.googleapis.com/machine-for-film-website/images/video_tile_1.jpg');
  }

  .video-tile-2 .video-poster{
    background-image: url('https://storage.googleapis.com/machine-for-film-website/images/video_tile_2.jpg');
  }

  .video-tile-3 .video-poster{
    background-image: url('https://storage.googleapis.com/machine-for-film-website/images/video_tile_3.jpg');
  }

  .video-wrapper.playing .video-poster{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .play-icon{
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.95);
    border: 2px solid rgba(255,255,255,0.3);
    padding-left: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .video-poster:hover .play-icon{
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,0,0,0.3);
  }

  .profile-item{
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid var(--hair);
  }

  .profile-item:first-of-type{
    margin-top: 20px;
    border-top: none;
    padding-top: 0;
  }

  .profile-item h3{
    margin: 0 0 12px 0;
    font-size: 20px;
    letter-spacing: 0.02em;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
  }

  .profile-item p{
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }

  .contact-info{
    margin-top: 20px;
  }

  .contact-info p{
    margin: 16px 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
    letter-spacing: 0.01em;
  }

  .contact-info strong{
    color: rgba(255,255,255,0.92);
    font-weight: 600;
  }
  
  .footer{
    padding: 70px 0 90px 0;
  }
  
  .footer-inner{
    display:flex;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255,255,255,0.70);
    font-size: 14px;
    opacity: 0.9;
  }
  
  .small{ opacity: 0.9; }
  
  @media (max-width: 720px){
    .nav{ display:none; }
    .hero, .content .wrap{ padding: 22px 18px; }
    .video-grid{
      grid-template-columns: 1fr;
      gap: 16px;
    }
  }
  
  /* Respect reduced motion: keep a static poster frame */
  @media (prefers-reduced-motion: reduce){
    .bg-frame{ transition: none !important; }
  }