/* ==================================================
   CONTACT PAGE
   ================================================== */


/* --------------------------------------------------
                        HERO 
    -------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    align-items: stretch;   /* was: center */
    background-color: var(--main-color);
    color: var(--text-main);
    min-height: 460px;
}

.hero-text {
    display: flex;              
    flex-direction: column;
    justify-content: center;
    padding: 4.5rem 3.5rem;
    
}

.hero-text p{
    color: var(--text-muted);
    font-weight: bold;
}

.hero-img {
    position: relative;
    min-height: 320px;
}

.hero-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}
/* --------------------------------------------------
   CONTENT  (light card: details + form)
   -------------------------------------------------- */

.content {
    background-color: var(--bg);
    color: var(--text-second);
    padding: 5rem 3.5rem;
}

.content .box-two {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 4.5rem;
    align-items: start;
}

.content .box-two > div {
    min-width: 0;
}

.content h1 {
    margin: 0;
    font-family: var(--text-font-main);
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    letter-spacing: 0.5px;
}

.content > .box-two > .box-left > p {
    margin: 1rem 0 0;
    max-width: 44ch;
    font-family: var(--text-font-second);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: bold;
}

.content > .box-two > .box-right{
    display: block;
}

/* ---- contact channels ---- */

.contact-list {
    list-style: none;
    margin: 3rem 0 0;
    padding: 0;
    display: grid;
    gap: 2rem;
}

.contact-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 1.5rem;
}

.contact-list img {
    width: 42px;
    height: 42px;
}

.contact-list li > div {
    display: grid;
    gap: 0.35rem;
}

.contact-list a {
    color: var(--text-second);
    font-family: var(--text-font-second);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.3s ease;
    color: var(--text-muted);
    font-weight: bold;
}

.contact-list a:hover,
.contact-list a:focus-visible {
    color: var(--accent);
}

/* --------------------------------------------------
   FORM
   -------------------------------------------------- */

form {
    margin-top: 2.25rem;
    display: grid;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-field {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.form-field label {
    font-family: var(--text-font-second);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-second);
}

.form-field input,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    background-color: var(--bg);
    color: var(--text-second);
    font-family: var(--text-font-second);
    font-size: 1rem;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #8a8a8a;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(123, 92, 255, 0.18);
}

.btn-submit {
    margin-top: 0.75rem;
    padding: 1.1rem 2rem;
    width: 100%;
    background-color: var(--main-color);
    color: var(--text-main);
    font-family: var(--text-font-second);
    font-size: 1.0625rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-submit:hover,
.btn-submit:focus-visible {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* pop up */
.toast {
  /* JS sets --toast-bottom to 1rem above the visible viewport */
  position: fixed;
  left: 50%;
  bottom: var(--toast-bottom, 1rem);
  transform: translateX(-50%);

  z-index: 9999;
  margin: 0;
  padding: 0.85rem 3rem 0.85rem 0.85rem;

  display: flex;
  align-items: center;
  gap: 0.9rem;

  width: min(92vw, 420px);
  max-width: 92vw;

  border: 0.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;                       /* Apple continuous-corner feel */

  background: rgba(28, 28, 30, 0.72);        /* iOS dark material */
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);

  color: #fff;
  font-family: var(--text-font-main);

  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.35);

  opacity: 0;
  animation: toast-in 0.45s cubic-bezier(0.32, 1.4, 0.5, 1) forwards;
}

.toast:not([open]) { display: none; }
.toast::backdrop   { background: transparent; }

/* closing state (added by JS) */
.toast.is-hiding {
  animation: toast-out 0.28s ease-in forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, calc(100% + 2rem)) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to   { opacity: 0; transform: translate(-50%, calc(100% + 2rem)) scale(0.96); }
}

/* ---- icon circle ---- */
.toast-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.toast-icon svg {
  width: 24px;
  height: 24px;
  display: none;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast.success .toast-icon        { background: rgba(48, 209, 88, 0.18); }
.toast.success .icon-success      { display: block; stroke: #30d158; }

.toast.error   .toast-icon        { background: rgba(255, 69, 58, 0.18); }
.toast.error   .icon-error        { display: block; stroke: #ff453a; }

/* ---- text ---- */
.toast-text { min-width: 0; }

.toast-text h2 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.toast-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(235, 235, 245, 0.62);
}

/* ---- close button ---- */
.toast-close {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);

  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;

  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;

  background: rgba(120, 120, 128, 0.28);
  color: rgba(235, 235, 245, 0.75);
  transition: background 0.2s ease;
}

.toast-close:hover { background: rgba(120, 120, 128, 0.45); }

.toast-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

/* light mode variant */
@media (prefers-color-scheme: light) {
  .toast {
    background: rgba(250, 250, 252, 0.78);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1c1c1e;
  }
  .toast-text p    { color: rgba(60, 60, 67, 0.6); }
  .toast-close     { color: rgba(60, 60, 67, 0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-hiding { animation: none; opacity: 1; }
}

@media (max-width: 600px) {
  .toast { width: calc(100vw - 2rem); }
}

/* --------------------------------------------------
   RESPONSIVE
   -------------------------------------------------- */

@media (max-width: 1024px) {
    main {
        padding: 0 1rem;
    }

    #header-menu .navbar {
        padding: 1rem 1.25rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-text {
        padding: 3.5rem 1.75rem;
    }

    .hero-img img {
        height: 260px;
        min-height: 0;
    }

    .content {
        padding: 3.5rem 1.75rem;
    }

    .content .box-two {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    footer .box-two {
        grid-template-columns: 1fr;
        padding: 3rem 1.75rem;
    }

    footer .box-right {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    main {
        padding: 0;
    }
    .nav-links {
        gap: 0.9rem;
        font-size: 0.875rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-list li {
        grid-template-columns: 34px 1fr;
        gap: 1rem;
    }

    .contact-list img {
        width: 34px;
        height: 34px;
    }

    footer .box-right {
        grid-template-columns: 1fr 1fr;
    }
}