:root {
  --site-header:  var(--alfred-teal-dark);
}

/**********/
/* Header */
/**********/

body > header                    { padding: 0 60px; background: var(--alfred-teal) linear-gradient(rgba(75,172,188,1.0), rgba(46,135,150,0.90)); }
body > header > div              { max-width: calc(var(--site-main-max-width) - 10px); height: 550px; margin: 0 auto; position: relative; }
body > header > div > img        { position: absolute; width: 425px; height: 352px; right: 0px; top: 100px; }
body > header > div > div        { padding: 0 470px 0 0; height: 550px; display: table-cell; vertical-align: middle; }
body > header h1                 { margin: 0 0 2px 0; padding: 0; color: #fff; font-size: 4.8em; line-height:1em; }
body > header h2                 { margin: 0; padding: 0; color: rgba(255, 255, 255, 0.4); font-size: 2.2em; }
body > header p                  { margin: 24px 0; color: #fff; }
body > header a                  { background-color: #fff; border-radius: 4px; color: var(--alfred-teal-dark); padding: 14px 20px; margin: 12px 12px 10px 0; display: inline-block; }

@media screen and (max-width: 1060px) {
  body > header             { padding: 0 20px; }
  body > header > div       { height: auto; }
  body > header > div > img { position: relative; display:block; max-width: 266px; height: auto; right: auto; top: auto; margin:0 auto; padding: 30px 0 10px 0; }
  body > header > div > div { position: relative; display:block; height: auto; margin: 0; padding: 20px 0 20px 0; text-align: center; }
  body > header h1          { font-size: 3.9em; margin-bottom: 10px; }
  body > header h2          { font-size: 1.8em; }
  body > header p           { max-width: 680px; margin: 24px auto; }
  body > header a           { margin: 10px 5px 20px 5px; }
}

@media screen and (max-width: 420px ) {
  body > header h1 { font-size: 3.3em; }
  body > header a  { margin: 10px 0; display: block; }
}

/************************/
/* Make Alfred Your Own */
/************************/

@property --turn {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

@keyframes orbit {
  from { --turn: 0; }
  to { --turn: 19; }
}

main > section#makealfredyourown {
  background: #202020 url('/media/6/powerpack/starfield.jpg') no-repeat center top;
  background-size: auto 100%;
  box-shadow: inset 0 125px 125px -125px rgba(1, 0, 0, 0.7), inset 0 -125px 125px -125px rgba(0, 0, 0, 0.5);
  > div {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 160px 0 250px 0;
    text-align: center;
    h2 { font-size: 2.6em; }
    > img {
      filter: invert(46%) sepia(100%) saturate(308%) hue-rotate(140deg) brightness(81%) contrast(87%);
      width: 80px;
      height: 80px;

      position: absolute;
      animation: orbit 20s linear infinite;

      --rx: 440px;
      --ry: 220px;
      --base: calc((var(--i) + var(--turn)) * 1turn / 19);

      --angle: atan2(sin(var(--base)) * 1.2, cos(var(--base)));
      --p-angle: calc(var(--angle) - 0.25rad * cos(var(--angle)));

      left: calc(50% + var(--rx) * cos(var(--p-angle)));
      top: calc(46% + var(--ry) * sin(var(--p-angle)));

      --y: sin(var(--angle));

      transform: translate(-50%, -50%) scale(calc(1 + var(--y) * 0.55));
      xz-index: calc(var(--y) * 100);
      opacity: calc(0.65 + var(--y) * 0.35);
    }
  }
}

/************/
/* Features */
/************/

main > section#powerpackfeatures > section {
  background: #173E47;
  padding: 50px 20px;
  margin: 0;

  /* main block styling */
  > div {
    width: 100%;
    max-width: calc(var(--site-main-max-width) - 10px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    > img {
      flex: 1 1 0%;
      min-width: 0;
      &.decorated {
        border-radius: 24px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
      }
    }
    > div {
      flex: 0 0 460px;
    }
  }

  /* even items different colour */
  &:nth-child(even) {
    background: #2a2a2a;
    box-shadow: inset 0 25px 25px -25px rgba(1, 0, 0, 0.3), inset 0 -25px 25px -25px rgba(0, 0, 0, 0.2);
    > div {
      flex-direction: row-reverse;
      text-align: right;
    }
  }

}

/* Responsive */
@media screen and (max-width: 1100px) {
  main > section#powerpackfeatures > section:not(#alfredui) {
    > div {
      flex-direction: column;
      > img {
        display: block;
        width: 100%;
        max-width: 740px;
        height: auto;
      }
      > div { padding: 10px 0 20px 0; flex: 1 1 0%; text-align: center; max-width: 740px; }
    }
  }
}

/*********************/
/* Alfred UI feature */
/*********************/

main > section#powerpackfeatures > section#alfredui {
  padding: 80px 20px 0px 20px;
  box-shadow: inset 0 125px 125px -125px rgba(1, 0, 0, 0.3), inset 0 -125px 125px -125px rgba(0, 0, 0, 0.6);
  > div {
    display: block;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 1500px;
    > div {
      max-width: 800px;
      margin: 0 auto;
      padding: 0 0 20px 0;
      text-align: center;
    }
    > img {
      margin: 0;
      padding: 0;
      display: block;
    }
  }
}

/*******************/
/* Workflow Editor */
/*******************/

main>section#workfloweditor {
  background: var(--alfred-teal) linear-gradient(rgba(255,255,255,0.1), rgba(0,0,0,0.4));
  > div {
    padding: 40px 20px;
    text-align: center;
  }
  > div {
    img {
      width: 1240px;
    }
    p {
      max-width: 860px;
      margin: 20px auto 0;
    }
  }
}

/*************/
/* Much More */
/*************/

main > section#muchmore {
  text-align: center;
  padding: 30px 20px 40px 20px;
  p {
    max-width: 600px;
    margin: 20px auto;
  }
}
