/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg-base: #f8f5f2;
  --bg-gloss: #ffffff;
  --bg-raised: #ffffff;
  --text-primary: #1a0a0c;
  --text-muted: rgba(26, 10, 12, .55);
  --border: rgba(118, 21, 42, .22);
  --accent: #76152A;
  --bordeaux: #76152A;
  --bordeaux-hover: #5F1022;
}

.site-flash {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.site-flash--notice {
  background: #81D8D0;
  color: #000000;
}

.site-flash--alert {
  background: #76152A;
  color: #FFFFFF;
}

.devise-form {
  max-width: 420px;
  margin: 15vh auto 0;
  padding: 2rem;
  background: var(--bg-gloss);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.devise-form h2 {
  margin: 0 0 1.5rem;
  font-size: 1.8rem;
  font-weight: 400;
}

.devise-form .field {
  margin-bottom: 1.25rem;
}

.devise-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.devise-form input[type="email"],
.devise-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
}

.devise-form input[type="email"]:focus,
.devise-form input[type="password"]:focus {
  outline: 0;
  border-bottom-color: var(--accent);
}

.devise-form input[type="submit"] {
  border: 1px solid var(--bordeaux);
  background: var(--bordeaux);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  font: inherit;
  cursor: pointer;
}

.devise-form input[type="submit"]:hover {
  background: var(--bordeaux-hover);
  border-color: var(--bordeaux-hover);
  color: #ffffff;
}

.gilda-display-regular {
  font-family: "Gilda Display", serif;
  font-weight: 400;
  font-style: normal;
}

/* ------------------------------------------------------------------ */
/* Page transitions                                                   */
/* ------------------------------------------------------------------ */

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(118, 21, 42, .04) 0%, rgba(95, 16, 34, .07) 100%);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: opacity 550ms cubic-bezier(.76, 0, .24, 1),
              visibility 550ms cubic-bezier(.76, 0, .24, 1),
              backdrop-filter 550ms cubic-bezier(.76, 0, .24, 1);
}

.page-transition.is-visible {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 420ms cubic-bezier(.65, 0, .35, 1),
              visibility 420ms cubic-bezier(.65, 0, .35, 1),
              backdrop-filter 420ms cubic-bezier(.65, 0, .35, 1);
}

/* Ensure the curtain is respected even when reduced motion is preferred. */
@media (prefers-reduced-motion: reduce) {
  .page-transition {
    transition: opacity 120ms ease, visibility 120ms ease;
  }
}

/* ------------------------------------------------------------------ */
/* Header navigation                                                  */
/* ------------------------------------------------------------------ */

.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .25rem;
  padding: 1.25rem 1.5rem;
  background: rgba(248, 245, 242, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-nav a {
  padding: .35rem .5rem;
  color: var(--text-primary);
  font: 400 .7rem "Space Grotesk", sans-serif;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.menu-trigger {
  display: none;
}

@media (min-width: 1024px) {
  .header-nav {
    padding: 1.25rem 2rem;
    gap: .25rem;
  }

  .header-nav a {
    padding: .35rem .6rem;
    font-size: .75rem;
  }
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */

.site-footer {
  padding: 4rem 8vw 3rem;
  background: var(--bg-base);
  color: var(--text-primary);
}

.site-footer__group {
  margin-bottom: 2.5rem;
}

.site-footer__label {
  display: block;
  margin-bottom: 1rem;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
}

.site-footer__links a {
  color: var(--text-primary);
  font-size: .9rem;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__rights {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ */
/* Legal pages                                                        */
/* ------------------------------------------------------------------ */

.legal-page__version {
  margin: -0.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.legal-section p {
  margin-bottom: 0.75rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.legal-section a {
  color: var(--accent);
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Search                                                             */
/* ------------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-form {
  margin: 2rem 0;
}

.search-form__field {
  display: flex;
  gap: .5rem;
  max-width: 42rem;
}

.search-form__input {
  flex: 1;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-raised);
  color: var(--text-primary);
  font: 400 1rem "Space Grotesk", sans-serif;
}

.search-form__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-form__button {
  padding: .85rem 1.5rem;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: 500 .85rem "Space Grotesk", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}

.search-form__button:hover {
  background: var(--bordeaux-hover);
}

.search-results__status {
  margin-bottom: 1.5rem;
  font-size: .9rem;
  color: var(--text-muted);
}

.search-results__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-result {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.search-result__type {
  display: block;
  margin-bottom: .25rem;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.search-result__title {
  display: block;
  margin-bottom: .4rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.search-result__title:hover {
  color: var(--accent);
}

.search-result__summary {
  margin: 0;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.search-results__empty {
  padding: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ------------------------------------------------------------------ */
/* Link utilities                                                     */
/* ------------------------------------------------------------------ */

.portfolio-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.portfolio-card:hover {
  background: rgba(118, 21, 42, .05);
}

.text-link {
  display: inline-block;
  margin-top: 2rem;
  color: inherit;
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link:hover {
  text-decoration: underline;
}
