@import "tailwindcss";

@theme {
  --font-poppins: "Poppins", sans-serif;
  --font-ivyora-display: "ivyora-display", serif;
  --font-ivypresto-display: "ivypresto-display", serif;
  --font-ivypresto-headline: "ivypresto-headline", serif;
  --font-ivy: var(--font-ivypresto-display);

  --color-primary: #202020;
  --color-primary-hover: #1A1A1A;
  --color-primary-active: #202020;
  --color-primary-soft: #F5F5F5;
  --color-accent-yellow: #202020;

  --color-text-white: #FFFFFF;
  --color-text-black: #202020;
  --color-text-muted: #20202099;

  --color-bg-white: #FFFFFF;
  --color-bg-light: #FFFFFF;

}

@layer base {
  /* ==================================================
     ZÁKLAD
  ================================================== */

  body {
    font-family: var(--font-poppins);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-bg-light);
    color: var(--color-text-black);
    overflow-x: hidden;
  }

  main {
    background-color: var(--color-bg-light);
  }

  ::selection {
    background-color: var(--color-text-black);
    color: var(--color-text-white);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-ivy);
    color: var(--color-text-black);
  }

  .font-poppins-light {
    font-family: var(--font-poppins);
    font-weight: 300;
    font-style: normal;
  }

  .font-poppins-regular {
    font-family: var(--font-poppins);
    font-weight: 400;
    font-style: normal;
  }

  .font-poppins-semibold {
    font-family: var(--font-poppins);
    font-weight: 600;
    font-style: normal;
  }

  .font-ivyora-display-light-italic {
    font-family: var(--font-ivyora-display);
    font-weight: 300;
    font-style: italic;
  }

  .font-ivyora-display-medium {
    font-family: var(--font-ivyora-display);
    font-weight: 500;
    font-style: normal;
  }

  .font-ivypresto-display-light-italic {
    font-family: var(--font-ivypresto-display);
    font-weight: 300;
    font-style: italic;
  }

  .font-ivypresto-headline-light {
    font-family: var(--font-ivypresto-headline);
    font-weight: 300;
    font-style: normal;
  }

  .font-ivypresto-headline-semibold {
    font-family: var(--font-ivypresto-headline);
    font-weight: 600;
    font-style: normal;
  }
  
  /* ==================================================
     TEXT 
  ================================================== */
  .text-18 {
    font-size: clamp(1rem, 1.25vw, 1.125rem);
    line-height: 1.55;
  }

  .text-20 {
    font-size: clamp(1.125rem, 1.4vw, 1.25rem);
    line-height: 1.45;
  }

  .text-label {
    font-family: var(--font-poppins);
    font-size: clamp(1.125rem, 1.4vw, 1.25rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.75em;
    text-transform: uppercase;
  }

  .text-24 {
    font-size: clamp(1.25rem, 1.7vw, 1.5rem);
    line-height: 1.35;
  }

  .text-50 {
    font-size: clamp(2.375rem, 4vw, 3.125rem);
    line-height: 1;
  }

  .text-100 {
    font-size: clamp(4rem, 8vw, 6.25rem);
    line-height: 0.95;
  }

  @media (max-width: 767px) {
    .text-20 {
      font-size: 1rem;
      line-height: 1.45;
    }

    .text-24 {
      font-size: 1.125rem;
      line-height: 1.35;
    }

    .text-50 {
      font-size: clamp(2rem, 10vw, 2.875rem);
      line-height: 1;
    }

    .text-100 {
      font-size: clamp(3rem, 13vw, 4rem);
      line-height: 0.95;
    }

    .text-label {
      font-size: 1rem;
      letter-spacing: 0.55em;
    }
  }


  /* ==================================================
     SCROLLBAR
  ================================================== */

  ::-webkit-scrollbar {
    width: 6px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background-color: var(--color-text-black);
    border-radius: 999px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-hover);
  }

  * {
    scrollbar-width: thin;
    scrollbar-color: var(--color-text-black) transparent;
  }
}

@layer components {
  /* ==================================================
     CONTAINERY
  ================================================== */

  .container-main {
    width: calc(100% - 72px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .link-underline,
  .main-menu a,
  .footer-links a {
    position: relative;
    display: inline-block;
  }

  .link-underline::after,
  .main-menu a::after,
  .footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.35s ease;
  }

  .link-underline:hover::after,
  .link-underline:focus-visible::after,
  .main-menu a:hover::after,
  .main-menu a:focus-visible::after,
  .footer-links a:hover::after,
  .footer-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
  }

  .form-field {
    position: relative;
    margin: 0;
    display: block;
  }

  .form-field input,
  .form-field textarea {
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid var(--color-text-black);
    background-color: transparent;
    padding: 22px 0 8px;
    font-family: var(--font-poppins);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--color-text-black);
    box-shadow: none;
  }

  .form-field textarea {
    height: 58px;
    min-height: 58px;
    resize: none;
    overflow: hidden;
  }

  .form-field span {
    position: absolute;
    left: 0;
    top: 22px;
    pointer-events: none;
    color: var(--color-text-black);
    font-family: var(--font-poppins);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    transition: top 0.2s ease, font-size 0.2s ease, opacity 0.2s ease;
  }

  .form-field input:focus,
  .form-field textarea:focus {
    box-shadow: none;
  }

  .form-field input:focus + span,
  .form-field input:not(:placeholder-shown) + span,
  .form-field textarea:focus + span,
  .form-field textarea:not(:placeholder-shown) + span {
    top: 0;
    font-size: 12px;
    opacity: 0.8;
  }

  .form-checkbox {
    margin: 0;
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    column-gap: 16px;
    cursor: pointer;
    color: var(--color-text-black);
    font-family: var(--font-poppins);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
  }

  .form-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .form-checkbox span {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid var(--color-text-black);
    background-color: transparent;
  }

  .form-checkbox span::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 8px;
    height: 14px;
    border-right: 2px solid var(--color-text-white);
    border-bottom: 2px solid var(--color-text-white);
    opacity: 0;
    transform: rotate(45deg);
  }

  .form-checkbox input:checked + span {
    background-color: var(--color-text-black);
  }

  .form-checkbox input:checked + span::after {
    opacity: 1;
  }

  .form-checkbox strong {
    font-weight: 400;
  }

  .form-checkbox a {
    position: relative;
    display: inline-block;
    font-weight: 700;
  }

  .form-checkbox a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.08em;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
  }

  .form-checkbox a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .form-checkbox .ydforms-error,
  .form-checkbox .ydforms-field-error {
    grid-column: 2;
    margin-top: 8px;
    color: #C00000;
    font-size: 14px;
    line-height: 1.35;
  }

  .form-file [data-file-label] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  @media (max-width: 767px) {
    .form-field input,
    .form-field textarea {
      font-size: 16px;
      min-height: 52px;
      padding-top: 20px;
    }

    .form-field span {
      top: 20px;
      font-size: 16px;
      letter-spacing: 0.28em;
    }

    .form-field input:focus + span,
    .form-field input:not(:placeholder-shown) + span,
    .form-field textarea:focus + span,
    .form-field textarea:not(:placeholder-shown) + span {
      font-size: 11px;
    }

    .form-checkbox {
      align-items: flex-start;
      font-size: 16px;
    }
  }

  .hamburger span {
    position: absolute;
    left: 6px;
    width: 28px;
    height: 2px;
    background-color: var(--color-text-black);
    transition: transform 0.3s ease, top 0.3s ease;
  }

  .hamburger span:first-child {
    top: 15px;
  }

  .hamburger span:last-child {
    top: 24px;
  }

  .hamburger.is-open span:first-child {
    top: 20px;
    transform: rotate(45deg);
  }

  .hamburger.is-open span:last-child {
    top: 20px;
    transform: rotate(-45deg);
  }

  .mobile-menu {
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  }

  .mobile-menu.is-open {
    pointer-events: auto;
    transform: translateX(0);
  }

  .mobile-menu__nav li,
  .mobile-menu__lang {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }

  .mobile-menu.is-open .mobile-menu__nav li,
  .mobile-menu.is-open .mobile-menu__lang {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(1) {
    transition-delay: 0.18s;
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(2) {
    transition-delay: 0.24s;
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(4) {
    transition-delay: 0.36s;
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(5) {
    transition-delay: 0.42s;
  }

  .mobile-menu.is-open .mobile-menu__nav li:nth-child(6) {
    transition-delay: 0.48s;
  }

  .mobile-menu.is-open .mobile-menu__lang {
    transition-delay: 0.54s;
  }

  .mobile-menu__nav a {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1;
  }

  .mobile-menu__lang {
    text-align: center;
  }

  html.reference-modal-open,
  body.reference-modal-open {
    overflow: hidden;
  }

  [data-reference-modal] {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .appear-reveal {
    --appear-progress: 0;
    position: relative;
    transform: translateY(calc((1 - var(--appear-progress)) * 18px));
    will-change: transform;
  }

  .appear-reveal::before {
    content: "";
    position: absolute;
    inset: -0.34em -12vw -0.34em -2px;
    z-index: 20;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--color-bg-white) 18%, var(--color-bg-white) 100%);
    opacity: 1;
    transform: translateX(calc(var(--appear-progress) * 130%));
    will-change: opacity, transform;
  }

  .appear-reveal-soft {
    opacity: calc(0.35 + (var(--appear-progress) * 0.65));
  }

  .appear-reveal-soft::before {
    display: block;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 18%, rgba(255, 255, 255, 0.96) 100%);
    backdrop-filter: blur(8px);
  }

  .appear-reveal-title {
    --appear-move: 42px;
    --appear-title-shift: 42px;
  }

  .appear-reveal-title.appear-reveal {
    transform: none;
  }

  .appear-title-word {
    --appear-line-direction: -1;
    display: inline-block;
    transform: translateX(calc(var(--appear-title-shift) * var(--appear-line-direction)));
    will-change: transform;
  }

  @media (prefers-reduced-motion: reduce) {
    .appear-reveal,
    .appear-reveal-title,
    .appear-title-word {
      opacity: 1;
      transform: none;
      transition: none;
    }

    .appear-reveal::before {
      display: none;
    }
  }

  /* ==================================================
     Wysiwyg
  ================================================== */
  .wysiwyg {
    color: inherit;
    line-height: 1.65;
  }

  .wysiwyg > *:first-child {
    margin-top: 0;
  }

  .wysiwyg > *:last-child {
    margin-bottom: 0;
  }

  .wysiwyg p,
  .wysiwyg ul,
  .wysiwyg ol,
  .wysiwyg blockquote,
  .wysiwyg table,
  .wysiwyg figure {
    margin-top: 0;
    margin-bottom: 1.35em;
  }

  .wysiwyg h2,
  .wysiwyg h3,
  .wysiwyg h4,
  .wysiwyg h5,
  .wysiwyg h6 {
    margin-top: 1.45em;
    margin-bottom: 0.55em;
    font-weight: 500;
    line-height: 1.12;
  }

  .wysiwyg h2 {
    font-size: clamp(2rem, 3.2vw, 3rem);
  }

  .wysiwyg h3 {
    font-size: clamp(1.625rem, 2.4vw, 2.25rem);
  }

  .wysiwyg h4 {
    font-size: clamp(1.375rem, 1.9vw, 1.75rem);
  }

  .wysiwyg a {
    color: var(--color-text-black);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
  }

  .wysiwyg a:hover {
    color: var(--color-text-muted);
    text-decoration-color: transparent;
  }

  .wysiwyg strong,
  .wysiwyg b {
    font-weight: 700;
  }

  .wysiwyg ul,
  .wysiwyg ol {
    padding-left: 1.25em;
  }

  .wysiwyg ul {
    list-style: disc;
  }

  .wysiwyg ol {
    list-style: decimal;
  }

  .wysiwyg li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
  }

  .wysiwyg li::marker {
    color: currentColor;
  }

  .wysiwyg blockquote {
    border-left: 4px solid var(--color-text-black);
    border-radius: 0 18px 18px 0;
    background-color: var(--color-primary-soft);
    padding: 24px 28px;
    color: inherit;
    font-size: clamp(1.125rem, 1.45vw, 1.375rem);
    line-height: 1.55;
  }

  .wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
  }

  .wysiwyg figure img {
    display: block;
  }

  .wysiwyg figcaption {
    margin-top: 10px;
    color: inherit;
    font-size: 0.9em;
    line-height: 1.45;
    opacity: 0.7;
  }

  .wysiwyg table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
    font-size: 0.95em;
  }

  .wysiwyg th,
  .wysiwyg td {
    border: 1px solid var(--color-border-light);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
  }

  .wysiwyg th {
    background-color: var(--color-primary-soft);
    font-weight: 600;
  }

  .wysiwyg hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid var(--color-border-light);
  }

  input,
  textarea,
  select {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border: 1px solid var(--color-border-dark);
    border-radius: 0;
    background-color: var(--color-bg-white);
    color: var(--color-text-black);
    font-family: var(--font-poppins);
    font-size: 18px;
    line-height: 1.3;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  textarea {
    min-height: 140px;
    resize: vertical;
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--color-text-muted);
  }

  input:focus,
  textarea:focus,
  select:focus {
    border-color: var(--color-text-black);
    box-shadow: 0 0 0 2px var(--color-text-black);
  }

  label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--color-text-black);
    font-family: var(--font-poppins);
    font-size: 18px;
    line-height: 1.3;
  }


  /* ==================================================
     TLAČÍTKA
  ================================================== */

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 26px;
    border-radius: 9999px;
    font-size: 18px;
    font-family: var(--font-poppins);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }

  .btn span {
    display: inline-block;
    transition: transform 0.3s ease;
  }

  .btn-primary {
    background-color: var(--color-text-black);
    color: var(--color-text-white);
    border: 1px solid var(--color-text-black);
  }

  .btn-primary:hover {
    background-color: var(--color-text-white);
    color: var(--color-text-black);
    border-color: var(--color-text-black);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }

  .btn-primary:active {
    background-color: var(--color-text-black);
    color: var(--color-text-white);
    border-color: var(--color-text-black);
  }

  .btn-outline-white {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-text-white);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
  }

  .btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08);
  }

  .btn-outline-white:active {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .btn-outline-green {
    background-color: transparent;
    color: var(--color-text-black);
    border: 1px solid var(--color-text-black);
  }

  .btn-outline-green:hover {
    background-color: var(--color-text-black);
    color: var(--color-text-white);
    border-color: var(--color-text-black);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }

  .btn-outline-green:active {
    background-color: var(--color-text-black);
    color: var(--color-text-white);
    border-color: var(--color-text-black);
  }

  .btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  .btn:focus-visible {
    outline: 2px solid var(--color-text-black);
    outline-offset: 3px;
  }

  .btn-arrow::after {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background-color: currentColor;
    -webkit-mask: url("./assets/img/arrow-right.svg") no-repeat center;
    -webkit-mask-size: contain;
    mask: url("./assets/img/arrow-right.svg") no-repeat center;
    mask-size: contain;
    transition: transform 0.3s ease;
  }

  .btn-arrow:hover span {
    transform: translateX(2px);
  }

  .btn-arrow:hover::after {
    transform: translateX(4px);
  }

  .btn-arrow:active span {
    transform: translateX(1px);
  }

  .btn-arrow:active::after {
    transform: translateX(2px);
  }
}

@media (min-width: 768px) {
  @layer components {
    /* ==================================================
       CONTAINERY OD TABLETU
    ================================================== */

    .container-main {
      width: calc(100% - 88px);
    }
  }
}

@media (min-width: 1280px) {
  @layer components {
    /* ==================================================
       CONTAINERY OD DESKTOPU
    ================================================== */

    .container-main {
      width: calc(100% - 112px);
    }
  }
}
