/* ============================================
   Milano: Home Away From Home
   Minimalist Interactive — Single Page
   ============================================ */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:        #0a0a0a;
  --text:      #f0ece7;
  --muted:     #8a8480;
  --accent:    #F1C338;
  --accent-dk: #d4a828;
  --border:    #1e1e1e;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ─── Views ─── */
.view {
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
  will-change: opacity;
}

.view.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── HOME VIEW ─── */
.view-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Saffron top band */
.home-band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.home-band-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a1a1a;
}

.home-band .lang-toggle {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  border-color: rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}

.home-band .lang-toggle:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.home-center {
  text-align: center;
  padding: 0 2rem;
}

.tagline {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.home-title {
  line-height: 1;
  margin-bottom: 1.5rem;
}

.title-city {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 13vw, 10rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* .title-sub moved to saffron band */

.home-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.dot {
  opacity: 0.4;
}

/* INFO button — top right, below lang toggle */
.info-btn {
  position: absolute;
  top: 72px;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.5rem 0;
  transition: opacity 0.2s ease;
}

.info-btn:hover { opacity: 0.65; }

.info-plus {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}

.info-btn:hover .info-plus {
  transform: rotate(45deg);
}

/* Base lang-toggle (used in other views) */
.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.28rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── MENU VIEW ─── */
.view-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.close-btn {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 200;
  color: var(--muted);
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.close-btn:hover { color: var(--text); }

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.menu-item {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  padding: 0.1em 0.5rem;
  opacity: 0;
  transition: color 0.2s ease;
}

.menu-item:hover { color: var(--accent); }

/* Stagger-in animation when menu becomes active */
.view-menu.active .menu-item {
  animation: itemIn 0.6s var(--ease) forwards;
}
.view-menu.active .menu-item:nth-child(1) { animation-delay: 0.08s; }
.view-menu.active .menu-item:nth-child(2) { animation-delay: 0.18s; }
.view-menu.active .menu-item:nth-child(3) { animation-delay: 0.28s; }

@keyframes itemIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-footer {
  position: absolute;
  bottom: 2.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── SECTION VIEWS ─── */
.view-section {
  display: flex;
  flex-direction: column;
}

/* Top bar */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.back-btn:hover { color: var(--text); }

.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Scroll area */
.section-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.section-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  color: var(--text);
}

/* About */
.about-text {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--muted);
}

.about-text em {
  color: var(--text);
  font-style: italic;
}

.about-cta {
  margin-top: 2.5rem;
}

/* Open Call */
.call-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.call-card {
  background: var(--bg);
  padding: 1.5rem;
}

.call-card-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.call-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}

.call-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #111;
  border: 1.5px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  color: #111;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* Contact */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:first-child {
  border-top: 1px solid var(--border);
}

.contact-item h3 {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.contact-item a {
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover { color: var(--accent-dk); }

.contact-note {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ─── APPLICATION FORM ─── */
.apply-layout {
  display: flex;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.apply-info {
  flex: 0 0 32%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
}

.apply-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  color: var(--text);
}

.apply-deadline-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.apply-deadline-badge strong {
  color: var(--accent);
  font-size: 1rem;
}

.fee-amount {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.fee-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.35rem;
}

.apply-form-wrap {
  flex: 1;
  min-width: 0;
}

.apply-intro {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

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

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="url"],
.form-grid input[type="tel"],
.form-grid input[type="date"] {
  width: 100%;
  padding: 1rem 1.25rem;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.form-grid input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-grid input::placeholder {
  color: var(--muted);
}

.upload-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.upload-field:hover {
  border-color: var(--accent);
}

.upload-field.has-file {
  border-color: var(--accent);
  color: var(--accent);
}

.upload-field.has-file .upload-plus {
  display: none;
}

.upload-plus {
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 300;
  line-height: 1;
}

.apply-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.125rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.apply-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.apply-terms {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.apply-terms:hover {
  color: var(--accent);
}

.apply-success {
  text-align: center;
  padding: 4rem 2rem;
}

.apply-success h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1rem;
}

.apply-success p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .section-inner { padding: 2rem 1.5rem 3rem; }
  .section-bar { padding: 1.25rem 1.5rem; }
  .call-grid { grid-template-columns: 1fr; }
  .call-actions { flex-direction: column; }
  .call-actions .btn { text-align: center; }
  .info-btn { top: 68px; right: 1.5rem; }
  .home-band .lang-toggle { right: 1.5rem; }
  .menu-footer { bottom: 2rem; }
  .apply-layout { flex-direction: column; gap: 2rem; padding: 2rem 1.5rem 3rem; }
  .apply-info { flex: none; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .view { transition: none; }
  .menu-item { animation: none !important; opacity: 1 !important; }
}
