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

  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  figure,
  blockquote,
  dl,
  dd {
    margin: 0;
  }

  [role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  body {
    min-block-size: 100vh;
    line-height: 1.6;
  }

  h1,
  h2,
  h3,
  button,
  input,
  label {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p,
  li {
    text-wrap: pretty;
  }

  img,
  picture {
    max-inline-size: 100%;
    display: block;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }
}

@layer base {
  :root {
    /*colors*/
    --hinge-white: #fffefd;
    --hinge-black: #1a1a1a;

    --lilac: #75457d;
    --mauve: #9f81a5;
    --mist: #c7c7e5;
    --kelp: #097270;
    --coral-warn: #d45847;

    --midnight: #3e1768;
    --midnight-rgb: 62 23 104;

    --aubergine: #67295f;
    --aubergine-rgb: 103 41 95;
    --aubergine-50: rgb(var(--aubergine-rgb) / 50%);

    --stone: #484848;
    --stone-rgb: 72 72 72;
    --stone-75: rgb(var(--stone-rgb) / 75%); /*text*/
    --stone-25: rgb(var(--stone-rgb) / 25%); /*backg grey*/

    --sand: #ccac9f; /*icon*/
    --sand-rgb: 204 172 159;
    --sand-75: rgb(var(--sand-rgb) / 75%); /*first reply color*/

    /*font family*/
    --ff-serif-display: "Crimson Pro", "Times new Roman", serif;
    --ff-sans-heading:
      "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;

    /*set up font weights*/
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /*Type scale*/
    --fs-100: 0.75rem; /* 12px  - small labels / metadata */
    --fs-200: 0.875rem; /* 14px  - small body */
    --fs-300: 1rem; /* 16px  - base body */
    --fs-400: 1.125rem; /* 18px  - comfy body / lead */
    --fs-500: 1.5rem; /* 24px  - subhead */
    --fs-600: 2rem; /* 32px  - functional headline */
    --fs-700: clamp(2.5rem, 5vw, 3.5rem); /* ~40–56px main headline */

    /*Line heights tight for headings and comfy for text*/
    --lh-tight: 1.1;
    --lh-comfy: 1.4;
  }
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  main {
    width: 100%;
    padding-bottom: 64px; /*main bottom padding so it doesnt sit under footer WAS 64*/
    background-color: var(--hinge-white);
  }

  .likes-page {
    background: rgb(var(--stone-rgb) / 25%);
  }
  .site-header {
    padding-block: 1rem; /*bar width*/

    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--hinge-white);
  }

  .site-header-inner {
    justify-content: center;
    color: var(--hinge-black);
  }
  .primary-navigation {
    ul {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1rem;
    }
  }
  .site-footer {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 100;
    background: var(--hinge-black);
    border-top: 1px solid;
    transform: translateY(0);
    transition: transform 0.25s ease;
  }

  /*hide menu bar for when scrolling down*/
  .site-footer-hidden {
    transform: translateY(100%);
  }

  .site-footer-inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px; /*RESIZE FOOTER was 8,16*/ /*temp: 5px, 50px*/
    display: flex;
    justify-content: space-around;
    align-items: center;

    gap: 100px; /*space between footer icons*/
  }

  .footer-item {
    text-decoration: none;
    background: transparent;
    color: var(--stone);
    border: none;
    padding: 0px; /*resizes footer ICONS (was 8px) now 40. --20 is hingelike || test: 8px revert*/
    font: inherit;
    cursor: pointer;
  }

  h1 {
    font-family: var(--ff-sans-heading);
    font-size: var(--fs-700);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
  }

  .loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--hinge-white);
    transition:
      opacity 0.75s,
      visibility 0.75s;
    z-index: 9999;
  }

  @keyframes loading {
    from {
      transform: rotate(0turn);
    }
    to {
      transform: rotate(1turn);
    }
  }

  .loader-hidden {
    opacity: 0;
    visibility: hidden;
  }

  .loader::after {
    content: "";
    width: 75px;
    height: 75px;
    border: 15px solid #dddddd;
    border-top-color: var(--aubergine);
    border-radius: 50%;
    animation: loading 0.75s linear infinite;
  }
}

@layer components {
  .card-container {
    max-width: 420px;
    margin: 32px auto 0;
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }

  .card-title {
    font-family: var(--ff-sans-heading);
    font-size: var(--fs-600);
    font-weight: var(--fw-medium);
    line-height: var(--lh-comfy);
  }

  /*shared card style (photo+details)*/
  .hinge-card {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    background: var(--hinge-white);
    box-shadow: 0 10px 25px grey;

    overflow: hidden;
  }

  /*main photo card*/
  .image-card {
    position: relative;
    height: 480px; /*change as needed*/
  }

  .card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /*bottom overlay buttons*/
  .card-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .round-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease;
    padding: 0;
  }

  .round-btn img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
  }

  .round-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  }

  .undo-btn {
    width: 40px;
    height: 40px;
    box-shadow: none;
  }

  .addCard-btn {
    width: 100px;
    height: 100px;
    box-shadow: none;
    border: 1px solid #e0e0e0;
  }

  .undo-btn:hover,
  .skip-btn:hover,
  .like-btn:hover,
  .round-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  }

  .details-card {
    /*border-top-left-radius: 15px;
    border-top-right-radius: 15px;*/
    margin-top: 36px; /*space between*/
    padding: 16px 18px;
  }

  .detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
  }

  .detail-row + .detail-row {
    border-top: 1px solid #eeeeee;
  }
  .detail-row-item {
    font-family: var(--ff-sans-heading);
    font-size: var(--fs-300);
    font-weight: var(--fw-regular);
    line-height: var(--lh-comfy);
  }

  .icon {
    font-size: 16px;
    opacity: 0.75;
  }

  .site-hook {
    /*TRBL*/
    padding: 50px 50px 30px 70px;
    font-family: var(--ff-serif-display);
    font-size: var(--fs-700);
    font-weight: var(--fw-medium);
    line-height: var(--lh-tight);
  }

  .matches-hook {
    padding: 50px 50px 20px 70px;
    font-family: var(--ff-serif-display);
    font-size: var(--fs-700);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
  }
  .matches-desc {
    /*TRBL*/
    padding: 0px 50px 20px 70px;
    font-family: var(--ff-serif-display);
    font-size: var(--fs-500);
    font-weight: var(--fw-);
    line-height: var(--lh-comfy);
  }

  .search-bar {
    width: 330px;
    height: 50px;
    border: 2px solid rgb(var(--stone-rgb) / 75%);
    border-radius: 25px;
    display: flex;
    align-items: center; /*vertical center*/
    padding: 0 15px;
    margin: 40px auto;
  }

  .search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
  }

  .search-bar button {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
  }

  .search-bar button:hover {
    color: orange;
  }
}
