/* =========================================
   FINORA Global Style
   （結構整理版，不改原本視覺設定）
========================================= */

/* 自動引入設計系統（v2 元件、tokens、reveal 動畫）
   全部用 :where() 選擇器，0 specificity，不會覆蓋現有樣式 */
@import url("design-system.css");

:root {
  --main-color: #b4695d;
  --main-color-hover: #944647;
  --main-color-bg: #f5e8e6;

  --button-radius: 24px;
  --container-width: 700px;
}

/* =========================================
   Base Layout
========================================= */

body {
  margin: 0;
  font-family: "Noto Sans", sans-serif;
  background-color: white;
  color: #333;

  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
  box-sizing: border-box;
}

/* =========================================
   Typography
========================================= */

h1 {
  text-align: center;
  color: var(--main-color);
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h2 {
  color: var(--main-color);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
}

/* =========================================
   Form Elements
========================================= */

label {
  display: block;
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  font-size: 1rem;
}

/* =========================================
   Buttons
========================================= */

button,
.home-btn {
  display: block;
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  border-radius: var(--button-radius);
  border: 2px solid var(--main-color);
  background: white;
  color: var(--main-color);
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  max-width: 400px;
  width: 100%;
  box-sizing: border-box;
}

button:hover,
.home-btn:hover {
  background-color: var(--main-color-bg);
  color: var(--main-color-hover);
}

/* =========================================
   Grid Button Layout
========================================= */

.grid-button-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 2rem;
  justify-items: center;
}

.grid-button-group a {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--button-radius);
  border: 2px solid var(--main-color);
  color: var(--main-color);
  font-weight: bold;
  text-decoration: none;
}

.grid-button-group a:hover {
  background-color: var(--main-color-bg);
  color: var(--main-color-hover);
}

/* =========================================
   Horizontal Button Group
========================================= */

.grid-button-horizontal {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto 2rem;
  max-width: 500px;
  flex-wrap: wrap;
}

.grid-button-horizontal a {
  flex: 1 1 45%;
  padding: 1rem;
  border-radius: var(--button-radius);
  border: 2px solid var(--main-color);
  background-color: #fff;
  color: var(--main-color);
  font-weight: bold;
  text-decoration: none;
  text-align: center;
}

.grid-button-horizontal a:hover {
  background-color: var(--main-color-bg);
  color: var(--main-color-hover);
}

/* =========================================
   Account Section
========================================= */

.account-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.account-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.account-controls button {
  flex: 1;
  min-width: 60px;
  padding: 0.8rem;
  font-size: 1.1rem;
  border-radius: 16px;
}

/* =========================================
   Footer
========================================= */

footer {
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  padding: 1rem;
}

.footer-links a {
  margin: 0 0.4rem;
  color: #999;
  text-decoration: none;
}

/* =========================================
   Background Watermark
========================================= */

body.logo-full-bg::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('favicon.png');
  background-repeat: no-repeat;
  background-position: center 20%;
  background-size: 60%;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}