
/* ========================================
   MIAMZEIT - OFFICIAL DESIGN SYSTEM
   Version 0.3
   ======================================== */

@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap");

:root {
  /* Official colors */
  --moonstone: #83686F;
  --pistachio: #C2BD95;
  --ember: #F1B698;

  /* Secondary colors */
  --veil: #D3B9BA;
  --fern: #798C79;
  --fennel: #ECDDBE;
  --cherry-blossom: #FDCCBD;
  --peony: #E49590;
  --bluebell: #B6CAD5;
  --honey: #FEC683;

  /* Interface */
  --background: #FFF9EF;
  --surface: #FFFFFF;
  --text: #503E44;
  --border: #E9DCD1;

  /* Fonts */
  --font-body: "Nunito", sans-serif;
  --font-display: "Nunito", sans-serif;
  /* More Sugar will be added in step 4 */

  /* Shapes */
  --radius-card: 28px;
  --radius-button: 14px;
}

/* General */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

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

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
}

/* Layout */

main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1,
h2,
h3 {
  color: var(--moonstone);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: 1.5rem;
}

p {
  margin-top: 0;
}

/* Header */

.site-header {
  background: var(--fennel);
  padding: 16px 24px;
  border-bottom: 2px solid var(--pistachio);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-name {
  color: var(--moonstone);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--moonstone);
}

.icon-button:hover {
  background: var(--pistachio);
}

.icon-button svg {
  width: 24px;
  height: 24px;
}

/* Buttons */

button {
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--moonstone);
  color: white;
  font-weight: 700;
  transition: transform 0.15s, opacity 0.15s;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.logout-button {
  background: var(--moonstone);
  color: white;
}

.secondary-button {
  background: var(--pistachio);
  color: var(--text);
}

/* Language selector */

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.language-switcher button {
  padding: 8px 12px;
  background: var(--veil);
  color: var(--text);
}

.language-switcher button[aria-pressed="true"] {
  background: var(--moonstone);
  color: white;
}

/* Cards and authentication */

.card {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(80, 62, 68, 0.06);
  margin: 20px 0;
}

#auth-form {
  max-width: 420px;
}

#auth-form input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
}

#auth-message {
  color: var(--moonstone);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Dashboard */

.dashboard-intro {
  margin: 24px 0 32px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.dashboard-bubble {
  min-height: 220px;
  padding: 28px 20px;
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(80, 62, 68, 0.06);
}

.dashboard-bubble:nth-child(1) {
  background: var(--pistachio);
}

.dashboard-bubble:nth-child(2) {
  background: var(--cherry-blossom);
}

.dashboard-bubble:nth-child(3) {
  background: var(--ember);
}

.dashboard-bubble:nth-child(4) {
  background: var(--bluebell);
}

.bubble-icon {
  font-size: 2.4rem;
}

.bubble-title {
  margin: 0;
  color: var(--moonstone);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.bubble-description {
  max-width: 260px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Responsive */

@media (max-width: 680px) {
  .site-header {
    padding: 12px 16px;
  }

  .header-inner {
    align-items: flex-start;
  }

  .site-logo {
    width: 150px;
  }

  .header-actions {
    gap: 6px;
  }

  .profile-name {
    font-size: 1rem;
  }

  main {
    padding: 24px 14px 48px;
  }

  .dashboard-grid {
    gap: 12px;
  }

  .dashboard-bubble {
    min-height: 185px;
    padding: 18px 10px;
    border-radius: 26px;
  }

  .bubble-description {
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
