  :root{
    --bg:#000000;
    --fg:#ffffff;
    --fg-muted:rgba(255,255,255,0.56);
    --fg-faint:rgba(255,255,255,0.28);
    --line:rgba(255,255,255,0.14);
    --line-soft:rgba(255,255,255,0.08);
    --ease:cubic-bezier(0.16,1,0.3,1);
    --ease-soft:cubic-bezier(0.4,0,0.2,1);
  }

  *{margin:0;padding:0;box-sizing:border-box;}

  html,body{
    width:100%;
    height:100%;
    background:var(--bg);
    color:var(--fg);
    overflow:hidden;
  }

  body{
    font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
    font-weight:300;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
  }

  .view{
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px;
    padding-top:max(32px, env(safe-area-inset-top));
    padding-bottom:max(32px, env(safe-area-inset-bottom));
    padding-left:max(32px, env(safe-area-inset-left));
    padding-right:max(32px, env(safe-area-inset-right));
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .view::-webkit-scrollbar{
    display:none;
  }

  /* ---------- HOME ---------- */
  #home{
    flex-direction:column;
    gap:56px;
    opacity:0;
    transform:translateY(8px);
    animation:pageIn 1.1s var(--ease) forwards;
  }

  .logo-wrap{
    width:92px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .logo-wrap svg{
    width:100%;
    height:auto;
    display:block;
    fill:#ffffff;
  }

  .cta, .submit-btn, .home-btn{
    position:relative;
    background:transparent;
    border:1px solid var(--line);
    color:var(--fg);
    font-family:inherit;
    font-weight:400;
    letter-spacing:0.28em;
    text-transform:uppercase;
    cursor:pointer;
    border-radius:2px;
    transition:background-color .6s var(--ease-soft), border-color .6s var(--ease-soft), color .6s var(--ease-soft), box-shadow .6s var(--ease-soft), transform .3s var(--ease-soft);
    -webkit-tap-highlight-color:transparent;
  }

  .cta:hover, .submit-btn:hover, .home-btn:hover{
    background-color:#ffffff;
    border-color:#ffffff;
    color:#000000;
    box-shadow:0 0 0 1px #ffffff, 0 8px 30px rgba(255,255,255,0.14);
  }

  .cta:active, .submit-btn:active, .home-btn:active{
    transform:scale(0.97);
  }

  .cta{
    font-size:12.5px;
    padding:16px 42px;
  }

  /* ---------- CONTACT ---------- */
  #contact{
    display:none;
    flex-direction:column;
    align-items:center;
    gap:0;
  }

  .contact-inner{
    width:100%;
    max-width:420px;
    display:flex;
    flex-direction:column;
    align-items:center;
  }

  .back-arrow{
    position:fixed;
    top:38px;
    left:38px;
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    opacity:0.5;
    transition:opacity .4s var(--ease-soft), transform .4s var(--ease-soft);
    z-index:20;
  }

  .back-arrow:hover{
    opacity:1;
    transform:translateX(-3px);
  }

  .back-arrow svg{
    width:16px;
    height:16px;
    stroke:#ffffff;
  }

  .contact-title{
    font-size:12px;
    font-weight:400;
    letter-spacing:0.32em;
    text-transform:uppercase;
    color:var(--fg-muted);
    margin-bottom:48px;
    opacity:0;
    animation:fadeUp .8s var(--ease) forwards;
    animation-delay:.05s;
    transition:opacity .4s var(--ease-soft), margin-bottom .4s var(--ease-soft);
  }

  .contact-title.title-hidden{
    opacity:0 !important;
    margin-bottom:0;
    height:0;
    overflow:hidden;
    animation:none;
  }

  form#contactForm{
    width:100%;
    display:flex;
    flex-direction:column;
    gap:26px;
    transition:opacity .5s var(--ease-soft), transform .5s var(--ease-soft), filter .5s var(--ease-soft);
  }

  form#contactForm.hiding{
    opacity:0;
    transform:translateY(-10px) scale(0.98);
    filter:blur(4px);
    pointer-events:none;
  }

  .field{
    position:relative;
    opacity:0;
    animation:fadeUp .8s var(--ease) forwards;
  }

  .field:nth-of-type(1){animation-delay:.10s;}
  .field:nth-of-type(2){animation-delay:.16s;}
  .field:nth-of-type(3){animation-delay:.22s;}
  .field:nth-of-type(4){animation-delay:.28s;}
  .field:nth-of-type(5){animation-delay:.34s;}

  label{
    display:block;
    font-size:11px;
    letter-spacing:0.2em;
    text-transform:uppercase;
    color:var(--fg-faint);
    margin-bottom:10px;
    transition:color .3s var(--ease-soft);
  }

  input, textarea{
    width:100%;
    background:transparent;
    border:none;
    border-bottom:1px solid var(--line);
    color:var(--fg);
    font-family:inherit;
    font-size:15px;
    font-weight:300;
    padding:8px 2px 12px;
    outline:none;
    transition:border-color .45s var(--ease-soft);
    resize:none;
  }

  textarea{
    min-height:64px;
    line-height:1.6;
  }

  input:focus, textarea:focus{
    border-color:rgba(255,255,255,0.85);
  }

  input:focus ~ label, .field:has(input:focus) label,
  .field:has(textarea:focus) label{
    color:var(--fg-muted);
  }

  input::placeholder, textarea::placeholder{
    color:rgba(255,255,255,0.16);
  }

  .submit-row{
    margin-top:14px;
    display:flex;
    justify-content:center;
    opacity:0;
    animation:fadeUp .8s var(--ease) forwards;
    animation-delay:.40s;
  }

  .submit-btn{
    font-size:12.5px;
    font-weight:500;
    padding:15px 50px;
    min-width:160px;
    border-color:rgba(255,255,255,0.5);
  }

  .submit-btn:disabled{
    opacity:0.45;
    cursor:default;
  }

  .submit-btn:disabled:hover{
    background-color:transparent;
    border-color:rgba(255,255,255,0.5);
    color:var(--fg);
    box-shadow:none;
  }

  .submit-btn .btn-text{
    transition:opacity .25s var(--ease-soft);
  }

  .spinner{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    transition:opacity .25s var(--ease-soft);
    color:inherit;
  }

  .spinner svg{
    width:16px;
    height:16px;
    animation:spin 0.9s linear infinite;
  }

  .spinner svg circle, .spinner svg path{
    stroke:currentColor;
  }

  .submit-btn.loading .btn-text{opacity:0;}
  .submit-btn.loading .spinner{opacity:1;}

  /* ---------- SUCCESS ---------- */
  .success{
    position:absolute;
    top:44%;
    left:50%;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    opacity:0;
    transform:translate(-50%, calc(-50% + 10px));
    pointer-events:none;
    transition:opacity .7s var(--ease), transform .7s var(--ease);
    width:100%;
    max-width:380px;
  }

  .success.show{
    opacity:1;
    transform:translate(-50%, -50%);
    pointer-events:auto;
  }

  .check-circle{
    width:58px;
    height:58px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,0.3);
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:30px;
  }

  .check-circle svg{
    width:24px;
    height:24px;
  }

  .check-circle path{
    stroke:#ffffff;
    stroke-width:1.6;
    fill:none;
    stroke-linecap:round;
    stroke-linejoin:round;
    stroke-dasharray:24;
    stroke-dashoffset:24;
  }

  .success.show .check-circle path{
    animation:draw .6s var(--ease) forwards;
    animation-delay:.15s;
  }

  .success-msg{
    font-size:15px;
    font-weight:300;
    line-height:1.75;
    color:rgba(255,255,255,0.82);
    margin-bottom:36px;
    max-width:340px;
  }

  .home-btn{
    font-size:12px;
    letter-spacing:0.26em;
    padding:14px 36px;
  }

  /* ---------- KEYFRAMES ---------- */
  @keyframes pageIn{
    to{opacity:1; transform:translateY(0);}
  }
  @keyframes fadeUp{
    from{opacity:0; transform:translateY(10px);}
    to{opacity:1; transform:translateY(0);}
  }
  @keyframes spin{
    to{transform:rotate(360deg);}
  }
  @keyframes draw{
    to{stroke-dashoffset:0;}
  }

  @media (prefers-reduced-motion: reduce){
    *{
      animation-duration:0.01ms !important;
      animation-iteration-count:1 !important;
      transition-duration:0.01ms !important;
    }
  }

  /* ---------- TABLET (601px – 900px) ---------- */
  @media (min-width:601px) and (max-width:900px){
    .logo-wrap{width:82px;}
    #home{gap:48px;}
    .cta{padding:15px 38px; font-size:12px;}
    .home-btn{padding:14px 34px; font-size:11.5px;}
    .submit-btn{padding:14px 46px; min-width:150px;}
    .contact-inner{max-width:400px;}
    .contact-title{margin-bottom:40px;}
    form#contactForm{gap:22px;}
    .back-arrow{width:44px; height:44px; top:32px; left:32px;}
    .success-msg{margin-bottom:32px;}
    .check-circle{margin-bottom:28px;}
  }

  /* ---------- MOBILE (≤600px) ---------- */
  @media (max-width:600px){
    .view{padding:24px;}
    .view{
      padding-top:max(24px, env(safe-area-inset-top));
      padding-bottom:max(24px, env(safe-area-inset-bottom));
      padding-left:max(20px, env(safe-area-inset-left));
      padding-right:max(20px, env(safe-area-inset-right));
    }

    .logo-wrap{width:68px;}
    #home{gap:38px;}

    .cta{padding:14px 30px; font-size:11px; letter-spacing:0.24em;}
    .home-btn{padding:13px 30px; font-size:11px; letter-spacing:0.22em;}
    .submit-btn{padding:13px 0; font-size:11.5px; min-width:0; width:100%;}

    .back-arrow{
      width:44px; height:44px;
      top:max(18px, env(safe-area-inset-top));
      left:max(12px, env(safe-area-inset-left));
    }

    .contact-inner{max-width:100%;}
    .contact-title{font-size:10px; letter-spacing:0.26em; margin-bottom:30px;}

    form#contactForm{gap:18px;}

    label{font-size:10px; letter-spacing:0.16em; margin-bottom:6px;}

    input, textarea{
      font-size:16px;
      padding:7px 2px 9px;
    }

    textarea{min-height:44px;}

    .submit-row{margin-top:8px;}

    .check-circle{width:52px; height:52px; margin-bottom:24px;}
    .check-circle svg{width:21px; height:21px;}
    .success-msg{font-size:14px; line-height:1.65; margin-bottom:28px; max-width:300px;}
    .success{top:42%;}
  }

  /* ---------- SMALL PHONES (≤360px) ---------- */
  @media (max-width:360px){
    .logo-wrap{width:58px;}
    #home{gap:32px;}
    .cta{padding:13px 24px; font-size:10.5px; letter-spacing:0.2em;}
    .contact-title{font-size:9.5px; margin-bottom:24px;}
    form#contactForm{gap:15px;}
    .success-msg{font-size:13.5px; max-width:270px;}
  }

  /* ---------- SHORT / LANDSCAPE PHONES ---------- */
  @media (max-height:480px) and (orientation:landscape){
    .view{padding:16px;}
    #home{gap:22px;}
    .logo-wrap{width:52px;}
    .cta{padding:11px 26px; font-size:10.5px;}
    .contact-title{margin-bottom:16px;}
    form#contactForm{gap:12px;}
    .contact-title, .field, .submit-row{animation-duration:.5s;}
    textarea{min-height:36px;}
    .submit-row{margin-top:4px;}
    .check-circle{width:44px; height:44px; margin-bottom:14px;}
    .check-circle svg{width:18px; height:18px;}
    .success-msg{margin-bottom:16px; font-size:13px; line-height:1.5;}
    .success{position:static; transform:none; top:auto; left:auto; margin:0 auto;}
    .success.show{transform:none;}
  }

  /* ---------- UTILITIES (turvallisuuskorjaus: ei inline-tyylejä) ---------- */
  .opt{opacity:.5;}
  .success:focus{outline:none;} /* ohjelmallinen fokus onnistumisnäkymään, ei näkyvää kehystä */

  /* Honeypot-kenttä: näkymätön ihmiselle ja ruudunlukijalle, ei vaikuta asetteluun */
  .hp{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    overflow:hidden;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    white-space:nowrap;
    opacity:0;
    pointer-events:none;
  }
