#hero {
  grid-template-rows: minmax(0, 1fr) 3.3rem 4% clamp(10rem, 17dvw, 10rem) clamp(10dvh, 20%, 15dvh) 3dvh;
  grid-column:1/-1;
  grid-row:2;
}
#hero > #hero-marquee {
  border-bottom: none;
  padding: 0;
}
#hero #h-a-2 {
  grid-column: 1/-1;
  grid-row: 4;
}
#hero #h-a-2 .x-b-label .s-99 {
  display:none;
}
#hero > div:has(.txt) {
  border-top: solid 1px var(--color-borders);
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-direction:column;
}
#hero a[href="./realisations.html"] {
  grid-column: -2/-1;
  grid-row: 3;
  color: var(--color-deep-forest);
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: Sen;
  width:100%;
  height:100%;
  background-image:none;
  border-top: solid 1px var(--color-borders);
  border-left: solid 1px var(--color-borders);
  container-type: inline-size;
}
#hero > a[href="./realisations.html"] svg {
  margin-left: auto;
  width: max(28px, 3.5cqh);
  height: auto;
  color:currentColor;
}
@media(hover: hover) and (pointer: fine) {
  #hero a[href="./realisations.html"]:hover {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
}  
@keyframes arrow-in {
  from {
    transform: translateX(-8px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
#hero-frame__content #hero-scene {
  top:0;
  left: 17%;
  height: 90%;
  width:auto;
  margin-top: 5%;
}
#hero-brand-name-svg {
  clip-path: inset(0 100% 0 0);
  opacity: 1;
  transform: translateX(-50px) translateY(550px) scale(1.2);
}
#hero-brand-name-svg.is-visible {
  clip-path: inset(0 0 0 0);
  transition: clip-path 600ms ease-in-out;
}
#hero-marquee {
  overflow: hidden;
  grid-column: 1/-1;
  grid-row: -1;
  display: flex;
  border-top: solid 1px var(--color-borders);
  align-items: center;
}
#hero-marquee > div {
  display: flex;
  width: 100%;
  gap: 28px;
  container-type: inline-size;
}
#hero-marquee span {
  --height: .8cqw;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: var(--height);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}
#hero-marquee svg {
  width: auto;
  height: var(--height);
  flex: 0 0 16px;
  fill: none;
  color: rgb(173, 173, 173);
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
@keyframes marquee {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
[data-typewriter] {
  display: block;
  min-width: 100%;
}
.typewriter-character {
  opacity: 0;
}
#hero-browser {
  width: 100%;
  height: 100%;
  display: block;
}
#hero-frame__content > div > svg image {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 20%;
  left: 20%;
  clip-path: inset(100% 0 0 0);
  animation: reveal-bottom 700ms cubic-bezier(.22, .8, .32, 1) forwards;
  animation-delay: 700ms;
}
@keyframes reveal-bottom {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
#hero #hero-works {
  display:flex;
  overflow: hidden;
  justify-content: space-between;
  padding: 0;
  border-top: solid 1px var(--color-borders);
  grid-column: 1/-1;
  grid-row: 4;
}
#hero #hero-works > div {
  display:flex;
}
#hero #hero-works > div:has(a) {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  width: 100%;
}
#hero #hero-works > div:has(a) div:has(> a) {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 28px;
  height: 100%;
}
#hero #hero-works > div:has(a) div:has(> a) a {
  position: relative;
  height: 100%;
  min-height: 100%;
  min-width: 18%;
  padding: 1.2rem 0.9rem;
  display: flex;
  justify-content: center;
}
#hero #hero-works div:has(a) > a svg {
  height: 100%;
  width: auto;
}
#hero #hero-works .dashed-edge {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: url("../images/border-dashed-vertical.svg") repeat-y top right;
  background-size: 1px 16px;
  pointer-events: none;
}

#a-a {
  width: 100%;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto auto auto auto;
}
#a-a-1 {
  grid-column:1;
  grid-row:1;
  border-bottom: solid 1px var(--color-borders);
  border-right: solid 1px var(--color-borders);
}
#a-a-1 > div:has(svg) {
  background-color: var(--color-deep-forest);
}
#a-a-1 h2 {
  font-size: clamp(20px, var(--h1-size), 100px);
}
#a-a-2
#a-a-3,
#a-a-4,
#a-a-5 {
  display:none;
}

#a-b {
  grid-column:1/-1;
  grid-row:2;
  display:grid;
  grid-template-columns: 1fr;
  grid-template-rows: clamp(100px, 20dvh, 300px) auto auto auto;
  padding: 1px;
  border-bottom: solid 1px var(--color-borders);
}
#a-b > *:is(h2){
  margin: 0;
}
#a-b #a-b-2 {
  grid-column: 1/-1;
  grid-row: 1;
}
#a-b #a-b-2 :is(h2, p h3) {
  margin-block: 0;
}
#a-b #a-b-3 {
  grid-column: 1/-1;
  grid-row: 2/-1;
  display:flex;
  flex-direction:column;
  gap: 3dvh;
}
#a-b #a-b-3 > div:not(:has(.svg-container)) {
  padding: 0 .8rem 0  0;
}
#a-b #a-b-3 > div:not(:has(.svg-container)) > p:not(:first-child) {
  padding-top: .3rem;
}
#a-b #a-b-3 > div:has(.svg-container) {
  padding: 10px;
  width: 100%;
  min-width: 40%;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-height: 40dvh;
  margin: 0 0 0.3rem 0;
}
#a-b #a-b-3 > div > div.svg-container:nth-of-type(1) {
  --y-rem-svg-1: 4.4rem;
  display: flex;
  flex-direction: column;
  height: 30%;
}
#a-b #a-b-3 > div > div.svg-container:nth-of-type(2) {
  height: 70%;
}
#a-b #a-b-3 > div > div.svg-container:nth-child(1) svg:nth-of-type(1) {
  height: var(--y-rem-svg-1);
  width: auto;
  top: 0;
  left: 0;
}
#a-b #a-b-3 > div > div.svg-container:nth-child(1) svg:nth-of-type(2) {
  --height-rem: 1.8rem;
  width:auto;
  height: var(--height-rem);
  top: 0;
  right: 0;
}
#a-b #a-b-3 > div > div.svg-container:nth-child(2) svg.svg-frame__dots {
  width: 100%;
  height: 100%;
}
#a-b-1 {
  --loop-duration: 8s;
}
.animated-item {
  opacity: 0;
  animation: show-and-hide var(--loop-duration) linear infinite;
}
#a-b-1 .item-1 { animation-delay: 0s; }
#a-b-1 .item-2 { animation-delay: 0s; }
#a-b-1 .item-3 { animation-delay: 0s; }
@keyframes show-and-hide {
  0%, 100% { opacity: 0; }
  8%, 69%  { opacity: 1; }
  77%      { opacity: 0; }
}
#a-b-1 .item-1 {
  animation-name: item-one;
}
@keyframes item-one {
  0%       { opacity: 0; }
  8%       { opacity: 1; }
  69%      { opacity: 1; }
  77%,100% { opacity: 0; }
}
#a-b-1 .item-2 {
  animation-name: item-two;
}
@keyframes item-two {
  0%,10%   { opacity: 0; }
  18%,79%  { opacity: 1; }
  87%,100% { opacity: 0; }
}
#a-b-1 .item-3 {
  animation-name: item-three;
}
@keyframes item-three {
  0%,20%   { opacity: 0; }
  28%,89%  { opacity: 1; }
  97%,100% { opacity: 0; }
}
@media(prefers-reduced-motion: reduce) {
  .animated-item {
    animation: none;
    opacity: 1;
  }
}

#a-c {
  grid-column:1/-1;
  grid-row:3;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto;
  border-right: solid 1px var(--color-borders);
}
#a-c > div:has(h3) {
  grid-column:1;
  grid-row:1;
}
#a-c #a-c-1 {
  width:15dvw;
  height:30dvh;
  grid-column:2;
  grid-row:2/-1;
  background-color: #a6a6a6;
}
#a-c #a-c-2 {
  grid-column:1;
  grid-row:2/-1;
}

#a-d {
  grid-column:1/-1;
  grid-row:4;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto auto;
}
#a-d > div:has(h3) {
  grid-column:2/-1;
  grid-row:1;
}
#a-d #a-d-1 {
  grid-column:1;
  grid-row:2;
  width:15dvw;
  height:30dvh;
  background-color: #a6a6a6;
}
#a-d #a-d-2 {
  grid-column:2;
  grid-row:2/-1;
}

#b-a {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows:   auto auto auto auto;
}
#b-a ul {
  display: grid;
  grid-template-columns: auto;
  grid-template-rows:   auto auto auto;
  grid-column: 1/-1;
  grid-row: 2;
}
li:has(#b-a-1) {
  grid-column: 1/-1;
  grid-row: 1;
}
li:has(#b-a-2) {
  grid-column: 1/-1;
  grid-row: 2;
}
li:has(#b-a-3) {
  grid-column: 1/-1;
  grid-row: 3;
}

#contact {
  min-height: 130dvh;
  margin-top: 40dvh;
  display:grid;
  grid-template-columns: 1fr;
  grid-template-rows: 20dvh repeat(5, auto) minmax(20dvh, auto) 14dvh;
  /* @BUG: 10 row lines but row stop at 8; */
}
#contact header {
  display:flex;
  align-items: center;
  justify-content: center;
  container-type: inline-size;
  border-bottom: solid 1px var(--color-borders);
}
#contact h2 {
  font-family: SpaceGroteskVariable, monospace;
  font-size: clamp(1rem, 3cqh, 1.5rem); /*container is the parent div */
  margin: 0;
}
#contact form {
  grid-column: 1/-1;
  grid-row: 2/-1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
}
#contact form > *:not(.is-hidden, #form-contact-error, #form-contact-success) {
  position: relative;
  min-height: 4rem;
  display: flex;
  align-items: center; 
}
#contact form > * input  {
  width: 100%;
  height: 100%;
  padding-left: 1em;
  background: transparent;
}
#contact form > * label {
  font-family: SpaceGroteskVariable;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  transform-origin: left center;
  transition: top 450ms ease, transform 200ms ease, font-size 200ms ease; /*mobile are slow on these*/
  pointer-events: none;
  display: flex;
  gap: 15px;
  padding-left: 5%;
}
#contact form > *:focus-within label,
#contact form > *:has(input:not(:placeholder-shown)) label,
#contact form > *:has(select, textarea) label {
  /* these rules require input to have the placeholder=" " in them */
  top: 10px;
  transform: translateY(0);
  font-size: 0.75rem;
  opacity: 0.4;
}
#contact textarea:not(:placeholder-shown) {
  font-size: 0.8rem;
}
#contact form > .form-field select {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 1.5rem 3rem 0.25rem 5%;
  appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
}
#contact form > .form-field > svg {
  position: absolute;
  right: 3%;
  top: 50%;
  width: 12px;
  height: 7px;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 250ms ease;
  pointer-events: none;
}
#contact form > .form-field:has(select:open) > svg {
  transform: translateY(-50%) rotate(180deg);
}
#contact form > * label svg {
  width: clamp(5px, 7%, 15px);
  align-self: start;
}
#contact form > .form-field::before,
#contact form > .form-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-repeat: repeat-x;
  transition: opacity 500ms ease;
}
#contact form > .form-field::after {
  background-image: url("../images/border-dashed.svg");
  opacity: 1;
}
#contact form > .form-field::before {
  background-image: url("../images/border-selected.svg");
  opacity: 0;
}
#contact form > .form-field:focus-within::after {
  opacity: 0;
}
#contact form > .form-field:focus-within::before {
  opacity: 1;
}
#contact form > *:focus-within label {
  top: 10px;
  transform: translateY(0);
  font-size: 0.75rem;
  opacity: 0.4;
}
#contact form > .form-field textarea {
  z-index: 4;
  padding-inline: 1.1em;
  padding-top: 1.6rem;
  width: 100%;
  min-width: 100%;
  height: 80%; /*space needed for label */
  min-height: 350px;
  box-sizing: border-box;
  resize: vertical;
  background-color: #ffffff59;
  border: 0;
  outline: none;
}
#contact form .form-contact-footer {
  display: flex;
  flex-direction: column;
}
#contact form p {
  opacity:.7;
  font-size: .6rem;
}
#contact form .form-contact-footer button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 52px;
  padding: 0.8rem 2rem;
  font-family: SpaceGroteskVariable, monospace;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-borders);
  cursor: pointer;
  transition:
    color 250ms ease,
    background-color 250ms ease,
    border-color 250ms ease;
}
#contact form button:hover {
  color: var(--color-bg);
  background-color: var(--color-text);
  border-color: var(--color-text);
}
#contact form button:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 4px;
}
.circumference-button {
  --button-width: 100%;
  --button-height: 56px;
  --line-width: 1px;
  --animation-speed: 4s;
  position: relative;
  width: var(--button-width);
  height: var(--button-height);
  display: grid;
  place-items: center;
  color: var(--color-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  border: solid 1px var(--color-borders);
}
#contact form .circumference-button span {
  position: relative;
  z-index: 1;
  margin-inline: auto;
}
#contact form .circumference-button.sending {
  display:revert;
}
#contact form .circumference-button svg {
  display:none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
#form-contact-success:not(.is-hidden), 
#form-contact-error:not(.is-hidden) {
  display: flex;
  flex-direction: column;
  margin-block: 1em;
  /* replacing the infos text */
  grid-column: 1/-1; 
  grid-row: 6;
}
#form-contact-success h3,
#form-contact-error h3{
  width: 100%;
  display: flex;
  gap: 10px;
}
#contact form .circumference-button rect {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--line-width);
  stroke-dasharray: 15 85;
  stroke-dashoffset: 0;
  animation: button-circumference var(--animation-speed) linear infinite;
}
@keyframes button-circumference {
  to {
    stroke-dashoffset: -100;
  }
}
#contact header {
  grid-column: 1/-1;
  grid-row: 1;
}
#contact form > :nth-child(1) {
  grid-column: 1/-1;
  grid-row: 1;
}
#contact form > :nth-child(2) {
  grid-column: 1/-1;
  grid-row: 2;
}
#contact form > :nth-child(3) {
  grid-column: 1/-1;
  grid-row: 3;
}
#contact form > :nth-child(4) {
  grid-column: 1/-1;
  grid-row: 4;
}
#contact form > :has(textarea) {
  grid-column: 1/-1;
  grid-row: 5;
}
#contact form > :nth-child(6) {
  grid-column: 1/-1;
  grid-row: 6;
}
/* We do it that way because there is hidden p for error and success */
#contact form > button { 
  grid-column: 1/-1;
  grid-row: 7;
}

@media(min-width: 644px) {
  #hero #h-a-2 {
    grid-column: 2;
    grid-row: 2;
    height: max-content;
  }
  #hero #h-a-2 .x-b-label .s-99 {
    display:revert;
  }
  #hero #hero-works {
    grid-row: 5;
    grid-column: 1/-1;
  }
  #hero #hero-works > div:not(:first-child){
    border-left: solid 1px var(--color-borders);
  }
  #hero > div:has(.txt) {
    border: none;
    grid-column: 2/4;
    grid-row: 4;
    color:var(--color-deep-forest);
  }
  #hero > div:has(.txt) span {
    text-decoration: underline;
    margin-bottom: .2em;
  }
  #hero > a[href="./realisations.html"] {
    border: none;
    border-left: solid 1px var(--color-borders);
    border-top: solid 1px var(--color-borders);
    grid-column: 5/6;
    grid-row: 4;
  }
  #hero-marquee {
    border-top: solid 1px var(--color-borders);
    grid-column: 1/-1;
    grid-row: -2;
  }
  
  #contact {
    grid-template-columns: 40% 60%;
    grid-template-rows: 20dvh repeat(5, auto) minmax(20dvh, auto);
  }
  #contact {
    border: solid 1px var(--color-borders);
  }
  #contact h2 {
    width: max(902px);
  }
  #contact form > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  #contact form > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  #contact form > :nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }
  #contact form > :nth-child(4) {
    grid-column: 1;
    grid-row: 4;
  }
  #contact form > :has(textarea) {
    grid-column: 2/-1;
    grid-row: 1/5;
    border-left: solid 1px var(--color-borders);
  }
  #contact form > .form-field textarea {
    height: 100%;
    margin-top: unset;
    min-height: 350px;
  }
  #contact form > :nth-child(6) {
    grid-column: 2/-1;
    grid-row: 5;
  }  
  /* We do it that way because there is hidden p for error and success */
  #contact form > button { 
    grid-row: 7;
    grid-column: 2/-1;
  }
  #form-contact-success:not(.is-hidden), 
  #form-contact-error:not(.is-hidden) {
    grid-column: 2/-1; 
    grid-row: 5;
  }
}

@media(min-width: 930px) {
  #a-a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
    grid-template-rows: auto 14px auto;
  }
  #a-a-2 {
    grid-column:2;
    grid-row:1/3;
    height: 100%;
  }
  #a-a-3 {
    grid-column:1/3;
    grid-row:2;
    width: 100%;
  }
  #a-a-4 {
    grid-column:2/-1;
    grid-row:2;
    width: 100%;
  }
  #a-a-5 {
    grid-column:2;
    grid-row:2/-1;
    height: 100%;
  }
  #a-a-2,
  #a-a-3,
  #a-a-4,
  #a-a-5 {
    display:revert;
    padding: 0;
  }
  
  #a-b {
    grid-column:3;
    grid-row:1;
    display:grid;
    grid-template-columns: [a] 60% [b] 2% [c] 19% [c] 19%; 
    grid-template-rows:    auto auto;
    border: none;
  }
  #a-b #a-b-3 {
    flex-direction: row;
    gap: 0;
  }
  #a-b > :nth-child(5) {
    grid-column: 2;
    grid-row: 6;
  }
  
  #a-a-1 {
    border: none;
  }
  
  #a-c {
    grid-column:1;
    grid-row:3;
  }
  
  #a-b {
    border: none;
  }
  
  #a-c {
    border: none;
  }
  
  #a-d {
    grid-column:3;
    grid-row:3;
  }
  
  #b-a {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto auto;
  }
  #b-a h2 {
    grid-column: 1/-1;
    grid-row: 1;
  }
  #b-a li:nth-child(1) {
    grid-column: 1;
    grid-row: 2;
  }
  li:has(#b-a-1) {
    grid-column: 2;
    grid-row: 3;
  }
  li:has(#b-a-2) {
    grid-column: 2;
    grid-row: 1;
  }
  li:has(#b-a-3) {
    grid-column: 3;
    grid-row: 1;
  }
}