@layer reset, theme, layout;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
  }
  * {
    margin: 0;
  }
}

@layer theme {
  :root {
    --ratio: 16 / 4;
    --color: #FA5638;
    --text:  #2A1B18;
    --light: #F7F1ED;
    --shade: rgb(200, 72, 47);
    --font: italic "IBM Plex Mono", monospace;
    --ratio: 4 / 3;
    --unit: 12px;
  }   
}

@layer layout {
  body {
    background: var(--color);
    color: var(--text);
    font-family: "IBM Plex Mono", sans-serif;
    font-weight: 400;
    font-style: italic;
  }

  section {
    aspect-ratio: var(--ratio);
    border: 4px solid var(--text);
    border-radius: 24px;
    height: 100%;
  }

  h1 { margin: 0; font-size: 2rem; line-height: 1.2; }
  h2 { margin: 0; font-size: 2rem; }
  p  { margin: 0; font-size: 1.5rem; }

  a:link, a:visited {
    color: var(--text);
    text-decoration: none;
    transition: 0.3s ease-out;
    white-space: nowrap;
  }
  .socials {
     line-height: 2;
  }
  a span { font-style: normal; font-size: 1.125rem; position: relative; top: -2px; left:-4px; }
  
  a:hover, a:active {
    text-decoration: none;
    background-color: rgba(33, 27, 24, 0.1);
    border-radius: 4px;
    padding: 0 4px;
    margin: 0 -4px;
  }
  
  .hoverable a:link, .hoverable a:visited {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 99;
  }
  
  .hoverable a:hover, .hoverable a:active {
    background-color: transparent;
  }
  
  .wrapper /* MWEB */ {
    display:grid;
    grid-gap: calc(var(--unit) * 2);
    grid-template-columns: repeat(1, minmax(0, 1fr));
    padding: calc(var(--unit) * 2);
  }
  
  @media (min-width: 768px) /* TABLET */ {
    .wrapper {
      display:grid;
      grid-gap: calc(var(--unit) * 4);
      grid-template-columns: repeat(2, minmax(0, 1fr));
      padding: calc(var(--unit) * 4);
    }
  }
  
  @media (min-width: 1200px) /* DESKTOP */ {
    .wrapper {
      max-width: 1480px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  
  .flex {
    display:flex;
    grid-gap: calc(var(--unit) * 4);
    flex-wrap: wrap;
  }
  
  .hoverable {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    box-shadow: 0 0 0 rgba(42, 27, 24, 0.3);
    position: relative;
  }
  
  .hoverable:hover {
    transform: scale(103%) ;
    box-shadow: 0 7px 6px 6px rgba(42, 27, 24, 0.3);
    
  }
  
  .card {
    border: 4px solid var(--text);
    border-radius: calc(var(--unit) *2);
    background-color: var(--shade);
  }
  
  .vert .card {
    height: 98%;
  }

  .horz .card {
    width: calc(100% - 12px);
    height: calc(100% + 8px);
  }
  
  .flat .card {
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    
  }
  
  .shade {
    background-color: var(--shade);
  }

  .nudge {
      position: relative;
      top: 4px;
      left: -8px;
  }
  
  .content {
    background-color: var(--color);
    padding: calc(var(--unit) * 2);
    text-align: center;
  }
  .content p {
    max-width: 26ch;
    margin: 0 auto;
    text-wrap: balance;
  }
  
  .center {
    display: grid;
    place-items: center;
    height: 100%;
  }
  
  section div {
    margin: -4px;
  }
  
  .wave {
    animation-name: wave-animation;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    transform-origin: 57% 86%;
  }
  
  @keyframes wave-animation {
    0% { transform:   rotate(00.0deg) }
    14% { transform:  rotate(00.0deg) }
    20% { transform:  rotate(-16.0deg) }
    30% { transform:  rotate(14.0deg) }
    40% { transform:  rotate(-8.0deg) }
    50% { transform:  rotate(12.0deg) }
    60% { transform:  rotate(-8.0deg) }
    70% { transform:  rotate(00.0deg) }
    100% { transform: rotate(00.0deg) }
  }
}
